Question: Someone please help me do this assignment ASAP thank you so much in advance. Review the resources included in the Explore section. Create a class

Someone please help me do this assignment ASAP thank you so much in advance.

Review the resources included in the Explore section.

Create a class named Lease with attributes that hold an apartment tenants name, apartment number, monthly rent amount, and term of lease in months. Include a constructor that initializes the name to XXXXX, the apartment number to 0, the rent to 1000, and the term to 12. Include methods to get and set each of the fields. Include a nonstatic method assPetFee() that adds $10 to the monthly rent value and calls a static method named explainPetPolicy() to explain the pet fee. Save the class as Lease.java.

Create a driver class named TestLease. In the main method, declare four Lease objects. Create getData() method and call it three times. Within the method, prompt a user for values of each attribute for a Lease, and return a Lease object to the main method where it is assigned to one of the main ()s Lease objects. Do not prompt the user for the values for the fourth Lease object, but let it continue to hold the default values. Create a showValues(Lease ls) method, which displays the data the Lease object passed to the method as a parameter. For Lease1 object, call the addPetFee() method using the passed Lease object, and confirm that the fee explanation statement is displayed. Next, call the showValues() method with each of the other three objects; confirm that three hold the values supplied by users input and one holds the constructor default values. Save the application as TestLease.java.

Use Scanner of JoptionPane as a tool to accept users input. Make your application user friendly, providing the proper prompts informing a user what input data is expected and what results are being shown when the application runs.

A sample of Scanner-based application output might look as shown below:

Someone please help me do this assignment ASAP thank you so much

Add the proper Header to the TestLease.java file. Do not forget to include the proper comments of the code statements in both .java files as internal code documentation. Create a UML class diagram of the application illustrating class hierarchy, collaboration, and the content of each class (include as a part of the MS .doc documentation below).

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!