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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education