Write a menu-driven C++ program to manage your college course history and plans, named as you wish. It should work something like this:  Array size: 0, capacity: 2 MENU A Add a course L List all courses C Arrange by course Y arrange by Year U arrange by Units G arrange by Grade Q Quit ...your choice: a[ENTER] Enter a courses' name: Comsc-165[ENTER] Enter the year for Comsc-165 [like 2020]: 2016[ENTER] Enter the units for Comsc-165 [0, 1, 2,...]: 4[ENTER] Enter the grade for Comsc-165 [A, B,..., X if still in progress or planned]: x[ENTER] Array size: 1, capacity: 2 MENU A Add a course L List all courses C Arrange by course Y arrange by Year U arrange by Units G arrange by Grade Q Quit ...your choice: a[ENTER] Enter a courses' name: Comsc-110[ENTER] Enter the year for Comsc-110 [like 2020]: 2015[ENTER] Enter the units for Comsc-110 [0, 1, 2,...]: 4[ENTER] Enter the grade for Comsc-110 [A, B,..., X if still in progress or planned]: A[ENTER] Array size: 2, capacity: 2 MENU A Add a course L List all courses C Arrange by course Y arrange by Year U arrange by Units G arrange by Grade Q Quit ...your choice: l[ENTER] Course Year Units Grade ---------- ---- ----- ----- COMSC-165 2016 4 X COMSC-110 2015 4 A Array size: 2, capacity: 2 MENU A Add a course L List all courses C Arrange by course Y arrange by Year U arrange by Units G arrange by Grade Q Quit ...your choice: q[ENTER] Requirements Allow for course names up to 12 characters in length, like Comsc-150sql. Convert course names and grades entries to uppercase as they are inputted. Allow units to be whole numbers or floating point, per your choice. Allow grade to be a single char (like A, B, etc) or a string (like A+, B-, etc), per your choice. Use a dynamic array of objects to store the course information, with an initial capacity of 2. Double the array capacity when (a) you have a new object to add, and (b) size equals capacity. The output table should have nicely-spaced column headings. Output the array size and capacity along with the output table. Output blank lines to separate blocks of text as modeled in the sample output above.  Serialize using a binary file named courses.dat.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question

Write a menu-driven C++ program to manage your college course history and plans, named as you wish. It should work something like this: 

Array size: 0, capacity: 2
MENU
A Add a course
L List all courses
C Arrange by course
Y arrange by Year
U arrange by Units
G arrange by Grade
Q Quit
...your choice: a[ENTER]

Enter a courses' name: Comsc-165[ENTER]
Enter the year for Comsc-165 [like 2020]: 2016[ENTER]
Enter the units for Comsc-165 [0, 1, 2,...]: 4[ENTER]
Enter the grade for Comsc-165 [A, B,..., X if still in progress or planned]: x[ENTER]

Array size: 1, capacity: 2
MENU
A Add a course
L List all courses
C Arrange by course
Y arrange by Year
U arrange by Units
G arrange by Grade
Q Quit
...your choice: a[ENTER]

Enter a courses' name: Comsc-110[ENTER]
Enter the year for Comsc-110 [like 2020]: 2015[ENTER]
Enter the units for Comsc-110 [0, 1, 2,...]: 4[ENTER]
Enter the grade for Comsc-110 [A, B,..., X if still in progress or planned]: A[ENTER]

Array size: 2, capacity: 2
MENU
A Add a course
L List all courses
C Arrange by course
Y arrange by Year
U arrange by Units
G arrange by Grade
Q Quit
...your choice: l[ENTER]

Course Year Units Grade
---------- ---- ----- -----
COMSC-165 2016 4 X
COMSC-110 2015 4 A

Array size: 2, capacity: 2
MENU
A Add a course
L List all courses
C Arrange by course
Y arrange by Year
U arrange by Units
G arrange by Grade
Q Quit
...your choice: q[ENTER]

Requirements

  1. Allow for course names up to 12 characters in length, like Comsc-150sql.
  2. Convert course names and grades entries to uppercase as they are inputted.
  3. Allow units to be whole numbers or floating point, per your choice.
  4. Allow grade to be a single char (like A, B, etc) or a string (like A+, B-, etc), per your choice.
  5. Use a dynamic array of objects to store the course information, with an initial capacity of 2.
  6. Double the array capacity when (a) you have a new object to add, and (b) size equals capacity.
  7. The output table should have nicely-spaced column headings.
  8. Output the array size and capacity along with the output table.
  9. Output blank lines to separate blocks of text as modeled in the sample output above. 
  10. Serialize using a binary file named courses.dat.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning