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]
3 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]3 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
To become a citizen of the United States you must. A passed in English and government test. B feel the request form and a federa
zaharov [31]

The answer is A, have passed the English and Government Test

8 0
4 years ago
Plz help this is a test if its correct i will give u brain thing (this is VERY important)
Bess [88]

Answer:

diffusion

Explanation:

this should be right

7 0
3 years ago
Read 2 more answers
Which items were traded in the markets of East Africa?
Aneli [31]

Answer:

Traders on the eastern coast of Africa, many of them blacks, profited from a rise in trade with Asia, and from India the Africans imported silks, cottons and glassware. From the 1100s, Arabs began arriving in greater number in this coastal area. In the 1200s Mombasa became staunchly Muslim, and a Muslim dynasty was established at Kilwa.

Explanation:

7 0
3 years ago
All of the following have been identified as important personality traits for counselors to possess in order to be effective EXC
mars1129 [50]

Answer:

B

Explanation:

7 0
3 years ago
Question 8
Mazyrski [523]

Answer:

She now thinks Spencer is the perfect brother.

And that their father loves him more

5 0
3 years ago
Read 2 more answers
Other questions:
  • Attempting suicide may be a symptom of depression. Please select the best answer from the choices provided
    14·2 answers
  • What is the<br> difference between<br> a formal and an<br> informal<br> amendment?
    5·1 answer
  • What impact might local or domestic production have on global economic activity (think about our dependence on cheap products pr
    9·2 answers
  • What is the first step when performing a search on a captured detainee?
    6·2 answers
  • Dr. White reads about a new theory that states that depression is caused by increased levels of estrogen in the womb. To test th
    9·1 answer
  • Twenty-five-year-old Alexandra is mentally handicapped and can neither read nor write. However, after hearing lengthy, unfamilia
    10·1 answer
  • What was different on july 5th 1776
    5·1 answer
  • 1. In your own words, explain how Christianity spread.<br>2. Describe the 5 duties of a Muslim.
    12·1 answer
  • family life is happy because of coordination friendship and participation in each other members justify this statement​
    10·1 answer
  • What contributed to the Indian Wars of the West?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!