• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Bank application

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am creating a bank application where it is possible for the user to deposit or withdraw money. I have to create three classes. The first one should just implement the class "account", the second one should test the methods in the class "account" using a main-method. The actual banking application is created in the third class.

I am really not sure if I am on track, could you please take a look and give me some tips?
private.png
[Thumbnail for private.png]
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How the other classes look like?
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please copy'n'paste your code rather than using screenshots.
Please use proper names for the variables: number please rather than nbr.
Don't use the double datatype for money. Either use longs and denominate the money in cents/pence, or use BigDecimals. For more information look at this discussion and the two links in the post that appears first.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please omit the two setXXX() methods. It should only be possible to change the balance in an account by putting money in (depositcredit()) or taking money out (withdraw()).
reply
    Bookmark Topic Watch Topic
  • New Topic