213k views
4 votes
When presented with two classes that have a parent-child relationship, you can tell which class is the base class and which is the derived class by using the two classes in a sentence using what phrase?

User Usersina
by
5.2k points

1 Answer

4 votes

Answer:

ClassA extends ClassB

Step-by-step explanation:

When presented with two classes that have a parent-child relationship, we can tell which class is the base class and which is the derived class by using the two classes in a sentence using the extend phrase.

For Example:

ClassA extends ClassB

In this example, the first class that is ClassA is the derived class as it comes before the extend keyword. While the second class that is ClassB is the parent class as it comes after the extend keyword.

Extend keyword shows that ClassA is extended with ClassB features.

User KiwiJuicer
by
6.6k points