Hello,
I've a question: I'm doing a project that permit to book a table in a certain restaurant. I have 4 classes: one final_user that is the main class; derived from this there are: client, restaurateur and administrator. My professor said that I have to implement also multiple inheritance but I don't know which connection could exist between 2 of these classes: client, restaurateur and administrator. Do you have some advices? Thanks in advance
But it sounds like you can have a base class (user) which has all the common methods and attributes e.g. id, username, pw, user_type, char get_user_type(), etc.
Then extending the base for the different connection functionality
restaurateur can be an administrator too.
in the programm they are completely different. I know that is difficult to explain what I need but I'm searching a connection between ( for expample) restaurater and client ( that derived from final_user) that permit me to create a new class ( so I realize multiple inheritance that I have necessarly to include because my professor expect to use) that do something. Obviously can be added also an other class ( derived from final user) and combine it with client, restaurater or admin) which permit what I said in the first lines of this post.
The major problem is that it seems a forcing but I'm oblige to implement it otherwise the professor has one reason to reject me and I would avoid gladly.