public static void Main(string[] args) { //RunProgram1(); //Program2 myObject = new Program2(); //Program3 myObject = new Program3(); //Program4 myObject = new Program4(); //Program5 myObject = new Program5(); Program6 myObject = new Program6(); //Console.WriteLine("Welcome to my car app. Please see the available commands below:"); //Console.WriteLine("1. get info - get info of vehicle"); //Console.WriteLine("2. add fuel - add fuel to vehicle"); //Console.WriteLine("3. drive - drive vehicle"); //Console.WriteLine("4. reverse - reverse vehicle"); //Console.WriteLine("5. switch - switch between hatchback, saloon or lorry"); //Console.WriteLine("6. unlock - unlock vehicle"); //Console.WriteLine("7. lock - lock vehicle"); //Console.WriteLine("8. service - service vehicle\n"); //Console.WriteLine("You are currently in a Hatchback\n"); //while (true) // Loop indefinitely //{ // string userCommand = Console.ReadLine().ToLower(); // Get string from user // myObject.Run(userCommand); //} }
public static void Main() { Console.WriteLine("Welcome to the main menu"); Console.WriteLine("Please enter the name of the program you want to use"); Console.WriteLine("For the number swapper, enter the word 'number'"); Console.WriteLine("For the number sorter, enter the word 'sorter'"); Console.WriteLine("For the grades machine, enter the word 'grade'"); Console.WriteLine("For the name machine, enter the word 'name'"); string userInput = Console.ReadLine(); switch (userInput) { case "number": Program6.Main(); break; case "sorter": Program7.Main(); break; case "grade": Program8.Main(); break; case "name": Program9.Main(); break; } }
public void Test_Temperature() { Assert.Equal(30, Program6.CelciusToFahrenheit(91)); Assert.Equal(30, Program6.CelciusToKelvin(81)); Assert.Equal(30, Program6.KelvinToCelcius(71)); Assert.Equal(30, Program6.KelvinToFahrenheit(61)); Assert.Equal(30, Program6.FahrenheitToCelcius(51)); Assert.Equal(30, Program6.FahrenheitToKelvin(51)); }