













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














Figure 1 : CLASS DIAGRAM
Figure 2 : CLASS TAXIORG
Figure 4 : CLASS CILENT
Figure 5 : CLASS INFORMATION
Figure 6 : CLASS CLIENTINFORMATION
Figure 7 : CLASS DRIVERINFORMATION
waitingCheck = false; throw new UnavailableTaxiException("Not enough taxi for clients"); } waitingCheck = true; Waiting(EXPIRED_TIME); } private void Waiting(int seconds) { try { Thread.Sleep(seconds); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } } Figure 8 : TAXIORG CLASS
this.taxiOrg = TaxiOrg; } public void CallATaxi() { try { Console.WriteLine("New Client: " + Thread.CurrentThread.Name); Taxi taxi = taxiOrg.CallTaxi(); taxiOrg.FreeTaxi(taxi); Console.WriteLine("This client is being served: " + Thread.CurrentThread.Name); } catch (UnavailableTaxiException ex) { Console.WriteLine("This client has been rejected: " + Thread.CurrentThread.Name); } } } Figure 10 : CLIENT CLASS
Figure 15 : FINAL RESULT - COLLECTING DATA Figure 16 : FINAL RESULT - PARING CUSTOMERS AND DRIVERS
Figure 17 : SINGLETON EXAMPLE (Anon., 2018)
Figure 18 : FACTORY EXAMPLE (Anon., 2018)
Figure 21 : ADAPTER EXAMPLE (Anon., 2018)
Figure 22 : DECORATOR EXAMPLE (Anon., 2018)
Figure 23 : COMPOSITE EXAMPLE (Anon., 2018)
Table 2 : BEHAVIORAL PATTERNS
Figure 24 : TEMPLATE METHOD EXAMPLE (Anon., 2018)
Figure 25 : COMMAND EXAMPLE (Anon., 2018)
Figure 26 : STRATEGY EXAMPLE (Anon., 2018)
Table 3 : STRUCTURAL PATTERNS