Choose an object for which you would like to write a


Choose an object for which you would like to write a program.

Use a UML diagram to design a class for the object.

Your class will have instance variables (properties) and methods.

There will be 3 instance variables. One instance variable will be of type String, one of type int, and another of type double.

Write getters and setters (accessors and mutators) for each of the instance variables.

Your program should also include a default constructor and a constructor that includes parameters. Both constructors will initialize each of the instance variables.

Create another class that includes main which tests the methods of the class. To do this you will create/instantiate 2 objects. The first object will be created/instantiated using the default constructor and the second using the constructor with parameters.

After each of the objects is created, use get methods to return and print the values stored in each object.

Next, use the set methods to change the values stored in the second object. Then use get methods to return and print the values stored in the object.

Be sure to include an algorithm for main.

Add javadoc comments to the class.

Solution Preview :

Prepared by a verified Expert
Business Economics: Choose an object for which you would like to write a
Reference No:- TGS02196417

Now Priced at $15 (50% Discount)

Recommended (95%)

Rated (4.7/5)