Win a copy of Rust Web Development this week in the Other Languages forum!

Stacey Axe

Greenhorn
+ Follow
since Apr 17, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stacey Axe

The Account class code was given to us by our instructor to be used for the BankAccount class.  I understand that when the amount is input into the withdraw that it should return the account balance minus the amount of the withdraw and with the deposit amount is input it should add to the current balance and return the new balance.  I am just having trouble understanding java at all.  Part one of this class dealt with Python and I was able to understand it, but Java is stumping me.  I cannot seem to comprehend it.  I need the withdraw and deposit buttons to accept user input and return the correct balance.
4 years ago
I am struggling trying to finish an assignment in my beginner programming class.  We have to create a bank account gui.  The Account.java file was supplied to us for use within the BankAccount.java file.  I have been able to get the BankAccount program to compile, but I don't fully understand what I need to have in the actionPerformed to make sure that both the withdraw and deposit work correctly.  As of now, it does have fields to input withdraw and deposit amount but the buttons do nothing.  Could someone assist me in being able to get this to work properly?
The description of the assignment is:

Design, implement, and test a GUI for the Account class which represents a bank account.  Your GUI should display the account information (account number, name, and balance) of an Account object (instance) with suitable labels. In addition, it should provide inputs and buttons to make deposits and withdrawals, add interest, and quit from the program, by calling the appropriate methods of the Account object.  Note that the withdraw method of the Account class requires two arguments: the amount withdrawn, and a withdrawal fee. You get to make a policy decision here, by setting the fee. You could decide the fee will be zero, or a small positive amount (say, 10 cents).  Your account GUI class should have a reference to an Account object, which provides the data to be displayed and on which it operates when making deposits, withdrawals, etc. You will need to modify the Account class, adding accessor methods for some private fields.








   
     
4 years ago