Exemple #1
0
        public Customer CreateCustomer()
        {
            string buffer;
            Customer customer = new Customer ();

            output.OutputText ("Enter Customer's First Name:");
            buffer = input.InputText ();
            customer.setFirstName (buffer);
            buffer = customer.getFirstName ();
            output.OutputText ("First Name:	" + buffer);

            output.OutputText ("Enter Customer's Last Name:");
            customer.setLastName (input.InputText ());
            buffer = customer.getLastName ();
            output.OutputText ("Last Name:	" + buffer);

            buffer = customer.getFirstName () + " " + customer.getLastName ();
            output.OutputText ("Customer's Full Name:" + buffer);

            output.OutputText ("Enter Customer's Age:");
            customer.setAge (input.InputNumber ());
            output.OutputText (string.Format ("Customer's Age:\t{0}", customer.getAge ()));

            output.OutputText ("Enter Customer's Money:");
            customer.setMoney (input.InputNumber ());
            output.OutputText (string.Format ("Customer's Money:\t{0}", customer.getMoney ()));

            return customer;
        }
Exemple #2
0
        public Customer CreateCustomer()
        {
            string buffer;
            Customer customer = new Customer ();

            output.OutputText ("Enter Customer's Fullname:");
            buffer = input.InputText();
            customer.setName (buffer);
            buffer = customer.getName ();
            output.OutputText ("Customer's Full Name:" + buffer);

            output.OutputText ("Enter Budget:");
            buffer = input.InputText();
            customer.setBudget (double.Parse(buffer));
            buffer = customer.getBudget().ToString();
            output.OutputText (string.Format ("Customer's Money:\t{0}", buffer));

            return customer;
        }
Exemple #3
0
 /// <summary>
 /// Fügt einen Kunden zur Schlange hinzu
 /// </summary>
 /// <returns>Liste aller Kunden an der Kasse</returns>
 /// <param name="customer">Kunde</param>
 public Queue<Customer> enqueueCustomer(Customer customer)
 {
     CustomerQueue.Enqueue(customer);
     return this.CustomerQueue;
 }
Exemple #4
0
 public Customer nextCustomer()
 {
     CurrentCustomer = Queue.Dequeue();
     return CurrentCustomer;
 }