Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bank account gui using composition BankAccount and CPerson with array of 10

 
chris olejniczak
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is everything I have so far I don't know how to implement these two classes with the array of 10 and get them into the gui fields properly. If anyone can help I would appreciate it I tried asking my teacher for help and he really didn't give me a straight answer he talked me in circles.







 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have already built the GUI. What happens when you run it? You need to explain a bit more on what you need.

I also see frequent loops being used, but, you then refer to the array items with hardcoded index. In that case, you don't need the loop.
 
L Sankaranarayanan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two things you should do
STEP1 .You should instantiate an Account object at the beginning as shown below




STEP 2: Change actionListener method as follows




There is another easy way .We can define our business logic in the BankAccount class by writing a method


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic