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
frozen [14]
3 years ago
6

Write your own SportsCar class that extends the Car class. This new class should have the following unique protected instance va

riables: myColor, MyEngine that stores its engine size in liters, mySuspension - e.g., firm, soft, touring, etc., and myTires - e.g., regular, wide, low profile, etc. To utilize this SportsCar class, add the following lines to the Driver class. Note that the last four parameters (
Computers and Technology
1 answer:
Rus_ich [418]3 years ago
8 0

Answer:

class SportsCar extends Car {

   

   protected String myColor;

   protected float myEngine;

   protected String mySuspension;

   protected String myTires;    

}

Explanation:

With the provided information the class can be written as above.

Create a class called SportsCar. Since it extends from the Car, you need to type extends Car after the class name. This implies that it is a subclass of the Car class.

Then, declare its protected variables:

a string called myColor that will hold the color,

a float myEngine that will hold the engine size

a string mySuspension that will hold the suspension type

a string myTires that will hold the tire type

You might be interested in
Identify three different meanings of the word "interface" in Java Programing language.
Mnenie [13.5K]

Answer: Interface methods, interface variables and interface markers.

Explanation:

Interface methods are public and abstract by default.

Interface variables can be declared public, static and final

Marker interfaces are simply empty interfaces without any methods.

7 0
3 years ago
Create a variable ‘temp’ and assign the value in Celsius. Display the message ‘It’s extremely hot day today!’ if the temperature
Svetlanka [38]

Answer:

temp = 47

if temp > 40:

   print("It’s extremely hot day today!")

else:

   print("It’s not too hot!")

Explanation:

*The code is in Python.

Create a variable called temp and set its value as 47

Check the temp using if-else structure. If the temp is greater than 40, print "It’s extremely hot day today!". Otherwise, print "It’s not too hot!".

8 0
4 years ago
In 1–2 sentences describe the purpose of comparison operators and give an example.
love history [14]
Comparison operators are used to compare between objects!
are they equal?  is one greater than the other?

if (a == b) ++a;
if (a > b) a = b;

for example when we use a sort function, comparison operators are used inside the function.

7 0
3 years ago
Después de un incidente de seguridad del cliente, el equipo realiza un análisis en profundidad de cada paso dado por los atacant
klio [65]

Explanation:

Respuesta al incidente

5 0
3 years ago
An ink-jet printer is a type of impact printer. <br> a. True <br> b. False
Mumz [18]
The answer is: false it is not a impact printer
6 0
3 years ago
Other questions:
  • Write in general about ergonomic injuries and also mention the symptoms that computer users exhibit when they experience these s
    11·2 answers
  • 38. Which of the following best describes why e-mail spoofing is easily executed? a. SMTP lacks an adequate authentication mecha
    15·1 answer
  • Without ____, a bus network would suffer from signal bounce.
    6·1 answer
  • When you select a state abbreviation from a combo box, how does the form control record your selection?
    8·1 answer
  • Suppose that TCP's current estimated values for the round trip time (estimatedRTT) and deviation in the RTT (DevRTT) are 400 mse
    9·1 answer
  • Suppose you have the following declaration.char[] nameList = new char[100];Which of the following range is valid for the index o
    7·1 answer
  • marco wants to create a heading that is bold and italic to make it really stand out on his webpage. he's typed in the code
    12·2 answers
  • Draw at least 15 fabric/garment care labels on a piece of paper to be submitted the following week
    5·1 answer
  • Identify the technique to free up the CPU by allowing device controllers to independently transfer data between the device and m
    7·1 answer
  • What does the term attenuation mean in data communication?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!