Java and integrated GUI revision.

The class hierarchy I have sent you is in 4 files – These represent a program named CreditCard.

Methods have to be added to Class CreditCardFrame for all requirements to work.

The 4 classes are

Class Person – used to model a person

Class CreditCard – used to model a CreditCard

Class CreditCardTester – contains the main method for the prog to run.

Class CreditCardFrame – used to model a JFrame; The CreditCard selected from the JoptionPane input dialog box is passed into the constructor and is used to set up the curentCreditCard instance variable; currentCreditCard is displayed in the JFrame using a JLabel.

The required code is needed to be added to this (Class CreditCardFrame) frame to allow the user to work with currentCreditCard.

The options that have to be added, so the user can carry out on currentCreditCard form the frame are:-

makePurchase () - the user should be able to enter the purchase amount for currentCreditCard from the JFrame. This value must be passed into the makePurchase () method to increase the balance of currentCreditCard.

makePayment () – the user should be able to enter the payment amount for currentCreditCard in the JFrame. This value should be passed into the makePayment() method to decrease the balance of currentCreditCard.

changeCreditLimit() – the user should be able to enter a new credit limit in the JFrame. This value should be passed into the changeCreditLimit() method to change the creditLimit of the currentCreditCard. Include a security check on this operation so it can be only carried out if the correct password is entered.

The above are all methods in the attached class CreditCard file – The user must invoke these methods for currentCreditCard from the JFrame to get this to work.

Thank you

Michael Mc Auliffe