Module 7 Flashcards

(15 cards)

1
Q

Allows one class to inherit properties and methods from another class.

A

INHERITANCE

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

Allows a software developer to derive a new class from an existing one

A

Inheritance

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

Also called derived class or subclass

A

Child class

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

Also called Base class or Superclass

A

Parent class

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

A class that is used as a starting point for creating derived classes.

A

Base Class

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

A class that is created by inheriting properties and methods from a base class.

A

Derived Class

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

Inheritance promotes code reuse by allowing child classes to inherit properties and methods from a parent class. This can save time and effort by reducing the need to write redundant code.

A

Code reuse

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

This can help to organize and structure code, making it easier to understand and maintain.

A

Hierarchical relationships

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

Allows objects of different classes to be treated as if they were of the same class, which can lead to more flexible and extensible code.

A

Polymorphism

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

Inheritance can make code easier to maintain and update. If a change is made to a property or method in a parent class, the change will automatically be inherited by all child classes that use that property or method.

A

Easy maintenance

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

Inheritance can help to create a better design for software systems by promoting modularity and encapsulation. This can make it easier to understand and modify code, and can lead to more robust and scalable software.

A

Better Design

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

keyword is used to create a subclass that inherits properties and methods from a superclass

A

extend

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

a reference variable that is used to refer to the immediate parent class of a subclass. It is often used to call a method in the superclass that has been overridden by the subclass.

A

super

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

A feature of object-oriented programming where a subclass provides its own implementation of a method that is already defined in its parent class

A

Method Overriding

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

Is another feature of object-oriented programming where multiple methods can have the same name, but with different parameters.

A

Method overloading

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