Add two more files to mortgage calculator program mortgage


Add two more files to Mortgage calculator program. Mortgage calendar Class and Mortgage array Class.

Total files to send back: Driver, Mortgage Calculator, Row, Mortgage calendar, Mortgage array.

Mortgage calendar Class: This should increment in day and month and year. Start with 15JUL04 as the first pay period then increment every 30 days so the next payment is 15AUG04.

Example that does not work:

Public MortgageCalendar()
{

Public string. Getdatestring(){
Date format formatter=getFormat.get date_instance()
String retString = formatter.format(current date)
Ret retString();
}
Calendar rightNow = Calendar.getInstance();

Public long getdatedifference(){
Date previousDate= this.currentDate;
advanceDate();
long diff = this.currentDate-this.previousDate;
long days=diff/1000*60460*24
return days();
}

Public void advance date();{
Int month=calendar.get(calendar.month);
MONTH++;
Now.set(calendar.month, month)
Current day=now.getTime();

get string to row and mortgagecalculator
}

Mortgage Array Class: Should display 3 mortgage loans: 7 years 5.35%, 15 years at 5.5% and 30 year at 5.75%. Use an array for the different loans. Display the mortgage payment amount for each loan. Do not use a graphical user interface. I am using NETBEANS compiler. Insert comments in the program to document the program.

Example that does not work

Public class MortgageArray{

Public int terms;
Public double rate;
Public double amount;
public toString()
}

Public Mortgage int interms, double inrate, double inAmount(){

Terms=interms
Rate=inrate;
Amount=inamount;
}

Public class driver{
Mortgage m1 = new Mortgage (7, .053, 200000)
Mortgage m2 = new Mortgage (15,.055, 200000)
Mortgage m3 = new Mortgage(30,.057,200000)

Mortgage []test=new mortgage[3]
Test[0] = m1;
Test[1] = m2;
Test[2] = m3;

For(i=0;iTestcalculator
Setterm(test[i].terms)
Setrate(test[i].rate)
Setamount(test[i].amount)
Testcalculator.calculatemonthlypayment()
Format the string and print the string

OTHER INSTRUCTIONS:
Driver Class should include: Mcalc=getdatedifference

Solution Preview :

Prepared by a verified Expert
Operating System: Add two more files to mortgage calculator program mortgage
Reference No:- TGS01252871

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)