JAVA PROBLEM
Not what you're looking for?
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;i<test.length;i++){
Testcalculator
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
thanks.
Purchase this Solution
Purchase this Solution
Free BrainMass Quizzes
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Basic Networking Questions
This quiz consists of some basic networking questions.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.