Introduction to object oriented Flashcards
Which of the following is considered as a state of an object?
Question 1Answer
A.
10
B.
calculatePrice()
C.
price
C.price
Which technique is used for structured programming?
Question 2Answer
A.
Divide and conquer
B.
Object-oriented
C.
Top down design
C.Top down design
Objects in an object-oriented software collaborate and work together by sending _______ to implement the behaviour of the software.
Question 3Answer
A.
information
B.
messages
C.
parameters
B.
messages
Other than state, what does an object have?
A.
behaviour and identity
B.
behaviour and message
C.
class and message
A.
behaviour and identity
What is the difference between object oriented programming and structured programming?
Question 5Answer
A.
Object-oriented programming focuses on object orientation while structured programming focuses on algorithmic solutions.
B.
Object-oriented programming focuses on algorithmic solutions while structured programming focuses on object orientation.
C.
Object-oriented programming focuses on top-down design while structured programming focuses on bottom-up design.
A.
Object-oriented programming focuses on object orientation while structured programming focuses on algorithmic solutions.
Encapsulation
This encapsulation is achieved through information hiding where the implementation information is hidden from the knowledge of the client.
The objects attributes are usually encapsulated too. The encapsulated attribute is hidden from the client. Therefore, the attributes value also cannot be accessed by
the client (whether it is reading or changing the value).
Sending Message
An object communicates with other objects using the message-sending
mechanism.
Class
is the template or blueprint that enables the creation of an object.
for example class is like a car factory to create an object car.
Inheritance
An object category can be further refined into subcategories
Static
The static characteristic of a system is essentially the structural aspect of the system. The static characteristics define what parts the system is
made up of.
Dynamic
This is the behavioural features of a system. For example, the ways a system behaves in response to certain events or actions are the
dynamic characteristics of a system.