Coursera-Object-Oriented-Design Flashcards
What does UML stand for?
UML stands for the Unified Modelling Language.
What does CRC card stand for?
CRC card stands for class responsibility collaborator card.
Is a conceptual design more detailed than a technical design?
The technical design builds on the conceptual design and the technical will include more details than the conceptual design.
Name four major design principles in object-oriented programming.
Four of the major design principles in object-oriented programming are abstraction, encapsulation, decomposition, and generalization.
What does abstraction do?
Abstraction hides away low level details and results in a simplified description or procedure.
What does encapsulation do?
Encapsulation will bundle attributes and behaviors in a virtual capsule and restrict what parts that can be accessed from the outside of the capsule.
What does decomposition do?
Decomposition takes a whole thing and breaks it down into different smaller parts.
What does generalization do?
Generalization identifies parts that are shared between two or more objects and breaks out these part to reduce redundancy.
What are the three types of relationships in decomposition?
The three types of relationships in decomposition are, association, aggregation, and composition.
What is association in object-oriented programming.
Association is a weak relationship between objects. The objects will have a “using” relationship, but will otherwise have their own life time, and there is no owner object.
What is the symbol used for association in UML?
The symbol for association comes in two variants in UML. If a class is aware of the other class but not the other way around so is the symbol an open arrow from the class that is aware. If both classes are aware of each other so can the arrow head be omitted and the simply becomes a simple line, this last version is also sometimes symbolized by an double sided open arrow.
What is aggregation in object-oriented programming?
Aggregation is a relationship between objects where a whole has parts that belongs to it, it’s a “has-a” relationship. Aggregation is a weak relationship in the sense that the parts can exist without being part of the whole, and vice versa.
What is the symbol used for aggregation in UML?
The UML symbol for aggregation is an arrow with an unfilled diamond shaped head. The arrow points towards the whole, so for example if we have a Car and a Wheel class so would there be an arrow pointing from the Wheel to the Car class.
What is composition in object-oriented programming?
Composition is a relationship between objects where a whole has parts that belong to it, it’s a “has-a” relationship. Composition is a strong and exclusive relationship between objects, the whole cannot exist without the parts, and vice versa.
What is the symbol used for composition in UML?
The UML symbol for composition is an arrow with a filled diamond shaped head. The arrow points towards the whole, so for example if we have a House and a Room class so would there be an arrow pointing from the Room to the House class.
What is inheritance in object oriented programming?
Inheritance is a mechanism in which one class acquires the property of another class. For example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields and methods of the existing class.
What is the symbol used for inheritance in UML?
The UML symbol for inheritance is an arrow with with a unfilled triangle shaped head. The arrow points from the child class towards the parent class. The convention is that the parent class shall be placed above the child class and the arrow will hence point upwards.