Question: Write a Class named IPhone to accompany the financial class case study from chapter 9 of our BJP text. Your IPhone Class shall implement the
Write a Class named IPhone to accompany the financial class case study from chapter of our BJP text. Your IPhone Class shall implement the Asset Interface, and meets the following specifications:
A Three data fields no more:
public static final double ANNUALDEPRECIATION ; fraction decline each year
private double originalCost; in US dollars, fixed for each object
private int currentAge; in years
B Two constructors: IPhoneoriginalCost currentAge and a zero parameter constructor that calls this:
C Methods required by Asset Interface:
market value that depreciates each year by amount given by ANNUALDEPRECIATION
profit that is market value minus original cost.
D toString method to allow printing an object similar to example below:
"IPhone years old
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
