Question
We will make a simple, menu-driven conversion software package, called English-Metric Converter. Our software package will present the user with a menu of choices and
We will make a simple, menu-driven conversion software package, called English-Metric
Converter. Our software package will present the user with a menu of choices and execute the
operation specified. The menu must look exactly like this:
English-Metric Converter
1) Convert from feet to meters
2) Convert from meters to feet
3) Compute area of a rectangle in square feet given length and
width in meters
4) Compute volume of a rectangular solid in cubic meters given
length, width, and height in feet
5) Quit the Program
Please enter a number (1-5) ->
Implementation Notes:
You will create a function named menu() that will be called repeatedly from a loop in
main().
Function int menu() will show the alternatives as above and take user input (1 - 5),
until a number on that range is entered. It will then return the legal user choice.
Inside a loop in main(), the program will repeatedly call menu(). When menu()
returns a legal selection, code in main() will get all necessary inputs from the user, call
the function that computes the result, and displays output.
The feet-to-meters and meters-to-feet functions should have one parameter (the input
value) and a return value (the converted length). This means that you must get the
length to be converted BEFORE calling the conversion function.
Note that there are 0.3048 meters in a foot.
For the area problem, you are to get the length and width of the rectangle in meters,
and pass them to a function. Inside the function, convert length and width to the new
units using the other functions you have created for that purpose, and compute the
area. Return the area to the caller. The caller will output the length, width, and area in
meters and the area in square feet, properly labeled. Follow a similar approach for the
volume problem (but obviously, with three parameters).
We will NOT know how many times the user will want to execute a function from the
menu.
Submission:
1. Compile and run your program one last time before submitting it. Your program must run in
either Dev C++ (recommended) or the version of JGrasp available through ArgoApps.
2. The name of your program file should be: lastname_firstname_project#.cpp, where # is the
number of the project. For example, if your name is Ricky Landry and you are submitting
project 1, your source code file should be named landry_ricky_project1.cpp
3. Login to UWF's eLearning system at http://elearning.uwf.edu/. Select our course.
4. Select the Assignment and click on the Submit Assignment button on the top.
5. Upload your file and check to make sure it finished.
6. Be sure to review the university policy on academic dishonesty. This is an individual project
and you should not work with anyone else in completing it. Do not hesitate to ask me
questions if you need help!
Important Notes:
Projects will be graded on whether students correctly solve the problem, and whether
they adhere to good programming practices including use of comments as specified in
the materials, using meaningful variable names, proper indentations, and use of
functions to decompose the problem.
Projects must be submitted by the time specified as the due date. Projects submitted
after that time will get a grade of zero.
Please review UWF's academic conduct policy. Note that viewing another student's
solution, whether in whole or in part, is considered academic misconduct. Also note that
submitting code obtained through the Internet or other sources, whether in whole or in
part, is considered academic misconduct. All programs submitted will be reviewed for
evidence of academic misconduct, and all violations will be handled accordingly.
SEE SAMPLE RUN ON NEXT PAGE
Sample Run:
English-Metric Converter
1) Convert from feet to meters
2) Convert from meters to feet
3) Compute area of a rectangle in square feet
2) Convert from meters to feet
3) Compute area of a rectangle in square feet given length and
width in meters
4) Compute volume of a rectangular solid in cubic meters given
length, width, and height in feet
5) Quit the Program
Please enter a number (1-5) -> 4
Please enter length width and height in feet -> 5 5 5
The area in cubic meters is 3.540
English-Metric Converter
1) Convert from feet to meters
2) Convert from meters to feet
3) Compute area of a rectangle in square feet given length and
width in meters
4) Compute volume of a rectangular solid in cubic meters given
length, width, and height in feet
5) Quit the Program
Please enter a number (1-5) -> 8
Incorrect choice, try again.
English-Metric Converter
1) Convert from feet to meters
2) Convert from meters to feet
3) Compute area of a rectangle in square feet given length and
width in meters
4) Compute volume of a rectangular solid in cubic meters given
length, width, and height in feet
5) Quit the Program
Please enter a number (1-5) -> 1
Please enter the value in feet -> -5
Feet must be a positive number, try again
Please enter the value in feet -> 5
5 feet is 1.524 meters.
English-Metric Converter
1) Convert from feet to meters
2) Convert from meters to feet
3) Compute area of a rectangle in square feet given length and
width in meters
4) Compute volume of a rectangular solid in cubic meters given
length, width, and height in feet
5) Quit the Program
Please enter a number (1-5) -> 5
Thanks for using the program. Goodbye.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started