[SOLVED] Programming Project #1: Simple Assignment Recorder

45.00 $

Category: Tags: , , , , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignmentrecorder-2pjnig.zip (11 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

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: <variable>  = <value>
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.

 

Sample output of a program run:

D:\>AssignmentRecorder

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: abc

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: 1

Please enter an assignment:
count * 3
Invalid assignment operator.

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 * 10
Invalid assignment operator.

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:
123 = 123
Invalid variable name.

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:
1count = 123
Invalid variable name.

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 = abc
The assignment value is not a number.

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 assignments.

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.
  • Assignmentrecorder-2pjnig.zip