This is the Assignment:
Given the following declaration for a TestScore class, write a derived class declaration called IDScore that adds an integer student ID number as a private member, and that supplies (1) a constructor whose parameters correspond to the three member fields, and (2) an observer that returns the ID number.
class TestScore
{
public:
TestScore(string name, int score);
string GetName() const;
int GetScore() const;
private:
string studentName;
int studentScore;
};
Write the implementation file for the TestScore class in Exercise 1. The constructor just assigns its parameters to the private data members, and the observers simply return the corresponding member.
Write the implementation file for the IDScore class in Exercise 1. The constructor just assigns its parameters to the private data members, and the observer simply returns the corresponding member.
Write the specification file for a class called Exam that uses composition to create an array of 100 objects of class IDScore as defined in Exercise 1. The class can use the default constructor, and it will have a function that assigns an IDScore object to a location in the array, given the object and the location as parameters. The class should also have an observer that returns the IDScore object at the position specified by its parameter.
Write the implementation file for class Exam as defined in Exercise 4.
Make Exam have the unsorted list functionality that will add an item of type IDScore to the data it is storing at the next available location. Note: you should add a variable called length that specifies the size of the list and will also be used for placing the next item.
In your main function:
Create 3 variables of type TestScore. Ensure that you can create variables of this type and correctly output the values they were initialized with.
Create 3 variables of type IDScore. Ensure that you can create variables of this type and correctly output the values they were initialized with.
Create a variable of type Exam that will have values that are loaded from a file and have those items added to the list of exam scores it is storing. Print the contents of the exam class after each addition.
Upon completion, save all programs and the required output into a single Word document (.docx). Then submit to the Blackboard (Bb) as attachment by the deadline. The submission link on the Bb will be closed automatically after the deadline. Assignments that fail to follow the instructions will NOT be graded.
This is what I got so far
#ifndef __CLASS_IDScore
#define __CLASS_IDScore
#include "TestScore.h"
class IDScore : public TestScore
{
public:
IDScore();
IDScore(int ID, string name, int score);
int GetID();
void Print();