Create an object structure called Mark that will be used to store information about a mark for various assignments, tests, etc. Use appropriate variable types to store:
The default constructor without arguments should set the assignment name to an empty string, the total to 1, the students mark to 0 and the weight to 1. The total and weight must be 1 to avoid dividing by zero.
An alternate constructor should use the assignment name, total, mark and weight.
Another alternate constructor should use just the assignment name, total and mark (the weight will default to 1).
Object methods should include:
Complete and print your object class before continuing.
Create a markbook app that allows a teacher to input up to 20 mark entries and calculate the overall average at any time. The app should use an array of 20 Mark objects to store the marks for a single student only. (Yes, this implementation isnt very practical.)
The user should be able to:
These functions should be written using methods as appropriate.
Example output: Main Menu
Main Menu (11 mark entries)
1. Calculate the current overall weighted average
2. List all entries and overall weighted average
3. New mark entry
4. Delete a mark entry
5. Update an existing mark
0. Exit
What would you like to do? ___
Example output: Current average
Student's current OWA is 84.3%
Example output: List all marks
Current Mark Entries
--------------------
1. Chapter 1 Assignment – Allow up to 40 ch 17.5 / 24 72.9%
2. Chapter 1 Test – Allow up to 40 characte 37.0 / 40 92.5%
...
10. Chapter 4 Activity – Allow up to 40 char 27.0 / 35 77.1%
Overall Weighted Average: 84.3%
Example output: New mark entry
New Mark Entry
--------------
Chapter 1 Assignment – Allow up to 40 characters
Enter the total mark: 24
Enter the student’s mark: 17.5
Enter the weight (default 1): _
Please check the mark entry:
Chapter 1 Assignment – Allow up to 40 ch
Student mark: 17.5 / 24
Weight: 1
Is this correct? Y
Example output: Delete mark entry
Delete Mark Entry
--------------------
1. Chapter 1 Assignment – Allow up to 40 ch
2. Chapter 1 Test – Allow up to 40 characte
...
10. Chapter 4 Activity – Allow up to 40 char
Which entry would you like to delete? 2
You have requested to delete the following mark entry:
Chapter 1 Test – Allow up to 40 characte
Student mark: 37.0 / 40
Weight: 4
Is this correct?
Example output: Update mark entry
Update Mark Entry
--------------------
1. Chapter 1 Assignment – Allow up to 40 ch
2. Chapter 1 Test – Allow up to 40 characte
...
10. Chapter 4 Activity – Allow up to 40 char
Which entry would you like to update? 10
Current mark entry:
Chapter 4 Activity – Allow up to 40 char
Student mark: 27.0 / 35
Weight: 1
Please input new student mark: 29
Other notes: