• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Bank application

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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: 2266
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How the other classes look like?
 
Marshal
Posts: 71070
292
  • Mark post as helpful
  • send pies
  • 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: 71070
292
  • Mark post as helpful
  • send pies
  • 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