Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with a Computer Science assignment!
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
mariahdivipat




PostPosted: Sat Apr 06, 2013 12:42 pm   Post subject: Help with a Computer Science assignment!

Hi, there! I have an assignment for one of my courses which requires me to create a program in Java using classes:

Quote:
Create an ATM class which will mimic a bank machine in the real world as much as possible. The ATM should have the ability to deposit money, withdraw money, display the current balance, and add daily interest. It should also have a constructor which would take a bank name (i.e., BMO, Royal Bank, etc.) and an initial balance amount as parameters. The MyBankMachine program should have a menu which allows you to interact with the ATM object. The user should be able to use all the features of the ATM object, including the daily interest feature. Each of these features should have error guards to prevent the user from invalid inputs. For example, the user should not be allowed to deposit -$200 into the account.

When calculating daily interest, the formula to use is the compound interest formula. The formula is:

A = P(1 + i)^n


A = final amount
P = principal amount
i = interest rate per compound period
n = number of compound periods

The daily interest feature should ask the user the amount of the annual interest rate, as well as the number of days to leave the balance invested. It should then add the interest to the current balance.


How would I go about doing this? Thank you!
Sponsor
Sponsor
Sponsor
sponsor
Panphobia




PostPosted: Sat Apr 06, 2013 12:54 pm   Post subject: Re: Help with a Computer Science assignment!

Have you tried anything yet? It gives you a lot of information that you could at least start the program with.
Marfhew




PostPosted: Mon Apr 08, 2013 8:04 pm   Post subject: RE:Help with a Computer Science assignment!

You already know that you're going to have an ATM class. Write variables for everything you want the ATM to store and write methods for everything you want it to do. I find that writing all the method names without any code inside helps me get my thoughts organized. Then just fill in the code as you go.

Also, the Menu class should probably be separate from the ATM class to keep yourself organized
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: