State what a class is | Defines the methods, properties and attributes of an object
Thing that creates a new object |
What is an attribute | Named data item in an object |
What is a method? | Is what defines the behavior of the objects that are created from the class |
Describe what an object is | Containers of both data and instructions
Formed from a class/ Object is an instance of classm |
What is encapsalation? | Restricting of direct access to some of an object's/ classes components |
Whats a programming paradigm? | Refers to the style of programming, not the language |
What is a constructor? | A method used to create a new object in a class |
What is instantiation? | Creating of an object |
What are the advantages of OOP? | Encapsulation reduces code complexity
Software maintenance is easy
Code can be easily reused
Multiple people can work on it at once, doing seperate parts of a project |
Define inheritance | one class to share the properties and methods of another class, while having its own properties and methods too |
What is the properties of an object with an agregated realtionship | Object can continue to exist after the aggregate object is destroyed |
What is the properties of an object which is a realtionship of the type composition | Object is destroyed after the related object is destroyed |
define Association | relationship between two classes |
What are the two types of association realtionships called | Composition
Agregation |
In the context of a class diagram how would one show composition? | A black diamond line |
In the context of a class diagram how would you show aggregation? | A white diamond line |
When discussing class diagrams how would you show a public class | + |
On the topic of class diagrams how would you represent a class being private? | - |
In OOP what is overriding? | Reimplementing the inherited parent classes methods |
In OOP what is composition? | Type of inheritence where if the parent class is destryoed so is the child |
What is the actual definition of polymorphism? | Polymorphism means to use something in different forms |
Can you explain what encapsulating what varies means and why it is used | If somethin changes in a program, if the concept in question is encapsulated in a single module, then only that module needs to be changed
Reduces maintance and testing effort |
What does 'programming to an interface' allow | Allows unrelated classes to make use of similar methods |
Why is the phrase 'favour composition over inheritance' used | Composition is more flexible |