subject

Create a class called Drive. It should have instance fields miles and gas which are both integers. Another instance field, carType, is a String. The constructor should receive a String which initializes carType. The other two instance fields are both automatically initialized to 1 in the constructor. Create a method called getGas that returns an integer that is the gas data member. The getGas method has no parameters. Write in java. First correct answer will be marked brainliest, i need answer very soon

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 24.06.2019 20:10
Approximately what portion of global employers tends to use social media websites to hire new employees?
Answers: 1
You know the right answer?
Create a class called Drive. It should have instance fields miles and gas which are both integers. A...
Questions
question
Mathematics, 13.10.2019 01:30
question
Mathematics, 13.10.2019 01:30
Questions on the website: 13722363