Question: Problem Statement: In this first project, you will write a complete C + + program that will display a menu and, based on user input,

Problem Statement:
In this first project, you will write a complete C++ program that will display a menu and, based
on user input, perform a variety of operations a list of floating-point numbers.
Program Requirements:
As with all projects in this course, your programs output will display your name, your
EUID, your e-mail address, the department name, and course number. This means that
your program will print this information to the terminal (see Sample Output).
In a loop of your choice, you repeatedly display a menu of options until the user enters
the selection to terminate the program as follows:
1. Display numbers in list
2. Add number to list
3. Remove number from list
4. Compute average of list of numbers
5. Compute minimum of list of numbers
6. Compute maximum of list of numbers
7. Exit program
Although you may assume that the user enters an integer in response to this menu, the
integer may be out of range. If the user enters an invalid menu option (i.e., not an
integer between 1 and 7, inclusively), your program will display an error message and
re-display the menu.
If the user enters an integer between 1 and 7, inclusively, then your program will
perform the requested operation as follows:
1. Display list of numbers
You will display all of the numbers in the current list.
2. Add number to list of numbers
You will prompt for and read in a floating-point number to add to the list,
append the number to the list of numbers, and then display a status message
indicating that the number was just added to the list of numbers.
3. Remove number from list of numbers
You will prompt for and read in a number to remove from the list, perform a
sequential search for the number in the list:
If that number is found in the list of numbers, you will display a status
message indicating that the number was removed from the list of
CSCE 1040 Project 1
Due: 11:59 PM on Sunday, February 25,2024
2 of 9
numbers and then perform the operation to remove that number from
the list of numbers.
If that number is not found in the list of numbers, you will remove the
last number in the current list and display a status message indicating
that the number (i.e., the last number in the list) was removed from the
list of numbers.
4. Compute average of list of numbers
You will compute the accurate average of the list of numbers and display the
result.
5. Compute minimum of list of numbers
You will find the minimum value from the list of numbers and display the result.
6. Compute maximum of list of numbers
You will find the maximum value from the list of numbers and display the result.
7. Exit program
You will display a meaningful message that the program is terminating and exit
the program.
After performing the above operations and printing the results, you will re-display the
menu and accept new user input, thus repeating the process (except in the case of
option 7 where the user wants to terminate the program).
You will perform needed error handling, such as attempting to perform an operation on
an empty list by displaying an error message instead of actually performing the
operation (see Sample Output).
You will use the appropriate data structure that supports being able to dynamically add
or remove numbers from the list, thus changing its size.
Your program will also be graded based upon your program style. This means that you
should use comments (as directed), meaningful variable names, and a consistent
indentation style as recommended in the textbook and in class.
Your code should be well documented in terms of comments. For example, good
comments in general consist of a header (with your name, course section, date, and
brief description), comments for each variable, and commented blocks of code.
Your program will be graded based largely on whether it works correctly on the CSE
machines (e.g., cse01, cse02,..., cse06), so you should make sure that your program
compiles and runs on a CSE machine. No regular or late credit will be given for any
program that does not compile and run on the CSE Linux servers.
See the Sample Output for questions on the programs expected behavior. You should
contact your instructor if there is any question about what is being asked for in this
programming assignment.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!