Example #1
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.White;

            ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!");

            string[] choices = { "Distance Converter", "BMI Calculator",
                                 "Student Marks",      "Social Network", "Quit" };

            int choiceNo = ConsoleHelper.SelectChoice(choices);

            if (choiceNo == 1)
            {
                converter.Run();
            }
            else if (choiceNo == 2)
            {
                calculator.Run();
            }
            else if (choiceNo == 3)
            {
            }
            else if (choiceNo == 4)
            {
                app04.DisplayMenu();
            }
            else if (choiceNo == 5)
            {
            }
            else
            {
                Console.WriteLine("Invalid Choice!");
            }
        }
Example #2
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!");

            string[] choices = { "Distance Converter", "BMI Calculater",
                                 "Student Grades",     "NetworkApp" };

            int choiceNo = ConsoleHelper.SelectChoice(choices);

            if (choiceNo == 1)
            {
                converter.ConvertDistance();
            }
            else if (choiceNo == 2)
            {
                calculator.CalculateIndex();
            }
            else if (choiceNo == 3)
            {
                studentGrades.OutputMenu();
            }
            else if (choiceNo == 4)
            {
                app04.DisplayMenu();
            }
            else
            {
                Console.WriteLine("Invalid choice ! ");
            }
        }
Example #3
0
        public static void Main(string[] args)
        {
            //Console.ForegroundColor = ConsoleColor.Black;

            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine();
            Console.Beep();

            string[] choice = { "Distance Converter", "BMI Calculator",
                                "Student Marks",      "Social Network" };


            int choiceNo = ConsoleHelper.SelectChoices(choice);

            if (choiceNo == 1)
            {
                DistanceConverter converter = new DistanceConverter();
                converter.Run();
            }
            else if (choiceNo == 2)
            {
                BMI calculator = new BMI();
                calculator.Run();
            }
            else if (choiceNo == 3)
            {
                StudentGrades studentGrades = new StudentGrades();
                studentGrades.Run();
            }
            else if (choiceNo == 4)
            {
                app04.DisplayMenu();
            }
        }
        public static void Main(string[] args)
        {
            Console.BackgroundColor = ConsoleColor.Black;
            Console.Clear();
            NetworkApp game = new NetworkApp();

            game.DisplayMenu();
        }
Example #5
0
        public static void Main(string[] args)
        {
            while (true)
            {
                //Creating an object of the distance converter
                DistanceConverter converter = new DistanceConverter();

                //Creating an object of the BMI calculator
                BMI bmi = new BMI();

                //Creating an object of the student grades
                StudentGrades grades = new StudentGrades();

                NetworkApp app04 = new NetworkApp();

                Console.ForegroundColor = ConsoleColor.Yellow;

                ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!\n");

                string[] choices = { "Distance Converter", "BMI Calculator", "Student Grades", "Social Network", "Quit" };

                int choiceNo = ConsoleHelper.SelectChoice(choices);

                /**
                 * Uses if statements and a while loop and list of strings to allow user to
                 * decide on which application they wish to use based upon their inputted number
                 * 1-4
                 * 5 Is a Quit choice which will break the loop and end the application
                 */

                if (choiceNo == 1)
                {
                    converter.ConvertingDistance();
                }

                else if (choiceNo == 2)
                {
                    bmi.BMICalculator();
                }

                else if (choiceNo == 3)
                {
                    grades.ChooseMethod();
                }
                else if (choiceNo == 4)
                {
                    app04.DisplayMenu();
                }
                else if (choiceNo == 5)
                {
                    break;
                }
                else
                {
                    Console.WriteLine("\nYou have entered an invalid choice");
                }
            }
        }
Example #6
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine();
            Console.Beep();

            DistanceConverter converter  = new DistanceConverter();
            BMI_Calculator    calculator = new BMI_Calculator();
            StudentGrades     grades     = new StudentGrades();
            NetworkApp        app        = new NetworkApp();

            // Ask the user which app they want to use

            string[] choices = new string[]
            {
                "App01 Distance Converter",
                "App02 BMI Calculator",
                "App03 Student Grades",
                "App04 Social Network"
            };

            int choiceNo = ConsoleHelper.SelectChoice(choices);

            if (choiceNo == 1)
            {
                converter.Run();
            }

            else if (choiceNo == 2)
            {
                calculator.OutputBmi();
            }

            else if (choiceNo == 3)
            {
                grades.UserSelect();
            }

            else if (choiceNo == 4)
            {
                app.DisplayMenu();
            }

            else
            {
                Console.WriteLine("Invalid choice");
            }
        }
Example #7
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine();
            Console.WriteLine("1. Distance Converter");
            Console.WriteLine("2. BMI Calculator");
            Console.WriteLine("3. Student Grades");
            Console.WriteLine("4. Social Network");
            Console.WriteLine("5. RPG Game");
            Console.WriteLine(" ==================== ");
            Console.WriteLine(" Select your application > ");
            Console.WriteLine(" ==================== ");
            string choice = Console.ReadLine();


            if (choice == "1")
            {
                DistanceConverter converter = new DistanceConverter();
                converter.ConvertDistance();
            }
            else if (choice == "2")
            {
                BMICalculator converter = new BMICalculator();
                converter.Run();
            }

            else if (choice == "3")
            {
                StudentGrades converter = new StudentGrades();
                converter.UserSelect();
            }

            else if (choice == "4")
            {
                App04.DisplayMenu();
            }

            else if (choice == "5")
            {
                throw new Exception();
            }

            else
            {
                Console.WriteLine("Invalid choice");
            }
        }
Example #8
0
        public static void Main(string[] args)
        {
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.White;

            Console.WriteLine("BNU CO453 Applications Programming Jan start");
            Console.WriteLine("Evan Castro");
            Console.WriteLine();

            string[] choices = new string[]
            {
                "Distance Coverter",
                "BMI Calculator",
                "Student Grades",
                "Social Network",
                "RSP Game"
            };

            ConsoleHelper.OutputTitle("Please select the application you wish to use ");
            choice = ConsoleHelper.SelectChoice(choices);

            if (choice == 1)
            {
                DistanceConverter converter = new DistanceConverter();
                converter.Run();
            }
            else if (choice == 2)
            {
                BMICalculator calculator = new BMICalculator();
                calculator.Run();
            }
            else if (choice == 3)
            {
                StudentGrades grades = new StudentGrades();
                grades.Run();
            }
            else if (choice == 4)
            {
                NetworkApp App04 = new NetworkApp();
                App04.DisplayMenu();
            }
            else if (choice == 5)
            {
                RPSGame game = new RPSGame();
                game.Run();
            }
        }
Example #9
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine();
            Console.WriteLine("1. Distance converter");
            Console.WriteLine("2. BMI calculator");
            Console.WriteLine("3. Student Grades calculator");
            Console.WriteLine("4. Social network application");
            Console.WriteLine("5. Ice, fire and wind RPS game");
            Console.WriteLine();
            string choice = Console.ReadLine();



            string[] choices = { " Distance Converter ", " BMI Calculator ", "Student Grades Calcuator", "Social network", "Ice and Wind Fire rps game" };

            int choiceNo = ConsoleHelper.SelectChoice(choices);

            if (choiceNo == 1)
            {
                converter.ConvertDistance();
            }
            if (choiceNo == 2)
            {
                Calculator.OutpuUnits();
            }
            if (choiceNo == 3)
            {
                calculator.CalculateMark();
            }
            if (choiceNo == 4)
            {
                app04.DisplayMenu();
            }
            if (choiceNo == 5)
            {
                app05.play();
            }
        }
Example #10
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Red;

            Console.WriteLine("----------------------------------------------");
            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine("----------------------------------------------");
            Console.WriteLine();

            Console.WriteLine("1. Distance Converter");
            Console.WriteLine("2. BMI Calculator");
            Console.WriteLine("3. Student Marks");
            Console.WriteLine("4. Social Network");
            Console.WriteLine();



            Console.WriteLine("Please choose which app you would like to choose from > ");
            string choice = Console.ReadLine();

            if (choice == "1")
            {
                converter.ConvertDistance();
            }
            else if (choice == "2")
            {
                calculator.BMICalculation();
            }
            else if (choice == "3")
            {
                studentGrades.RunStudentGrades();
            }
            else if (choice == "4")
            {
                app04.DisplayMenu();
            }
            else
            {
                Console.WriteLine("Invalid Choice");
            }
        }
Example #11
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;


            Console.WriteLine();
            ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!");

            string[] choices = { "Distance Converter", "BMI Calculator", "Student Grades",
                                 "Social Network",     "Rock-Paper-Scissors Game" };
            int      choiceNo = ConsoleHelper.SelectChoice(choices);


            String choice = Console.ReadLine();

            if (choiceNo == 1)
            {
                converter.ConvertDistance();
            }
            else if (choiceNo == 2)
            {
                calculator.CalculateIndex();
            }
            else if (choiceNo == 3)
            {
                grades.CalculateGrades();
            }
            else if (choiceNo == 4)
            {
                app04.DisplayMenu();
            }
            else if (choiceNo == 5)
            {
                app05.Play();
            }
            else
            {
                Console.WriteLine("Invalid Choice!");
            }
        }
Example #12
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Blue;

            ConsoleHelper.OutputHeading("CO453 C# Programming - MAIN MENU", 0.2);
            string[] choices =
            {
                "APP01: Distance Converter",
                "APP02: BMI Calculator",
                "APP03: Student Grades System",
                "APP04: Social Network"
            };
            int choice = ConsoleHelper.SelectChoice(choices);

            if (choice == 1)
            {
                DistanceConverter converter = new DistanceConverter();
                converter.ConvertDistance();
            }
            if (choice == 2)
            {
                BMI bmi = new BMI();
                bmi.MainMenu();
            }
            if (choice == 3)
            {
                StudentGrades studentGrades = new StudentGrades();
                studentGrades.OutputHeading();
            }
            if (choice == 4)
            {
                NetworkApp networkApp = new NetworkApp();
                networkApp.DisplayMenu();
            }
            else
            {
                Console.WriteLine("Please make your choice");
            }
        }
Example #13
0
        public static void Main(string[] args)
        {
            // Starts application in the color yellow
            Console.ForegroundColor = ConsoleColor.Yellow;

            //Outputs the heading using parameters set
            ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!");

            // Lists choices as an array using variables inputed
            string[] choices = { "Distance Converter", "BMI Calculator", "Student Marks", "Social Network" };

            // Selects a number equivalent to the array
            int choiceNo = ConsoleHelper.SelectChoice("Select a choice"
                                                      , choices);

            // If the number equals a choice listed, it opens a program
            // If else then Invalid entry
            if (choiceNo == 1)
            {
                converter.ConvertDistance();
            }
            else if (choiceNo == 2)
            {
                calculator.calculator();
            }
            else if (choiceNo == 3)
            {
                Marks.RunGradesApp();
            }
            else if (choiceNo == 4)
            {
                App04.DisplayMenu();
            }
            else
            {
                Console.WriteLine("Invalid Entry!");
            }
        }
Example #14
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            Console.WriteLine("BNU CO453 Applications Programming 2020-2021!");
            Console.WriteLine();

            Console.WriteLine();
            Console.WriteLine($" 1. App01 Distance Converter");
            Console.WriteLine($" 2. App02 BMI");
            Console.WriteLine($" 3. App03 Student Grades");
            Console.WriteLine($" 4. App04 Social Network");

            Console.Write("Please select an app > ");
            string choice = Console.ReadLine();


            if (choice.Equals("1"))
            {
                DistanceConverter converter = new DistanceConverter();
                converter.CalculatetoDistance();
            }
            else if (choice == "2")
            {
                BMI bmi = new BMI();
                bmi.Run();
            }
            else if (choice.Equals("3"))
            {
                StudentGrades studentGrades = new StudentGrades();
                studentGrades.Run();
            }
            else if (choice.Equals("4"))
            {
                NetworkApp app04 = new NetworkApp();
                app04.DisplayMenu();
            }
        }
Example #15
0
        public static void Main()
        {
            Console.ForegroundColor = ConsoleColor.Yellow;

            ConsoleHelper.OutputHeading("BNU CO453 Applications Programming 2020-2021!");

            string[] choices  = { "Distance Converter", "BMI Calculator", "Student Marks", "Social Network" };
            int      choiceNo = ConsoleHelper.SelectChoice(choices);

            switch (choiceNo)
            {
            case 1:
                DistanceConverter converter = new DistanceConverter();
                converter.ConvertDistance();
                break;

            case 2:
                BMI bmiindex = new BMI();
                bmiindex.ConvertBmi();
                break;

            case 3:
                StudentGrades studentGrades = new StudentGrades();
                studentGrades.StudentMenu();
                break;

            case 4:
                NetworkApp socialApp = new NetworkApp();
                socialApp.DisplayMenu();
                break;

            default:
                Console.WriteLine("Invalid Choice!");
                break;
            }
        }