Q:

I was given an OOP project using SDL. I haven't used inheritance. What reason can i give to my evaluators

I took a course OOP. We were supposed to create a game in a group of 3. I worked on the menu part. Unfortunately, i didnt use inheritance and other OOP concepts. I DID use classes. What is the possible reason that i can give to me evaluators without having my marks deducted? My viva is tomorrow. (after 13 hours)
Thanks.

A:

It is a bit difficult to guess what you can say without knowing anything about your design (i.e. how the classes cooperate between each other), and there are a lot of "OOP concepts out there".
The only thing I can suggest you, assuming that you didn't declare every function of the other classes static, is to say that you did not use inheritance because composition is often (but not always) better. You have a composition if one member of you class is a class itself:
class Player
{
  private:
     Weapon gun;
  public:
     Player(Weapon& pistol);
     void shoot(){gun.bang();}
};

Gun is a composition: Player uses a Gun to shoot() and it is a perfectly legit use of a composition here. This is a case when you DON'T want to use a composition:
class MedievalFolk
{
  private:
     Knight arthur;
  public:
     Player(Knight& pistol);
     void duel(){arthur.duel();}
};

If you did something like this be prepared to be turned down, because there is no difference between a Knight and a MedievalFolk and you will need a better reason than "composition is better" here since this argument won't hold. Also, if you declared everything static then the only thing I can advise you is to rework your code not to do so. You would have just a glorification of old-fashioned procedural code (regardless of using classes) where everything is a function which calls other functions and, if I would be teaching a course on OOP, I would fail this coursework
I don't know what you are studying OOP for, but if you plan to get into software development I would strongly advise you to defer the examination and do your coursework properly, you won't be able to fix it all in a few hours not even professional can ressurect bad code in few days of work. Also there isn't a single employer that wish to hire a developer which is not proficient in OOP those days, unless you plan to work on ancient stuff of the 70s (and probably it still won't be sufficient). There is nothing wrong with taking a bit longer time if this makes you better

