• 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

Help with design and implementation on small project

 
Ranch Hand
Posts: 52
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

i have come up with a small project for myself (though i'm sure its been done before)

I want to develop an ATM machine application

So first of all the user is met with a mini menu screen

1) Create new account
2) login

if he presses 2 and no account has been created, it tells him there is no account created then takes him to the create new account area of the program
if he presses 1 it takes him to this:

enter first name
enter last name
enter birth date (in correct format dd/mm/yyyy)
enter address
enter user name (only up to 9 characters)
enter password
repeat password (they must match)
enter balance
then the computer generates an account number with the first two letters of the first name and the last two letters of the last name and 7 digits in between. (11 characters all together)

once an account has been created, the user can then go to login where they enter their username and password

once logged in

they have this menu

1) Check balance
2) Deposit funds
3) Withdraw funds
4) Check account details
5) Exit

and it obviously allows you to do those things and will reflect in the balance when you view it

Now this might seem very simple to a lot of you but I have never done anything on this scale, only simple invoicing programs for a hotel airline etc, and it wasn't even OOP it was one class and fairly simple.

what is the best way to approach this? is it complex enough to warrant diagrams and schematics etc?

I just want to tackle it one step at a time and get help till its finished and I can move onto another one.

I'm guessing the first thing I need to do is work out what classes I would need.

i'm thinking
UserAccount
BankAccount
MainProgram

but I could do with suggestions.

as always thanks for reading and looking forward to your input




 
Bartender
Posts: 2911
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that you need to share more code, maybe you can simply design the classes and their instance variables (omit setter/getters) and share them with us ?
Just stating the names of the class you are thinking is not clear with your intent.
You can also include at least the method names that show the various activities you plan to support in your application.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may also want a utility class for Scanner (or whatever way you get input from the keyboard).  And if you really wanted to be OO about it, you could develop a UserInterface class that (in this case) prints to the screen.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this simple project using Html, CSS, Servlets/JSP and MySQL!!! You can also use hibernate ORM framework for the database mapping if you want!

Also, you will have to use session tracking techniques like url-rewriting!
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not experienced at all but doesn't seem too difficult, just start coding, create the classes and the suitable methods and if you find any problem we are here !
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

warren brandt wrote:i have come up with a small project for myself (though i'm sure its been done before)
I want to develop an ATM machine application...


Well, you've definitely got the first step right: You haven't started coding. Well done!

And I mean that quite seriously.

You've managed what maybe 5% of beginners can - explain to a bunch of old farts like us (very well, I might add), what you want to do, without using a line of Java code to do it.
And THAT suggests to me that you're going to be a good programmer.

Everything that you've described so far could be done in a dozen computer languages, and that's good design.

But now you want to get down to the nitty-gritty. In Java.

My suggestion #1: Start with creating a new user account, and for the moment forget everything else. No point in logging in a user until they exist, right?

As for your classes: Instead of UserAccount, BankAccount, and MainProgram, what about User (or Customer), Account, and ATM?
Same basic idea, but maybe a bit more focused:
A User holds information for a user: Name, address, dob, password (or - usually better - its encryption), etc.
An Account holds financial information about a specific User: Account #, current balance, overdraft limit...
And the ATM - which will probably end up being your "main" program - holds all the stuff that an ATM needs to know about - Accounts, Users, and the like - and goes though its cycle once for each User who sticks a card in the slot.

I suspect you'll find you need a few more classes, but the ones you've got are fine to start with.

But stick to one thing at a time.
Get that Create User function working, and don't even think about logging them in until you have it working Every.Single.Time, no matter how bad the input is.
Then, once you can create a User and log 'em in, maybe create an Account for them.
Then, when (and only when) you can do all that, worry about that second menu.

Don't get me wrong. It's great that you have a plan of what you want to do; but don't get too far ahead of yourself, because aspects might change, or you might work out a better strategy, and you don't want to tie yourself down too much.

Hope it helps. and again: Well done so far.

Winston
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mentioned in despatches?

Congratulations For starting a thread quoted in the July 2019 CodeRanch Journal, you have been awarded a cow.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic