Buscar
Estás en modo de exploración. debe iniciar sesión para usar MEMORY

   Inicia sesión para empezar

level: Object Oriented Programming

Questions and Answers List

level questions: Object Oriented Programming

QuestionAnswer
State what a class isDefines the methods, properties and attributes of an object Thing that creates a new object
What is an attributeNamed 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 isContainers 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 inheritanceone 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 realtionshipObject can continue to exist after the aggregate object is destroyed
What is the properties of an object which is a realtionship of the type compositionObject is destroyed after the related object is destroyed
define Associationrelationship between two classes
What are the two types of association realtionships calledComposition 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 usedIf 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' allowAllows unrelated classes to make use of similar methods
Why is the phrase 'favour composition over inheritance' usedComposition is more flexible