0
How do I modify my current program to incorporate objects, classes and inheritance?
How do I modify my current program to incorporate objects, classes and inheritance? https://code.sololearn.com/c9ZcyW0icRel/#cpp
1 Antwort
+ 1
Classes hold related data and functions (methods). Classes just hava atleast one responsibility, for example managing data. If it just holds data and has a few functions you might want to change it to a struct.
For inheretence you have a class MotorVeichle. You can create a class such as Car and have it extend MotorVeichle
Hope this helps