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
garri49 [273]
4 years ago
10

Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon) and a certai

n amount of fuel in the gas tank. The efficiency is specified in the constructor, and the initial fuel level is 0. Supply a method drive that simulates driving the car for a cartain distance, reducing the fuel level in the gas tank, and methods getGasLevel, to return the current fuel level and addGas, to tank up. Sample usage:
Car myHybrid = new Car(50); //50 miles per gallon
myHybrid.addGas(20); // Tank 20 gallons
myHybrid.drive(100); // Drive 100 miles
System.out.println(myHybrid.getGasLevel()); // Print fuel remaining.
Computers and Technology
1 answer:
nika2105 [10]4 years ago
8 0

Answer:

See explaination

Explanation:

class Car

{

private double drdist;

private double fuel;

private double mpg;

public Car(double m)

{

mpg = m;

fuel = 0;

}

public void addGas(double add)

{

fuel = fuel + add;

}

public void drive(double d)

{

drdist = drdist + d;

mpg = fuel * mpg / d;

}

public double getGasLevel()

{

return fuel;

}

}

public class Carfuel{

public static void main(String []args){

Car myHybrid = new Car(50); //50 miles per gallon

myHybrid.addGas(20); // Tank 20 gallons

myHybrid.drive(100); // Drive 100 miles

System.out.println(myHybrid.getGasLevel()); // Print fuel remaining.

}

}

You might be interested in
Compare the applications below:
Lubov Fominskaja [6]

Answer:

i think it is B

Explanation:

6 0
4 years ago
Read 2 more answers
13) When developing film, how do you dispose of fixer as opposed to developer?
MAVERICK [17]

Answer:

B) Developer is poured down the drain while fixer can be reduced

Explanation:

The effluents produced during photographic processing includes, wash water, bleach, fixer, and developer

The developer is an alkaline solution, with a pH of approximately 10.0, while the pH of the fixer is about 4.3, it is therefore, acidic

The rate of discharge of the developer to the fixer is 2 to 1, and the exhausted developer, fixer and process effluents combined are neutral and can be handle by the the treatment works and the drain pipes

Fixer which remain clear can be reused for more than a day, while the spent basic Developer and the acidic Spent Stop Bath can be combined to form a neutral solution, having a pH of approximately 7, which make them less hazardous to be disposed off down the sink into the drain

Therefore, <em>developer is poured down the drain while fixer can be reused</em>

6 0
3 years ago
What is the QOS model?
Andre45 [30]

Answer:

Quality Of Service

Explanation:

Technology that manages data traffic to reduce packet loss, latency and jitter on the network. QoS controls and manages network resources by setting priorities for specific types of data on the network.

5 0
3 years ago
Without this step of the problem solving process you might solve the wrong problem, not know where to start, or not know when yo
STatiana [176]
Prepare should be the answer
7 0
3 years ago
VLSI is the process of creating an integrated circuit (IC) by combing thousands of transistors into a single chip. There are two
Tanya [424]

Answer:

ASIC

Explanation:

Undoubtedly, it is the ASIC and not FPGA. The field programmable Gate Array is meant for general purposes, and ASIC is meant for Specific purposes. And here the application-specific condition holds. We need it for medium production of an image transformation, and this is like Bitcoin which is application-specific. And thus, the correct type of IC which we need in this case is the FPGA, And hence, FPGA is the correct option here.

3 0
4 years ago
Other questions:
  • A(n) monitoring vulnerability scanner is one that listens in on the network and determines vulnerable versions of both server an
    7·1 answer
  • Please Do Solve it guys...
    6·1 answer
  • The __________ utility has the capability to manage users, create and administer user groups, and apply user rights to those use
    8·1 answer
  • Beyond adding equations, what else does the Insert Equation feature allow users to do?
    7·1 answer
  • In what ways can you modify the location of the neutral point?
    11·1 answer
  • List and explain three computing devices from the 20th century​
    13·2 answers
  • Ssssssssssssssssssssssssssssssssssssssssssssssssss 100 points for this answer too.
    10·1 answer
  • python. create a program that asks the user to input their first name and their favorite number. Then the program should output
    12·1 answer
  • Ninety percent of the fastest-growing jobs require some kind of postsecondary education.
    7·1 answer
  • To stored three characters a computer occupies. Bytes memory space
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!