Question: 1. Write a class called CarLease which has 5 member variables: cost, residualValue, term, tax, rate This class should have a member method getPayment

1. Write a class called CarLease which has 5 member variables: cost, residualValue, term, tax, rate This

1. Write a class called CarLease which has 5 member variables: cost, residualValue, term, tax, rate This class should have a member method getPayment which returns the payment amount after calculating it using the following formula: 1. 1. depreciation = (cost - residualValue) / term interest = (cost + residualValue) * (rate) totalTax = (depreciation + interest) * tax leasePayment = depreciation + interest + total Tax Write a driver which: a. Read 5 inputs via the Scanner (Use the "Test Values") b. Declares/initializes CarLease object C. Outputs the payment using JOptionPane Test Values: Input (Scanner): Capitalized Cost = $25,000 Residual Value = $12,500 Term = 36 Months Tax = 7% Interest Rate = .0029 Output (JOptionPane): Lease Payment = $488

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem youll need to implement a class called CarLease and a driver program that uses this class Heres a stepbystep solution Step 1 Def... View full answer

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 Programming Questions!