Computer Science Homework Solutions
Problem
#23346

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);
          }




Attached file(s):
Attachments
src.zip  View File
Modify mortgagecalculator.doc  View File

Attachment Content Summary (Note: view attachment at the above link before purchasing. Actual attachment content may vary slightly from that shown below.)

Modify mortgagecalculator.doc
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

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)



Create the exception

Write the interface

Implement the interface

Modify Schedule Dialog

Save, Read, Clear

Action Listener/ActionPerformed

New constructor

Create a variable AmortizationTableInterface

Initialize constructor

Rework MortgageDisplayGui

New constructor ( )

Enable the view button

Construct scheduleDialog with the interface

Drive

New implement

New MortgageDisplayGui constructor
Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$59.85)
Included in Download
  • Plain text response
  • Attached file(s):
    • src.zip
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Java Programming - I have a question about something that has puzzled me. I did this on my program because it was how I saw it done. I was wondering if someone could explain why it is done this way and if I would do ...
  • JAVA PROBLEM - Please help write a java program using a graphical user interface that accepts user input of the amount of the mortgage, the term of the mortgage and the interest rate of the mortgage and display the ...
  • Modified Mortgage Calculator Problem - PLEASE USED ATTACHED SRC.ZIP FILE Write an Exception class called MortgageInputexception.java. this class will inherit from the Exception.class in the java API. The exception should be packaged in ...
  • JAVA PROBLEM - Write a Java program using a graphical user interface accepts user input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage and display the payment Allow th ...
  • Programming > Java - Applet program that finds an inverse matrix Applet program that accepts a 2x2 matrix and finds its inverse matrix if any. It seems easy, but I am having a problem getting it to work.
Browse