1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lora16 [44]
2 years ago
7

Give an example of an IS-A (inheritance) relationship and a separate example of a HAS-A (composition) relationship within the fi

elds of either mathematics, biology, or engineering. The example should be different from one given in class. Explain why these are appropriate examples.
Social Studies
1 answer:
lord [1]2 years ago
4 0

Inheritance (is-a) relationships are derived child classes that inherit attributes and methods from their parent class. Composition (has-a) relationships are classes whose attributes are comprised of other classes. Each relationship has its advantages and disadvantages. See the link below for best uses of each.

For example:

class Animal { }

class Dog extends Animal { }

This means Dog IS-A animal

2. HAS-A simply means reference

For example:

class Nip { }

class Dog { private Nip nip;}

This means Dog HAS-A Nip

Hope this helped!! :)

You might be interested in
What was the main purpose of the declearation of Independence​
Sophie [7]
To declare independence and individual rights
7 0
3 years ago
Read 2 more answers
If you take aspirin while you are drinking alcohol you may feel
DochEvi [55]
Nausea, vomiting, and heart burn
8 0
3 years ago
Read 2 more answers
How are biogas plants useful?
m_a_m_a [10]

Biogas is a renewable, as well as a clean, source of energy. Biogas plants significantly curb the greenhouse effect: the plants lower methane emissions by capturing this harmful gas and using it as fuel. Biogas generation helps cut reliance on the use of fossil fuels, such as oil and coal.

7 0
3 years ago
According to celie, why do people exist?
maksim [4K]

Answer:

Existence as a person does not deny

Explanation:

6 0
2 years ago
Henry Ford was the first entrepreneur to implement which strategy?<img src="https://tex.z-dn.net/?f=Henry%20Ford%20was%20the%20f
Firlakuza [10]
He was the first to use the assembly line
6 0
3 years ago
Other questions:
  • A consequence that brings about an increase in the frequency of a behavior is a(n) _____; a consequence that decreases the frequ
    12·1 answer
  • The shared life style of a _________ may revolve around leisure activities, diet, friendships, and even amount of time dedicated
    8·2 answers
  • Of the eastern Asian countries on the map south of china which has no coastline?
    11·1 answer
  • According to galileo, why is the search for truth important
    13·1 answer
  • Venue refers to the primary subject matter of a case at trial.<br> A. True<br> B. False
    13·2 answers
  • What is a​ prisoners' dilemma?
    6·1 answer
  • Why are Federal Judges appointed for life?
    9·1 answer
  • Roy tells his friends Helen and Joe about the dream he had. He dreamed that trains were zooming into tunnels and rockets were fi
    15·1 answer
  • One reason Maya's parents have stricter rules than her friends' parents is
    10·2 answers
  • A person with an extremely high count of neutrophils is likely suffering ________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!