# Following the examples of listing 9.8 and 9.9 in Section 9.9 in the textbook, write a program in Java to compute the following properties of automobiles: average gas mileage, lowest price, the lates

Following the examples of listing 9.8 and 9.9 in Section 9.9 in the textbook, write a program in Java to compute the following properties of automobiles: average gas mileage, lowest price, the latest model. The program must have the following: A class named Automobile, One constructor function that initializes the model year only. A method to set the gas mileage and price for the object variables. Three separate methods to compute the results (average gas mileage, lowest price, latest model) and show the outputs. The Main function will stay in another class from where the constructors and all other methods will be invoked through three objects named: sedan, minivan, and truck.  Inputs are to be taken inside the Main function from the keyboard. The program will show the outputs on the screen.Sample Input (from keyboard):Enter the model year for sedan: 2012Enter the gas mileage for sedan: 35Enter the price for sedan: 20000Enter the model year for minivan: 2013Enter the gas mileage for minivan: 26Enter the price for minivan: 18000Enter the model year for truck: 2010Enter the gas mileage for truck: 21Enter the price for truck: 17000 Sample Output (on screen):Avg gas mileage: 27.33Lowest price: 17000Latest model: 2013Problem 1 (B) [5 points]: Following the example “Array of Objects” (attached to this assignment), modify the problem 1 (A) by creating an array of three objects. Rests of the functionalities, I/O, remain unchanged.Problem 2: Create a Person classFollowing the examples of listing 9.8 and 9.9 in Section 9.9 in the textbook, create a Person class that has private name and age fields (member variables). Both fields should have associated getter methods and should be set by a constructor when the object is created.Problem 2 (A) [5 points]: Following the examples of listing 9.8 and 9.10 in Section 9.10 in the textbook, create a new method (not in the Person class) that takes a Person and an age and prints a message indicating whether the person is at least that old.Sample Input:Person p1 = new Person (“Alice”, 23);checkage (p1, 17);Person p2 = new Person (“Trudy”, 47);checkage (p2, 50);Person p3 = new Person (“Jonathan”, 35);checkage (p3, 35);Sample Output:Alice is at least 17 years old!Trudy is not yet 50 years old.Jonathan is at least 35 years old!Problem 2 (B) [5 points]: Following the examples of listing 9.8 and 9.11 in Section 9.11 in the textbook, create a new method (NOT in the Person class) that searches through an array of Person objects and prints the name of the oldest one.

## Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
\$26
The price is based on these factors:
Number of pages
Urgency
Basic features
• Free title page and bibliography
• Unlimited revisions
• Plagiarism-free guarantee
• Money-back guarantee
On-demand options
• Writer’s samples
• Part-by-part delivery
• Overnight delivery
• Copies of used sources
Paper format
• 275 words per page
• 12 pt Arial/Times New Roman
• Double line spacing
• Any citation style (APA, MLA, Chicago/Turabian, Harvard)

# Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

### Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

### Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

### Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.