Robert Posted December 3, 2006 Share Posted December 3, 2006 Need a little help with something, PM me if you can help Link to comment Share on other sites More sharing options...
Lucifer Posted December 3, 2006 Share Posted December 3, 2006 Script or Java? Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 just plain Java Link to comment Share on other sites More sharing options...
Lucifer Posted December 3, 2006 Share Posted December 3, 2006 Im semi Java compatable (!) rough outline of what the issue is? Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 Creating a bank account Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 here the full outline of whats needed: Write a program which implements classes Bank (abstract class), SavingsAccount, CheckingAccount with appropriate methods. When the user opens an account, the program will ask whether it is a checking account or a savings account. The user will enter either c or s to indicate a choice. If the user enters s, the program will ask for the annual interest for that account. The program should support commands for opening an account, selecting an existing account, depositing to an account, withdrawing from an account, closing an account. The commands can be given by the user, in response to a displayed text based menu, until the user selects to exit the command menu by pressing q (quit). The program should have two additional commands: r (write a check) and i (credit interest). The r command is similar to the withdraw command, except that it increments the number of checks written on the account. If the current account is not a checking account, the program should display the following message: Please select a checking account The i command credits one month of interest to each savings account, based on the interest rate for that account (checking accounts are not affected). The program should display information about the currently selected account, such as its number, its balance, the number of checks currently written for it (for a checking account) and its interest rate (for a savings account). Additionally, the user should be able to display all the accounts in descending order, according to their balances. I.e. the account with the greatest balance should be displayed first, the account with the second greatest balance should be displayed next, etc. Implement a test class which creates instances of all the implemented classes and tests their functionality. Link to comment Share on other sites More sharing options...
Lucifer Posted December 3, 2006 Share Posted December 3, 2006 Thats quite basic Stuff by the looks of it. Are you a programmer as this sounds like an OU piece of coursework. Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 ive written the code for the bank account,checking account,savings account and the tester, just need help with the I/O part Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 LOL this is a piece of coursework Link to comment Share on other sites More sharing options...
Lucifer Posted December 3, 2006 Share Posted December 3, 2006 LOL this is a piece of coursework What course ar eyou doing, I did my Doctorate and masters through OU. Link to comment Share on other sites More sharing options...
Robert Posted December 3, 2006 Author Share Posted December 3, 2006 Artificial Intelligence, 2nd year Link to comment Share on other sites More sharing options...
chilli Posted December 3, 2006 Share Posted December 3, 2006 hey I know Java like the back of my hand (along with C/C++/C#/VB) so I can help. but if you can be more specific with a particular problem, I 've not got the time to write the program for you I'm afraid. I did a post grad level 4 Java course with the OU, it was good Link to comment Share on other sites More sharing options...
Lucifer Posted December 3, 2006 Share Posted December 3, 2006 Artificial Intelligence, 2nd year REspekt! Link to comment Share on other sites More sharing options...
Snooze Posted December 3, 2006 Share Posted December 3, 2006 ive written the code for the bank account,checking account,savings account and the tester, just need help with the I/O part This sort of thing should cover you for rough-and-ready text entry menu system. public static void main(String[] args) { mainMenu(); } private static void mainMenu() { System.out.println("MAIN MENU"); System.out.println("1 - Option 1"); System.out.println("2 - Option 2"); System.out.println("Q - Quit"); String command = getInputCommand(); if (command.equalsIgnoreCase("1")) { option1method(); } else if (command.equalsIgnoreCase("2")) { option2method(); } else if (command.equalsIgnoreCase("q")) { System.exit(1); } private static String getInputCommand() { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String command = null; try { command = br.readLine(); } catch (IOException ioe) { System.out.println("Data Entry Failure"); System.exit(1); } return command; } Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now