Question: I have this assignment i need help with. It should be written in C++. the main is already given. I need: Question and NAquestion classes
I have this assignment i need help with. It should be written in C++. the main is already given. I need: Question and NAquestion classes must be separated in a .h file (header), and a .cpp (source code). Quiz class must be in a .h file (header) only.
main code:
#include
int main() { Quiz
ptrNAq = new NAquestion("..."); exam.question(0, ptrNAq); ptrNAq = new NAquestion("..."); exam.question(1, ptrNAq); ptrNAq = new NAquestion("..."); exam.question(2, ptrNAq); ptrNAq = new NAquestion("..."); exam.question(3, ptrNAq); ptrNAq = new NAquestion("..."); exam.question(4, ptrNAq);
exam.startAttempt(); }




Question class Create a class for a question. Question -text: string -points: int +setText(string): void +getText() const: string +setPoints(int): void +getPoints() const: int +display() const: void +Question() +Question(string) For information about members which are not described here, see Assignment 3's description. The private variable points stores how many points are assigned to the question. The default and minimum value is 1. This variable accessor and mutator are getPoints and setPoints, respectively. Numeric-Answer question class Create a derived class for a numeric-answer question from the question base class. Use public as the access specifier for the inheritance. NAquestion -correctAnswerMin: float -correctAnswerMax: float +setCorrectAnswer(float,float): void +getCorrectAnswer Min() const: float +getCorrectAnswerMax() const: float +isCorrect(float) const: int +NAquestion() +NAquestion(string,float,float,int) +operator+(const int value): int -operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
