Object-Oriented Programming πŸŽƒπŸ‘»πŸ¦‡ Flashcards

1
Q

What is the one class that is not part of any other class?

A

Object. Object is a special class located in the package java.lang.

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

What class does toString() belong to?

A

Object class.

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

In an object-oriented programming language, it is possible to make β€œ β€œ of an existing class.

A

subclasses

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

What are the stages of the software life cycle?
Hint: Sam Always Does Coding Through D.Ms.

A
  1. Specification
  2. Analysis
  3. Design
  4. Coding
  5. Testing
  6. Debugging
  7. Maintenance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define the term Software Engineering

A

The systematic approach to programming, using accepted principles of good design.

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

Which term is used to represent the characteristics or properties of an object in OOP?

A

Attributes

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

In OOP, what is the purpose of the β€œthis” keyword?

A

To reference the current object within a method.

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

What is the significance of inheritance in object-oriented programming?

A

It enables the creation of subclasses that inherit characteristics from a parent class.

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

How are constructors used in object-oriented programming?

A

To initialize object attributes with predefined values

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

Which OOP concept allows a class to have multiple methods with the same name but different parameters?

A

Polymorphism

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

Which access modifier allows a class member to be accessed only within the same class?

A

Private

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

How does the concept of polymorphism contribute to code flexibility and extensibility in object-oriented programming?

A

Nope: It allows objects to inherit attributes and behaviors from other objects.

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