OOP REVIEW Flashcards
Describe the general process through which superclasses are created
• Superclasses are created through the process called "generalization“ Common features (methods or variables) are factored out of object classifications (ie. classes). Those features are formalized in a class. This becomes the superclass The classes from which the common features were taken become subclasses to the newly created super class
What is the purpose of superclasses
Often, some superclass do not have a "meaning" or does not directly relate to a "thing" in the real world • It is an artifact of the generalization process • Because of this, abstract classes cannot be instantiated. They act as place holders for abstraction
Draw a UML showing the relationships between the abstract superclass vehicle and car and track
*See notes for UML
Write code to show how an abstract class employee can be made and inherited
*See notes for code
Struct and classes are present in the C++ programming language. What is the main
difference between struct and classes in the C++ programming language?
A structure is a collection of variables of different data types with the same name. A class in C++ is a single structure that contains a collection of related variables and functions. The struct keyword can be used to declare a structure