Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives: Solve problem, design solution and implement using C++ Learn how to use basic C++ constructs and manipulate C++ string class Handle different types of

Objectives: Solve problem, design solution and implement using C++ Learn how to use basic C++ constructs and manipulate C++ string class Handle different types of input errors Description: Write a menu-driven program named "SimpleAssignmentRecorder" that will provide following menu to record user's input assignments: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. Exit - "Enter a new assignment" option will read in one simple assignment in the form: = such as: count = 10 or total = 0 It will format and print out the assignment with proper spacing. - "Show the largest assignment" option will display the largest assignment that has been entered so far - "Show all assignments" option will print out all entered assignments Requirements: 1. The program must produce the same expected output as provided. 2. Array or vector or list class is not allowed. This is an assignment using string, stream, stringstream and functions. Simple variables and string concatenation will be sufficient to solve this problem. 3. There should be no global variables. Please use only local variables and parameters instead. 4. You must define and use at least 5 functions including main() in your program 5. There must be at least one function using pass-by-reference parameters 6. Scanf and printf are not allowed (Please use C++ cin and cout and C++ formatting) 7. Handle invalid menu options such as negative or too big or even alphanumeric such as "abc" 8. When there is no assignments available, it should display the informational message of "There is no assignment." 9. Please handle invalid menu value that is not between 1 and 4. 10. For simplicity, you can assume that the user will enter the assignment correctly with spaces. D:\>SimpleAssignmentRecorder Welcome to assignment recording program. Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 0 Invalid selection. Please try again. Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 5 Invalid selection. Please try again. Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 2 There is no assignment. Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 3 There is no assignment. Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 1 Please enter an assignment: count = 10 count = 10 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 2 The largest assignment: count = 10 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 3 All assignments: count = 10 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 1 Please enter an assignment: total = 20 total = 20 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 2 The largest assignment: total = 20 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 3 All assignments: count = 10 total = 20 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 1 Please enter an assignment: quantity = 5 quantity = 5 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 2 The largest assignment: total = 20 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 3 All assignments: count = 10 total = 20 quantity = 5 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 1 Please enter an assignment: score = 100 score = 100 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 2 The largest assignment: score = 100 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 3 All assignments: count = 10 total = 20 quantity = 5 score = 100 Assignment Menu: 1. Enter a new assignment 2. Show the largest assignment 3. Show all assignments 4. exit Enter your option: 4 Thank you. Goodbye. !! important !! the code should not be using array, vector, and list class use string, stream, stringstream and fuctions

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 And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions