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
Roger has lived in his house for a few decades. He's noticed that, when it rains a great deal, the ground near his house appears
finlep [7]

Explanation:

when water is applied too quickly, it puddles or runs off before being absorbed. possibility for plants that grow in them are particularly at risk of diseases and other problems that result from overwatering.

5 0
3 years ago
Why are northern states usually colder than southern states
Fynjy0 [20]
The northern states are farther away from the equator
4 0
3 years ago
Read 2 more answers
Which is the correct answer?
Ber [7]
Answer: B

explanation:
8 0
3 years ago
Why does the government regulate the economy?
mixer [17]

Answer:

They create the “rules of the game” for citizens, business, government and civil society.

7 0
2 years ago
A(n) _____ is an act that, when committed by a juvenile, is considered illegal and grounds for possible state custody, but the s
Valentin [98]

Answer: status offense

Explanation:

According to juvenile cases,a "status offense" refers to those conduct that when they are commited by a minor they become criminal act but when committed by an adult are not regarded as criminal acts.

These are actions that would violate the law if an under age person commit them.

Types of Status Offenses

The status offenses differ from state to state but they are most prevalent ones:

- Under age alcohol consumption

- Skipping school

- Breaking county curfew

- possession of drugs by a minor

- Underage smoking

- Rebellious and running away from home

Warning can be given to the child to prevent future deviant behavior depending on the intensity of the offense committed.

8 0
3 years ago
Other questions:
  • ____ involves doing whatever you can to make sure the positive risk happens.
    12·1 answer
  • What was the cause of civilization developing a division of labor
    14·1 answer
  • Keisha's family consists of her mother, her father, and Keisha. For Keisha, this is her family of:
    13·1 answer
  • Porque brainly en ingles no es tan activo como el de español?<br> :v
    15·2 answers
  • What is the definition of Dynastic Rule??
    5·2 answers
  • It is estimated that roughly 80% of Eastern European face unhealthy levels of air pollution. Which of these would be LEAST likel
    5·1 answer
  • Cecil is preoccupied with thoughts of jumping out the window of his tenth-floor apartment. In order to reduce his anxiety, he fr
    12·1 answer
  • Which were the states that secede?​
    14·1 answer
  • Social and cultural factors influence cognitive development according to which theorist?
    12·1 answer
  • Write a poem or short song that could be put to music to reflect some important aspect of your town, school, or of Arkansas.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!