Question: C++ Homework Assignment: Define a class Transcript which stores a student's grades. Public and private inheritance is required. Member function insert() is used to add
C++ Homework Assignment: Define a class Transcript which stores a student's grades. Public and private inheritance is required. Member function insert() is used to add a record to the transcript, and member print() is used to write the records in the transcript to the console. Hint: Vectors can be used to store grades.
Transcript my_grades; my_grades.insert("Math 173", 4, 'A'); my_grades.insert("Physics 123", 4, 'B'); my_grades.print(); should output
Class Units Grade Math 173 4 A Physics 123 4 B
Use the class Record as described in class.
Requested files
Transcript.cpp
Record.h
1 #ifndef RECORD_H 2 #define RECORD_H 3 4 class Record { 5 Record(const std::string&, int, char); 6 std::string name; 7 int units; 8 char grade; 9 }; 10 11 #endif 12 Record.cpp
1 #include "Record.h" 2 3 Record(const std::string& n, int u, char g) 4 { 5 name = n; 6 units = u; 7 grade = g; 8 } 9 Transcript.h
main.cpp
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
