Share
Explore BrainMass

JAVA PROBLEM: MORTGAGE CALCULATOR MODIFICATION If possible for ota 104485

ADDED CHANGES NEED FOR PROBLEM AND INCREASED BID TO 15.
Also, the program should not except a neg number.

1. Modify the ScheduleDialog.java to have a button panel that will save the output to a file, read and display file content, and clear the text area:

Write a class DataIOException.java that implements Throwable;

Write an Interface called Amortization TableInterface that retrieves data for the amortization table.
The interface should provide the functions
Public Row[] getData() throws DataIOException;

Write a concrete class called Amortization TableInterfaceImpl that implements these functions, by reading and writing the Row[] to a file and from a file, via the getData and setData interface functions

CHANGE: Place class in UTIL and remove DATA file..
Store the Interface, Exception and concrete class in the package src.calculator.data

2. Modify the ScheduleDialog.java:
-class to include a new JPanel for the buttons, similar to the one in the main GUI
-add three buttons, clear, save, read
-have the ScheduleDialog., implement action listener

Write the actionPerformed function to interrogate the Event object and determine which button is responsible for the event and call one of three functions: readSchedule(), saveSchedule(), clearView().

Make sure that the clear and the write buttons are disabled if there is no content in the display and enabled if there is content.

Try and catch for DataIOException and upon error, report the Error to the user via a JoptionPane using the ERROR_MESSAGE and DEFAULT_OPTION constants provided by the JoptionPane class

3. Modify the MortgageDisplayGui.java:

Include a member of the Amortization TableInterfaceImpl tableInterface.

Add a new constructor to the MortgageDisplayGui to accept the tableInterface

Public MortgageDisplayGui(Amortization TableInterfacelmpl tableInterface)

LAST MINUTE CHANGES:

so in MortgageDisplayGui

1. create another in the class

JButton dataButton;

2. in the init() functions

dataButton = new JButton("Data");

3. in the actionPerformed(ACtionEvent ev);

//add another if statement when checking buttons
if( == dataButton)
{
viewData()
}

4. write a viewData() functions that

pubic void viewData(){

// use the scheduleDialog variable to just set the dialog visible.
// the dialog should appear with a blank field and your 3 buttons
scheduleDialog.setVisible(true);
}

Attachments

$2.19