Ejemplo n.º 1
0
 private void shopperEntering(Shopper shopper)
 {
     if (bannedShopper.Contains(shopper))
     {
         Console.WriteLine($"you are not welcome to the store{shopper.Name}")
     }
     else
     {
         Console.WriteLine($"welcome {shopper.Name} to {Name}");
     }
     this.DisplayShoppers();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            /*
             *  - create a few grocery stores
             *  - create a few shoppers with a shopping list
             *      - have a shoppers enter store, store should print a greeting
             *  - have store print list of shoppers
             *  - add items from their list to their cart
             *      - prtint shopping cart items
             *  - Shopper checkout and pay
             *      - shopper must have enough money
             *          - shopper says they got too many items if not enough money
             *      - shopper exits store after checkout
             *      - store prints goodbue to shopper
             *      - store should print list of shopper names
             */

            //Datatype varName = assigned value

            Shopper      shopper1         = new Shopper("patrick");
            Shopper      shopper2         = new Shopper("levi");
            Shopper      shopper3         = new Shopper("monica");
            GroceryStore albertandHisSons = new GroceryStore(
                "albertsons", new List <Shopper>()
            {
                shopper1
            }
                );



            shopper1.EnterStore(albertandHisSons);
            shopper2.EnterStore(albertandHisSons);
            shopper3.EnterStore(albertandHisSons);


            // Console.WriteLine(shopper1.Name);
        }
Ejemplo n.º 3
0
 public void ShopperExiting(Shopper shopper)
 {
 }