Example #1
0
 public Coffee(string brand, double price, Roast roast, Comppany importer)
 {
     this.brand    = brand;
     this.price    = price;
     this.roast    = roast;
     this.importer = importer;
 }
Example #2
0
        public Coffee CreateCoffee()
        {
            Console.WriteLine("Anna kahvin merkin");
            var merkki = Console.ReadLine();

            Console.WriteLine("Anna kahvin hinta");
            double hinta = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Anna kahvin paahto");
            int      paahto   = int.Parse(Console.ReadLine());
            Comppany importer = null;
            //syötä hinta ja paahto (1-5)
            //ei comppany
            Coffee toReturn = new Coffee(merkki, hinta, paahto, importer);

            toReturn.roast = (Coffee.Roast) 2;
            return(toReturn);
        }