Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The last ss is how the output is supposed to look in java Programming Project 4.3 (100 points), or 4.5 (105 points) or 4.8 (100

image text in transcribedimage text in transcribed

image text in transcribed

The last ss is how the output is supposed to look in java

Programming Project 4.3 (100 points), or 4.5 (105 points) or 4.8 (100 points) on page 186-187 in the eText book. Must have two constructors, one accepts nothing and another overloaded constructor that accepts parameters. Must have the accessor and mutator methods for each instance variable, and the toString method, besides the other methods required by the project description in the book. Must test ALL (the two constructors, the accessors and mutators for each variable and the other methods if there is any) methods explicitly in the driver class's main method with at least two objects. tra Credit (10 points): In the Driver class, create an array of five objects of the class you have created. Use a for loop to display the five objects first. Then test all methods using the objects in the array and finally print out each object using a for loop again. PP 4.5 Write a class called car that contains instance data that represents the make, model, and year of the car. Define the Car constructor to initialize these values. Include getter and setter methods for all instance data, and a toString method that returns a one-line description of the car. Add a method called isAntique that returns a boolean indicating if the car is an antique (if it is more than 45 years old). Create a driver class called CarTest, whose main method instantiates and updates several car objects. Sample output for the Car project: 1 Problems Javadoc Declaration Console X CarTest [Java Application) C\Program Files\Javaljdk-12.0.2\bin\javaw.exe (Sep 28, 2019, 412:59 PM) Below is displayed the make, model, and year for all cars Car 1: Make: Model: Year: Car 2: Make: Model: Year: 0 Car 3: Make: Model: Year: 0 Car 4: Make: Pontiac Model: GTO Year: 1970 Car 5: Make: Nissan Model: Altima Year: 2019 The make for car 1 has changed to: Cadillac The model for car 1 has changed to: Eldorado The year for car 1 has changed to: 1959 The make for car 2 has changed to: Chevrolet The model for car 2 has changed to: Camaro The year for car 2 has changed to: 1970 The make for car 3 has changed to: Honda The model for car 3 has changed to: Civic The year for car 3 has changed to: 2008 The make for car 4 has changed to: Ford The model for car 4 has changed to: Mustang The year for car 4 has changed to: 1967 The make for car 5 has changed to: Toyota The model for car 5 has changed to: Camry The year for car 5 has changed to: 2016 Is Car 1 an antique (more than 45 years old)? true Is Car 2 an antique (more than 45 years old)? true Is Car 3 an antique (more than 45 years old)? false Is Car 4 an antique(more than 45 years old)? true Is Car 5 an antique(more than 45 years old)? false Below is displayed the make, model, and year for all cars Car 1: Make: Cadillac Model: Eldorado Year: 1959 Car 2: Make: Chevrolet Model: Camaro Year: 1970 Car 3: Make: Honda Model: Civic Year: 2008 Car 4: Make: Ford Model: Mustang Year: 1967 Car 5: Make: Toyota Model: Camry Year: 2016

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions