Principles of Object Oriented Flashcards

1
Q

Why do we need real-world objects in our software projects?

A. They make the code run faster.

B. They help automate business processes by representing business-related entities.

C. They reduce the cost of hardware.

D. They are required for all programming languages.

A

B - They help automate business processes by representing business-related entities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In object-oriented programming, what is an object?

A. A reusable function.

B. A thing or entity with its own identity.

C. A type of loop.

D. A programming error.

A

B - A thing or entity with its own identity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the process of creating an object from a class called?

A. Inheritance.

B. Compilation.

C. Instantiation.

D. Abstraction.

A

C - Instantiation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In the provided example, “Ahmad” and “Husain” are:

A. Classes.

B. Methods.

C. Instances of the Employee class.

D. Properties.

A

C - Instances of the Employee class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a class in object-oriented programming?

A. A template or blueprint for objects.

B. An individual object.

C. A type of variable.

D. A programming language.

A

A - A template or blueprint for objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What do all objects have?

A. Attributes only.

B. Behaviors only.

C. Both attributes and behaviors.

D. Neither attributes nor behaviors.

A

C - Both attributes and behaviors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In code, what is an object’s attribute referred to as?

A. Method.

B. Property.

C. Class.

D. Type.

A

B - Property.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In code, an object’s behavior is referred to as a:

A. Property.

B. Type.

C. Method.

D. Variable.

A

C - Method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does OOAD stand for?

A. Object-Oriented Application Development.

B. Object-Oriented Analysis and Design.

C. Object Operation and Data.

D. Object-Oriented Algorithm Development.

A

B - Object-Oriented Analysis and Design.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why is it important to review the design before writing any code in OOAD?

A. To ensure the code runs faster.

B. To decide on the programming language.

C. To verify that the design satisfies the project requirements.

D. To allocate budget for the project.

A

C - To verify that the design satisfies the project requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which of the following languages is an example of an object-oriented programming language?

A. C#

B. C

C. Assembly

D. HTML

A

A - C#

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In object-oriented programming, what is referred to as a “Type” in code?

A. The object’s name.

B. The object’s method.

C. The object’s property.

D. The object’s class.

A

D - The object’s class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the main goal of Object-Oriented Analysis and Design (OOAD)?

A. To create faster algorithms.

B. To analyze and design a system from an object-oriented perspective.

C. To eliminate the need for objects.

D. To simplify database management.

A

B - To analyze and design a system from an object-oriented perspective.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which statement is true about classes and objects?

A. Objects are blueprints for classes.

B. Classes are instances of objects.

C. Classes come after objects.

D. Objects are instances of classes.

A

D - Objects are instances of classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why are objects considered reusable components?

A. They can be used across different programs without modification.

B. They are deleted after use.

C. They are only used once in a program.

D. They cannot be altered once created.

A

A - They can be used across different programs without modification.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly