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 floatingpoint numbers.
Program Requirements:
As with all projects in this course, your programs output will display your name, your
EUID, your email 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:
Display numbers in list
Add number to list
Remove number from list
Compute average of list of numbers
Compute minimum of list of numbers
Compute maximum of list of numbers
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 ie not an
integer between and inclusively your program will display an error message and
redisplay the menu.
If the user enters an integer between and inclusively, then your program will
perform the requested operation as follows:
Display list of numbers
You will display all of the numbers in the current list.
Add number to list of numbers
You will prompt for and read in a floatingpoint 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.
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 Project
Due: : PM on Sunday, February
of
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 ie the last number in the list was removed from the
list of numbers.
Compute average of list of numbers
You will compute the accurate average of the list of numbers and display the
result.
Compute minimum of list of numbers
You will find the minimum value from the list of numbers and display the result.
Compute maximum of list of numbers
You will find the maximum value from the list of numbers and display the result.
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 redisplay the
menu and accept new user input, thus repeating the process except in the case of
option 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 eg cse cse cse 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
