Question: please provide the code in C# Menu Create a method called Menu to print the following menu: A Convert Pounds to Kilograms B

please provide the code in C#

  1. Menu
    Create a method called “Menu” to print the following menu:
    A – Convert Pounds to Kilograms
    B – Convert Miles to Kilometers
    X – Exit the application


2. In the Main()
In the Main() method, loop through the “Menu” to give options tothe user. Collect the value the user has chosen. If an invalidvalue pressed, show “Invalid Input” message and show the menuagain.


3. “OptionA” Method
Create a method called “OptionA” that will print the conversionfrom pounds to kilograms by calling “PoundsToKilograms” method(defined in the item #4 below) starting at 200 pounds down to 50pounds in decrements of 5. Show the result on a table in theconsole.

4. “PoundsToKilograms” Method
Create a method called “PoundsToKilograms”
• Name: PoundsToKilograms
• Parameter: A double representing the pounds
• Returns: A double representing the kilograms converted frompounds parameter
• Displays: Nothing
• Task: Calculates the conversion from pounds to kilograms. Theconverted kilogram is the
returned value from the method.


5. “OptionB” Method
Create a method called “OptionB” that will print the conversionfrom miles to kilometres by calling “MilesToKilometers” method(defined in the item #6 below) starting at 10 miles up to 100 milesin increments of 10. Show the result on a table in the console.


6. “MilesToKilometers” Method
Create a method called “MilesToKilometers”
• Name: MilesToKilometers
• Parameter:
o A double representing the miles distance
o A double representing the kilometers distance - this should be an"out" parameter
• Returns: Nothing
• Displays: Nothing
• Task: Calculates the conversion from miles to kilometers. Theconverted kilometer is returned as
an "out" parameter

Step by Step Solution

3.48 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

using System class Program static void Mainstring args char input do Menu ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!