Beispiel #1
0
    public void Cook()
    {
        Vegetable potato = GetVegetable(VegetableType.Potato);

        Peel(potato);
        Cut(potato);

        Vegetable carrot = GetVegetable(VegetableType.Carrot);

        Peel(carrot);
        Cut(carrot);

        Bowl bowl = GetBowl();

        bowl.Add(carrot);
        bowl.Add(potato);

        var sb = new StringBuilder();

        sb.Append("Bowl with ");
        foreach (var vegetable in bowl.Vegetables)
        {
            sb.Append($"{vegetable.Type.ToString().ToLower()} + ");
        }

        sb.Remove(sb.Length - 3, 3);
        sb.Append(" is now prepared!");
        Console.WriteLine(sb.ToString());
    }
Beispiel #2
0
        public void Cook()
        {
            Potato potato = GetPotato();
            Carrot carrot = GetCarrot();
            Bowl   bowl   = GetBowl();

            Peel(potato);
            Peel(carrot);
            Cut(potato);
            Cut(carrot);
            bowl.Add(carrot);
            bowl.Add(potato);
        }
        public void Main()
        {
            Potato potato = new Potato();
            Carrot carrot = new Carrot();
            Peel(potato);
            Peel(carrot);
            Cut(potato);
            Cut(carrot);

            Bowl bowl = new Bowl();
            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #4
0
        public void Cook()
        {
            Potato potato = this.GetPotato();
            Carrot carrot = this.GetCarrot();

            this.Peel(potato);
            this.Peel(carrot);
            this.Cut(potato);
            this.Cut(carrot);
            Bowl bowl = this.GetBowl();

            bowl.Add(carrot);
            bowl.Add(potato);
        }
Beispiel #5
0
        public void Cook(Vegetable vegetable)
        {
            Potato potato = new Potato();
            potato.Peel();
            potato.Cut();

            Carrot carrot = new Carrot();
            carrot.Peel();
            carrot.Cut();

            Bowl bowl = new Bowl();
            bowl.Add(potato);
            bowl.Add(carrot);
        }
Beispiel #6
0
    public void Cook()
    {
        Bowl bowl = GetBowl();

        Potato potato = GetPotato();

        ProcessVegetable(potato);
        bowl.Add(potato);

        Carrot carrot = GetCarrot();

        ProcessVegetable(carrot);
        bowl.Add(carrot);
    }
        public void Cook()
        {
            Potato potato       = this.GetPotato();
            Potato peeledPotato = this.Peel(potato);
            Potato cuttedPotato = this.Cut(peeledPotato);
            Bowl   bowl         = this.GetBowl();

            bowl.Add(cuttedPotato);

            Carrot carrot       = this.GetCarrot();
            Carrot peeledCarrot = this.Peel(carrot);
            Carrot cuttedCarrot = this.Cut(peeledCarrot);

            bowl.Add(cuttedCarrot);
        }
        public static void Main()
        {
            Bowl bowl = GetBowl();

            Carrot carrot = GetCarrot();

            Peel(carrot);
            Cut(carrot);
            bowl.Add(carrot);

            Potato potato = GetPotato();

            Peel(potato);
            Cut(potato);
            bowl.Add(potato);
        }
Beispiel #9
0
        public void Cook()
        {
            Potato potato = this.GetPotato();
            Carrot carrot = this.GetCarrot();

            Vegetable peeledPotato = Vegetable.Peel(potato);
            Vegetable peeledCarrot = Vegetable.Peel(carrot);

            Vegetable cutPotato = this.Cut(potato);
            Vegetable cutCarrot = this.Cut(carrot);

            Bowl bowl = this.GetBowl();

            bowl.Add(cutPotato);
            bowl.Add(cutCarrot);
        }
Beispiel #10
0
 public void Cook(Vegetable vegetable)
 {
     Peel(vegetable);
     Cut(vegetable);
     bowl = GetBowl();
     bowl.Add(vegetable);
 }
Beispiel #11
0
        public Bowl Cook(Vegetable vegetable)
        {
            Bowl bowl = this.GetBowl();

            bowl.Add(vegetable);

            return(bowl);
        }
        public void Cook()
        {
            Bowl vegetablesBowl = GetBowl();

            Potato averagePotato = GetPotato();

            Peel(averagePotato);
            Cut(averagePotato);

            vegetablesBowl.Add(averagePotato);

            Carrot smallCarrot = GetCarrot();

            Peel(smallCarrot);
            Cut(smallCarrot);

            vegetablesBowl.Add(smallCarrot);
        }
Beispiel #13
0
    public void Cook()
    {
        Bowl bowl = GetBowl();

        // processing carrot
        Carrot carrot       = GetCarrot();
        var    peeledCarrot = Peel(carrot);
        var    cuttedCarrot = Cut(peeledCarrot);

        bowl.Add(cuttedCarrot);

        // processing potato
        Potato potato       = GetPotato();
        var    peeledPotato = Peel(potato);
        var    cuttedPotato = Cut(peeledPotato);

        bowl.Add(cuttedPotato);
    }
Beispiel #14
0
        public Bowl Cook()
        {
            Potatoe potato = this.GetPotato();

            this.Peel(potato);
            this.Cut(potato);

            Carrot carrot = this.GetCarrot();

            this.Peel(carrot);
            this.Cut(carrot);

            Bowl bowl = this.GetBowl();

            bowl.Add(potato);
            bowl.Add(carrot);

            return(bowl);
        }
Beispiel #15
0
        public void Cook()
        {
            uint potatoWeight   = 200;
            uint potatoCalories = 77;
            uint carrotWeight   = 50;
            uint carrotCalories = 41;
            uint bowlVolume     = 2000;
            uint bowlSize       = 22;

            Potato potato = this.GetPotato(potatoWeight, potatoCalories);
            Carrot carrot = this.GetCarrot(carrotWeight, carrotCalories);
            Bowl   bowl   = this.GetBowl(bowlVolume, bowlSize);

            this.Peel(potato);
            this.Peel(carrot);

            this.Cut(potato);
            this.Cut(carrot);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
    public void Cook()
    {
        Potato potato = GetPotato();
        Carrot carrot = GetCarrot();
        Bowl   bowl   = GetBowl();

        int potatosNeeded = 2;

        for (int i = 0; i < potatosNeeded; i++)
        {
            Peel(potato);
            //Cut(potato);
            bowl.Add(potato);
        }

        int carrotsNeeded = 2;

        for (int i = 0; i < carrotsNeeded; i++)
        {
            Peel(carrot);
            //Cut(carrot);
            bowl.Add(carrot);
        }
    }