Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a class called StudentInfo . It should have member variables for the following information: Student Name (text) Student ID number (12 characters) Major (e.g.,

Design a class called StudentInfo. It should have member variables for the following information:

Student Name (text)

Student ID number (12 characters)

Major (e.g., Computer Science, Business, etc)

Write appropriate member functions to store and retrieve information in the member variables above. The constructor should dynamically allocate enough memory to hold the student name. The destructor should release the memory.

Design another class called StudentGradeInfo. This class should be derived from the StudentInfo class. It should have member variables for at least the following information:

Test grades (The class should hold up to 10 grades)

Test average

Write appropriate member functions to store and retrieve information in the member variables above. I would suggest a member function to allow the addition of one grade at a time to Test grades.

The == operator should be overloaded to allow a comparison of two student ID numbers to see if they are equivalent. The << operator should be overloaded to output, neatly formatted, the information associated with a student, including the computed test average.

To demonstrate the classes above, create a class to maintain a GradeBook. The class should allow information on up to 50 students to be stored. Your GradeBook class should at least support operations to Add a student record to the book (i.e., the book entries do not have to be stored in alphabetical order), and to Sort by Student ID number and display all student records (all info associated with a student) in the GradeBook. To add a student to the book, the user should not have to specify a position, (i.e., the GradeBook should keep track of the last position and add to the end automatically).

You should write a main program that creates a grade book and presents a menu to the user that allows them to select either Add (A), or List (L), or Quit (Q). Add should allow the user to enter a student record (name, ID, major, and grades) and add it to the Gradebook list if the ID does not already exist in GradeBook. Do not accept input test scores less than 0 or greater than 100 (i.e., no extra credit). List should list, sorted by ID number, all student records currently in the grade book. You should be able to add and list repeatedly until you select Q to quit.

Use good coding style and principles for all code and input/output formatting. All data in a class must be private. Put each class declaration in its own header file and its implementation in a separate .cpp file. Submit all the .h and .cpp files you create, along with your executable.

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

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

2. List the advantages of listening well

Answered: 1 week ago

Question

Comment on the pH value of lattice solutions of salts.

Answered: 1 week ago

Question

3. What are potential solutions?

Answered: 1 week ago