Show Bid Request
Small College Assignment
Bid Request Id: 3301
|
|
|
Description:
To create a JAVA text file use NOTEPAD Create a class called Account1 that stores information about a bank account. It should have a data member to store the account balance named balance, and the account number, named accountNumber. The class should also have a static data member called nextAccountNumber initialized to zero. Create a constructor for the class that takes a balance amount as an argument, and sets the accountNumber variable to the nextAccountNumber plus 1. Save this class in a file named Account1.java. Add a method called display that will display the account number and balance. Create another class called OpenAccount which contains a main that will create three Account1 objects with balances of 4000, 5000, and 2000. The constructor should assign consecutive account numbers. Save this class in a file called OpenAccount.java. Run OpenAccount
Your output should look like: The account number is 1, the balance is 4000.0 The account number is 2, the balance is 5000.0 The account number is 3, the balance is 2000.0
Add another constructor that will allow Account1 objects to be instantiated without a balance argument, so that the balance is initialized to zero, but the account number receives the next available number. Use the this reference in the constructor to call the constructor that takes the double argument. public Account1( ) { this(0.0); } run OpenAccount
Your output should look like: The account number is 1, the balance is 4000.0 The account number is 2, the balance is 5000.0 The account number is 3, the balance is 2000.0 The account number is 4, the balance is 0.0
Add a static variable called interestRate and initialize it to .08 (8% interest). Add a method called calcInterest that will calculate the interest, display the interest amount, add the interest to the balance and display the new balance. Call this method from OpenAccount using the second object.
Your output should look like: The account number is 1, the balance is 4000.0 The account number is 2, the balance is 5000.0 The account number is 3, the balance is 2000.0 The account number is 4, the balance is 0.0 The current interest is 250.0, the new balance is 5250.0
Hand in your output and source code for each run
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Special Conditions / Other:
This program must be completed by 10/9/01 because the assignment is due on 10/10/01.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
This bid was accepted by the buyer!
|
$10 (USD)
|
Oct 4, 2001 11:20:28 PM EDT
|
10
(Excellent)
|
|
|
This project is verysimple. I can have this done in less than an hour. Accept my bid and I'll start work immediately. I will follow the exact instructions and produce java files and class files and output files for each step.
Best regards,
Sammy Leong |
|
|
|
|
|