Problem

Write the implementation file for class Exam as defined in Exercise 4.Exercise 4Write the...

Write the implementation file for class Exam as defined in Exercise 4.

Exercise 4

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.

Exercise 1

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;};

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT