SHARE
TWEET

Untitled

a guest Mar 26th, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace Kafic2
  5. {
  6.     class Kafic
  7.     {
  8.         public List<Sto> stolovi = new List<Sto>();
  9.         public Kasa kasa;
  10.         public string radnoVrijeme;
  11.  
  12.         public Sto NadjiSto(int brOsoba, bool pusenje)
  13.         {
  14.             foreach(Sto sto in stolovi)
  15.             {
  16.                 if (brOsoba <= sto.brMjesta && pusenje == sto.pusenje)
  17.                     return sto;
  18.             }
  19.             throw new Exception("Nema mjesta");
  20.  
  21.         }
  22.  
  23.         public void DodajSto(Sto sto)
  24.         {
  25.             stolovi.Add(sto);
  26.         }
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top