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
What is a right guaranteed by the Texas Bill of Rights but not explicitly guaranteed in the U.S. Constitution
Juli2301 [7.4K]
The Texas Bill of Rights prohibits the garnishment of wages except for court-ordered child support, whereas the U.S. Constitution does not.
4 0
3 years ago
What date is the independence of the United States?
Lady_Fox [76]
July 4, 1776

Hope this helps. :)
4 0
3 years ago
Read 2 more answers
Freddy has been sucking his thumb for a few weeks. His parents would prefer him to use a pacifier, so they begin to offer one, b
Serjik [45]

Answer:

Correct answer: Stage One.

Explanation

Psychologist Jean Piaget presented that humans encounter four steps of cognitive, or mental, evolution, beginning from the day they  born  to all the way into adulthood.

The first stage is when the child begins the cognitive development. It is called sensorimotor. During this stage, kids start to underestand and interact with the world using their senses and movements. This period can last two years.

4 0
3 years ago
A group of high school students are upset with the new dress code implemented by the school district. in response, they created
Dmitry [639]
I believe the answer is :<span>could neither discipline the students over the paper nor demand the right to review future copies under Hazelwood v. Kuhlmeir.

The 'underground' newspaper that made by the students Are NOT considered as school property since they published it without using school property.
Under the result of </span><span>Hazelwood v. Kuhlmeier , such actions are protected by the free speech clause on the first amendment, so the students have the full right to spread the paper as they please.</span>
3 0
3 years ago
_______ refers to when a test that predicts outcomes, such as grades or occupational success, better in one group than in anothe
Kobotan [32]
Test bias refers to when a test that predicts outcomes, such as grades or occupational success, better in one group than in another
7 0
3 years ago
Other questions:
  • Michael works as a financial advisor in a doctor’s office. The two organizations that Michael most likely belongs to are the
    14·2 answers
  • The song "you oughta know" references which personal experience?
    13·1 answer
  • Which sentence would BEST support the information in the paragraph?
    9·2 answers
  • A _____ is an informal communication network that involves numerous people in an organization sharing information with some of t
    6·2 answers
  • Ramona has lost her interest in gardening, which brought her joy in the past. she's lost her appetite and life seems hopeless. w
    6·1 answer
  • (1) One reason students should get low prices is because it is an educational place. (2) It helps students learn things they wil
    14·1 answer
  • What are your two biggest weaknesses as a student? How do these affect your readiness to be a self-directed learner?
    8·1 answer
  • Mark tells his friend that scientists can prevent earthquakes and hurricanes from happening, and his friend says he is wrong, an
    10·1 answer
  • The city of timbkto was known for?
    14·1 answer
  • (West Meets East: The Collapse of an Empire MC)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!