Question: code in java please!!!!! Problem 1| Define the class Car that includes the following members: Data fields (properties): o Integer data field named year which

code in java please!!!!! code in java please!!!!! Problem 1| Define the class Car that includes

Problem 1| Define the class Car that includes the following members: Data fields (properties): o Integer data field named year which stores the year of production. String data field named brand to store the brand of the car. o Integer data field named maxSpeed that stores the maximum speed of the car. Methods: A no-arg constructor that sets the year property to the current year, brand to "BMW", and maxSpeed to 180 A constructor that takes three arguments and sets the data fields accordingly. A void method named printCar that displays the data fields of this object in a format of your choice A method named getYear that returns the year of production of the invoking object. A method named getBrand that returns the brand of the invoking object. A method named getMaxSpeed that returns the maximum speed of the invoking object. A method named set Year that takes one argument and return no value. The method sets year to the taken argument. A method named setBrand that takes one argument and return no value. The method sets brand to the taken argument A method named setMax Speed that takes one argument and retum no value. The method sets maxSpeed to the taken argument. Create the test class TestCar to test the class Car and sketch the UML class model of the class Car. The UML should be submitted either as an image or a word file

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!