Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IS-A is a inheritance relationship Car IS-A Vehicle. That is definitly inheritan

ID: 3536974 • Letter: I

Question

IS-A is a inheritance relationship
Car IS-A Vehicle. That is definitly inheritance.

HAS-A is a compostion relationship
Car HAS-A SteeringWheel That is composition obviousely.

Car and Boat have no relationship.
They are both derived from Vehicle, but one is not derived from the other
and one is not made up of the other so say there is no relationship

FOR EACH OF THE RELATIONSHIPS, IDENTIFY WHICH RELATIONSHIP YOU ARE DISCUSSING
BY GIVING ITS PART NUMBER. THEN LIST ONE OF THE THREE POSIBLE ANSWERS:
INHERITANCE
COMPOSITION
NO RELATION.

A) BRUSH, BRISTLES
B) BRUSH, TOOTHPASTE
C) MICROSCOPE, LENS
D) RICE, BROWN RICE
E) TRYCYCLE, VEHICLE
F) BANANA, MANGO
G) BRUSH, PAINTBRUSH
H) BUILDING, SCHOOL
I) COMPUTER, MOUSE
J) TRICYCLE, SPEED
K) BANANA, FRUIT
L) SHAPE, PENTAGON
Please explain which is the Base class and which is the derived class in each case.
IS-A is a inheritance relationship
Car IS-A Vehicle. That is definitly inheritance.

HAS-A is a compostion relationship
Car HAS-A SteeringWheel That is composition obviousely.

Car and Boat have no relationship.
They are both derived from Vehicle, but one is not derived from the other
and one is not made up of the other so say there is no relationship

FOR EACH OF THE RELATIONSHIPS, IDENTIFY WHICH RELATIONSHIP YOU ARE DISCUSSING
BY GIVING ITS PART NUMBER. THEN LIST ONE OF THE THREE POSIBLE ANSWERS:
INHERITANCE
COMPOSITION
NO RELATION.

A) BRUSH, BRISTLES
B) BRUSH, TOOTHPASTE
C) MICROSCOPE, LENS
D) RICE, BROWN RICE
E) TRYCYCLE, VEHICLE
F) BANANA, MANGO
G) BRUSH, PAINTBRUSH
H) BUILDING, SCHOOL
I) COMPUTER, MOUSE
J) TRICYCLE, SPEED
K) BANANA, FRUIT
L) SHAPE, PENTAGON
Please explain which is the Base class and which is the derived class in each case.

Explanation / Answer

A) BRUSH HAS BRISTLES COMPOSITION, both base classes
B) BRUSH, TOOTHPASTE NO RELATION, both base classes
C) MICROSCOPE HAS LENS COMPOSITION, both base classes
D) BROWN RICE IS-A RICE INHERITENCE, RICE-Base class and BROWN RICE- Derived Class
E) TRYCYCLE IS-A VEHICLE INHERITENCE, VEHICLE-Base class and TRYCYCLE- Derived Class
F) BANANA, MANGO NO RELATION, both base classes or both derived classes (of same superclass like Fruit)
G) PAINTBRUSH IS-A BRUSH INHERITENCE, BRUSH-Base class and PAINTBRUSH- Derived Class
H) SCHOOL HAS-A BUILDING COMPOSITION, both base classes
I) COMPUTER HAS-A MOUSE COMPOSITION, both base classes
J) TRICYCLE, SPEED NO RELATION, both base classes
K) BANANA, IS-A FRUIT INHERITENCE, FRUIT-Base class and BANANA- Derived Class
L) PENTAGON IS-A SHAPE INHERITENCE, SHAPE-Base class and PENTAGON- Derived Class
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote