Question: Java 8th Edition Joyce Farrell Creating class name lease with feels that whole an apartment tenant name, apartment number, monthly rent amount, in terms of

Java 8th Edition Joyce Farrell

Creating class name lease with feels that whole an apartment tenant name, apartment number, monthly rent amount, in terms of the lease in months. Include a constructor that initializes the name toXXX, the apartment number 20, the rent to 1000, and the term to 12. Also methods to get and set each of the fields. Include a nonstatic method name addPeteFee() that asked $10 to the monthly rent value and call a static method named explainPetPolicy() that explains the pet fee. Say the class as Lease.java. Create a class name TestLease who main () method declares for lease objects. Calls a getData() method three times. Within the method, prompt the user for values for each feel 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 values for the fourth lease object, but let it continue to hold the default values. Then in the main() past one of the Lease objects to showValues() method that displays the data. Then call the addPetFee() method using the passed Lease object and confirmed that the fee explanation statement is displayed. Next, call the showValues() method for the lease object again and confirmed that the pet fee has been added to the rent. Finally call for showValues() method with each of the other three objects; confirm that two holes the values you supplied as input and one holes the constructor values. Say the application as testLease.java.

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!