Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.







 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
reply
    Bookmark Topic Watch Topic
  • New Topic