Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //set the title for the console window
            Console.Title = "Assignment 1 G";
            //creating a object of the class Product
            Product p = new Product();

            //calling the Start() method that I have created in Product class
            p.Start();

            //commando to exit the program
            Console.WriteLine("Press Enter to exit!");
            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.Title = "Apu's Supermarket";

            //Declare and create an instance of the Product class.
            Product product = new Product();

            //Call the product-objects Start method to perform all steps required.
            product.Start();

            /*
                The command prompt window will close quickly after the program
                has executed the instructions under the Start method. To cause
                the window to stay, put the application in a reading mode, using
                the ReadLine method.
            */
            Console.WriteLine("Press Enter to exit!");
            Console.ReadLine();
        }