Guys for question 5 I would like to know is it correct to assume the following:
Language: C++ (QT)
class DVD:public QObject {
...
public
DVD(QString anID, QString aTitle, QString aPrice);
...
};
class Entertainment:public DVD {
...
public
Entertainment(QString anID, QString aTitle, QString aPrice, QString aType, QString aRating);
};
class Educational: public DVD {
...
public
Educational(QString anID, QString aTitle, QString aPrice, QString aSubject, QString aGradeLevel);
...
};
Note Entertainment and Educational are derived from DVD. Assuming my code above is correct...
Why does this line of code fail telling me that there is no such constructor for DVD
Language: C++ (QT)
DVD* dvd1 = new Entertainment("111", "Three Colours: Blue", 145.50, "Drama", "PG10");
I know this is not required for question 5... but I'm finding that as I write the code out that I am missing little gems of information all over. So any help would be appreciated. Thank you.