Question: Question 1 Design a class named Car that contains . 6 data fields: make (String), model (String. colour(Strig.I Question 2 Write a test program that

 Question 1 Design a class named Car that contains . 6

Question 1 Design a class named Car that contains . 6 data fields: make (String), model (String. colour(Strig.I Question 2 Write a test program that Sets themarSpeed for crs to 22 in/h Creates a Car object with the default properties (L.e blu Creates a second Car object for a black Audi A3 with an Drives the Hyundai :30for 20km Refuels the Hyundai 130 fuel (double), odometer (int) and maxSpeed (int) Assume that all cars have the same maxSpeed (hint: make this a static variable) Hyundai 30 with 40 of fu A no-arg constructor that creates a blue Hyundai 130 with odometer value of 100km 40L of fuel. A constructor that creates a car with 55L of fuel and theDrives the Audi A3 for 175km specified make, model, colour and odometer value The getter and setter methods for make, model, colour, fuel, odometer and maxSpeed A method named refuel() that sets the fuel to 50L A method named drive) that increments the odometer by the specified distance and decrements the fuel at a rate of Prints the make, model,colour,fuel, odometer-and maxSpeed for the car with the greatest amount of fuel remaining model, colou, fuel, odometer value and . Prints the make maxSpeed for the car with the least amount of fuel remainin .51/100km

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!