Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a menu-driven program that converts units of length from feet to meters and vice-versa. The program requirements are as follows: The menu shall include

image text in transcribed
Write a menu-driven program that converts units of length from feet to meters and vice-versa. The program requirements are as follows: The menu shall include at least three options: 1) Convert feet to meters; 2) Convert meters to feet; and 3) Exit program. The menu shall repeat until the user chooses the option to end the program. When the user chooses one of the conversion options, the program will prompt for the length in the appropriate units, store it in a variable, and pass the variable to a function which will calculate the equivalent distance in the opposite units and return it. The conversions shall be performed by the following two functions. pouble feetToMeters(double feet) double meters ToFeet(double meters) . Here are the formulae the functions shall use for performing these conversions: feet = meters *3.28084 meters = feet *0.3048 The output should be neat and easily readable, as should the input prompts. Completion Checklist The program will be assessed by the following checklist: . . . . The program compiles and runs, The program code is clean and readable. The menu contains the required options. The program repeats correctly with an appropriate loop. The program responds correctly to the menu selections using an appropriate selection structure The program ends when the user chooses the option to exit. The menu options for converting units use the correct functions. The main function contains correct, user-friendly prompts. The conversion functions are appropriately declared. The conversion functions accept a parameter, calculate the conversion using the correct formula, and return the result. The main function displays results in a clear, user-friendly way

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions