I'm sort of a begginer in classes.
I must implement a simple problem: chosing a phone.
I thought that I should make a program in which a user can select some conditions, like must have wifi or not, android or other, etc. and return a list with the phones that complies to those conditions. But that seemend a bit too booring and simple. So I asked my teacher how to make it better. He suggested to use a base class that inherits: a class for android smartphones, a class for iPhones, etc. Now this is a good idea but It's not mine so I thought if this kind of mechanism exists in c++ then why not make a class for each characteristic: a class for display -type, size, etc., a class for bodysize, weight, feature keys, etc. and a basic class Phone that inherits every one of the characteristic classes. So I starded typing code and then stopped and googled class inherintance. To my dissapointment it's not reccomended more than one inheritance and each base class must be used with a pointer in the derivate class. How can I implement this ideea of mine in a good form of code? In the first stage I will make just a simple console program, with a menu: a. Show all phones (from txt files at first) b. Compare 2 terminals c. Insert characteristics d. Administrative a.Add phone b.Remove phone c.View files etc.
sorry for the code tag
Edited 4 Years Ago by ogrishmania