Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

im looking for good example of OOP class structure. Means containing base class with properties, methods and so on - mostly I carry out to Properties - something like Animal class or Shape but more complex that lets say:

Automobile(Base) -> Car (inheriting from Automobile) -> Nissan (inheriting from Car)
-> Motorbike (inheri from Automobile) -> Hayabusa (inheriting from Motorbike


and now completely different class (not inheriting from any of above) let's say:


Engine (class) which would take e.g Nissan and Hayabusa to compare check power of speed by taking their properties, fields

What I want to achive is I would like to see how properties should be implemented over different classes beginning from base class. Could anyone give such example?
Posted

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you have a specific question, then feel free to ask about that, or post up your idea of a good structure and we will be willing to critique it for you. But we aren't about to do it for you ready for you to hand in!
 
Share this answer
 
There are hundreds of C# tutorials to be found on the internet, or you could go direct to http://msdn.microsoft.com/en-gb/vstudio/hh341490.aspx[^].
 
Share this answer
 
 
Share this answer
 
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900