Object-Oriented Programming [Java] UPDATED ACTUAL Exam
Questions and CORRECT Answers
Coupling - Degree to which one component must directly access the data of another component.
Roles - Sets of Responsibilities
Roles vs. Objects - They are the same when a given role is always played by the same object
type.
Software Components - Reuse of code (e.g. Visual Basic, JavaBean)
Frameworks - Reuse of "plug-in" code (e.g. Java Swing)
Design Paterns - Reuse of Design
Agile Software Development - A philosophy of software development that embraces flexibility
and agility. The design "evolves".
3 Means of Object-Object Access - - Parameter Passing
- Object declared in method
- Object is a member of another object through composition [subtype]
Is-a Relationship - Describes an inheritance relationship between two classes
Has-a Relationship - The relationship demonstrated by a class that contains another class.
, Uses-a Relationship - Implemented-In-Terms-Of Relationship
Static Members - Known as "class variables", because there is only one unique value for all the
objects of that same class.
This - Special reference that refers to the object in which it is used.
Super - Special reference that refers to the superclass of the object in which it is used.
Liskov Substitution Principle - Determine whether a subclass is a subtype
Protected Access - No outside classes can use this data field, except descendant classes. Defeats
the purpose of OOP.
Upcasting - Type cast to the type of an ancestor class. Is usually done automatically.
Downcasting - Type cast to the type of a descendant class; may cause runtime errors.
Interfaces - A purely abstract class. Can only contain constants and method signatures.
Marker Interface - An interface with no methods or fields
Use Case Diagram - UML diagram that captures all actors (an individual or another system) and
use cases involved with a system or product. Used to model user requirements.
Use Case - Functional requirement of a system as a sequence of steps.
Questions and CORRECT Answers
Coupling - Degree to which one component must directly access the data of another component.
Roles - Sets of Responsibilities
Roles vs. Objects - They are the same when a given role is always played by the same object
type.
Software Components - Reuse of code (e.g. Visual Basic, JavaBean)
Frameworks - Reuse of "plug-in" code (e.g. Java Swing)
Design Paterns - Reuse of Design
Agile Software Development - A philosophy of software development that embraces flexibility
and agility. The design "evolves".
3 Means of Object-Object Access - - Parameter Passing
- Object declared in method
- Object is a member of another object through composition [subtype]
Is-a Relationship - Describes an inheritance relationship between two classes
Has-a Relationship - The relationship demonstrated by a class that contains another class.
, Uses-a Relationship - Implemented-In-Terms-Of Relationship
Static Members - Known as "class variables", because there is only one unique value for all the
objects of that same class.
This - Special reference that refers to the object in which it is used.
Super - Special reference that refers to the superclass of the object in which it is used.
Liskov Substitution Principle - Determine whether a subclass is a subtype
Protected Access - No outside classes can use this data field, except descendant classes. Defeats
the purpose of OOP.
Upcasting - Type cast to the type of an ancestor class. Is usually done automatically.
Downcasting - Type cast to the type of a descendant class; may cause runtime errors.
Interfaces - A purely abstract class. Can only contain constants and method signatures.
Marker Interface - An interface with no methods or fields
Use Case Diagram - UML diagram that captures all actors (an individual or another system) and
use cases involved with a system or product. Used to model user requirements.
Use Case - Functional requirement of a system as a sequence of steps.