# Now, you will create additional classes that represent the different components of a car - the engine,

###### Question:

Now, you will create additional classes that represent the different components of a car - the engine, the fuel tank, the wheels, etc. These classes should have methods related to their behaviors, and properties representing their various states (an engine is running or not, tires have levels of wear, etc). 1. Every class representing a car part should inherit from a superclass called "CarPart." The CarPart class will have at least the following states and behaviors:
2. condition - an integer that represents the remaining durability of the part (starts at 100, goes down to 0 when the part is broken)
3. status() - a method that prints the condition of the part to the console.
4. The CarPart class should also implement a Functional interface, which declares a method "function()".
5. Each subclass of CarPart should have at least one state unique to that part (like the number of cylinders in an engine, or the fuel level of a fuel tank). Each subclass should also implement the inherited function() method to print a unique message to the console that incorporates the variables unique to that class. The CarPart subclasses should not define unique methods, unless those methods are called from their overriden function() or status() methods.
6. Make sure that your Car class creates an instance of each CarPart subclass, as part of its constructor. These instances should be added to a collection of CarPart reference variables.
7. The run() method of your Car class should iterate through the Car's collection of CarPart references, which stores the instances of the CarPart subclasses. On each iteration, the function() method of the current object in the collection should be invoked.

### When migration time was getting close, what changes started happening that told the birds it was time to go south or west? Use

When migration time was getting close, what changes started happening that told the birds it was time to go south or west? Use evidence from the chapter to support your thoughts. frightful...

### What might have happened to perseus if he had not received from the gods?

What might have happened to perseus if he had not received from the gods?...

### 47 is the sum of 24 and craigs savings

47 is the sum of 24 and craigs savings...

### What type of positive business message does this paragraph convey?I’m the head of the human resources department at XYZ Technology. My company wants

What type of positive business message does this paragraph convey? I’m the head of the human resources department at XYZ Technology. My company wants to hire a manager for the research division. The candidate should have at least five years of experience in ceramic technology. If it is convenient...

### Which the exception of some sponges, all animals )coelomates b)autotrophs c)heterotrophs d)hermaphrodites

Which the exception of some sponges, all animals )coelomates b)autotrophs c)heterotrophs d)hermaphrodites...

### Study the image. a house on a beach near the ocean. point 1 is over the house, arrow is pointing up.

Study the image. a house on a beach near the ocean. point 1 is over the house, arrow is pointing up. point 2 is over the ocean, with arrows pointing away from the land. point 3 is over the ocean with the arrow pointing down. point 4 is in the ocean with arrows pointing toward land. what do the arrow...

### Purple (P) is dominant to white (p) in pea plants. Draw a punnett square cross between two heterozygous purple flowering plant.

Purple (P) is dominant to white (p) in pea plants. Draw a punnett square cross between two heterozygous purple flowering plant....

### Given: f(x) = 6x - 10 Evaluate 11

Given: f(x) = 6x - 10 Evaluate 11...

### I need help with this plz

I need help with this plz $I need help with this plzzzzz$...

### Find the inequalities from their graphs ​

Find the inequalities from their graphs ​ $Find the inequalities from their graphs ​$...

### How much money was spent on the 2016 presidential election?

How much money was spent on the 2016 presidential election?...

### An aquarium tank holds 169 gallons of water. how much is this in liters? use the following conversion:

An aquarium tank holds 169 gallons of water. how much is this in liters? use the following conversion: 1 gallon is 3.8 liters....

### I need some help here...

I need some help here... $I need some help here...$...

### Why is el nido is beautiful to visit?​

Why is el nido is beautiful to visit?​...

### Explain each in at least one sentenceStep 1: Evaporation. The water cycle starts with evaporation. ...Step 2: Condensation.

Explain each in at least one sentence Step 1: Evaporation. The water cycle starts with evaporation. ... Step 2: Condensation. ... Step 3: Precipitation. ... Step 4: Transpiration. ... Step 5: Runoff. ......

### What happen if there is an increase of free hydrogen ion in the mitochdrin

What happen if there is an increase of free hydrogen ion in the mitochdrin...

### Asolution of 10% dextrose in water is hypertonic to human blood. what would happen if you were to infuse

Asolution of 10% dextrose in water is hypertonic to human blood. what would happen if you were to infuse a patient with this solution?...
Hey can anyone pls pls pls help em out in dis rq i will mark u as brainliest $Hey can anyone pls pls pls help em out in dis rq i will mark u as brainliest$...