Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question Part 1: The Lab6_Methods.java file contains instructions for completing

ID: 672490 • Letter: Q

Question

Question

Part 1: The Lab6_Methods.java file contains instructions for completing the lab. Specifically, you will create a program that can be used by a car dealer. In addition to the main method, the program will contain the following two methods: 1. Given the number of gallons of gas in the tank (entered in by the user) and a Miles per Gallon (MPG) rating for the vehicle, return how far the car can go before it runs out of gas. 2. Displays the Make, Model, Year and MPG (with only one decimal) of the car. Only display how far the car can go if the tank is NOT empty. Within the main method, add the following: 1. Hardcode the make, model and year of YOUR car (for testing purposes only) 2. Call your calculation method (Method #1). 3. Call your display method (Method #2).

Part 2: Add a method called getInput that reads in the gallons of gas from the user as a double, validates that the value is between 0-25 (inclusive), and returns that value back to main once it is valid. Your method will NOT return a value until it has been validated to be between 0-25 (inclusive). Comment the method as shown in the other two methods given. -Call this method from main.

please used this code and solve the problem please help my lfe

Explanation / Answer

functions:

funcMilesPerGallon()   {

}

funcMakeModelYear()   {

}

funcGetInput() {

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote