Results 1 to 3 of 3

Thread: Homework Help

  1. #1
    KMayers is offline Member
    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0

    Question Homework Help

    A bank in your town updates its customersí accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every customer must maintain a minimum balance. If a customerís balance falls below the minimum balance, there is a service charge of $10.00 for savings accounts and $25.00 for checking accounts. If the balance at the end of the month is at least the minimum balance, the account receives interest as follows:
    a. Savings accounts receive 4% interest.
    b. Checking accounts with balances of up to $5000 more than the minimum balance receive 3% interest; otherwise, the interest is 5%.

    I need to write a Java program using Eclipse Indigo that reads a customerís account number ( int type ), account type ( char type; s or S for savings, c or C for checking), minimum balance that the account should maintain, and current balance. The program should then output the account number, account type, current balance, and new balance or an appropriate error message. Test your program by running it five times, using the following data:
    46728 S 1000 2700
    87324 C 1500 7689
    79873 S 1000 800
    89832 C 2000 3000
    98322 C 1000 750

    This is what I have so far

    import java.util.*;

    public class Prog_Exercise12
    {
    static Scanner console = new Scanner(System.in);

    {

    public static void main(String[] args)
    {

    int accountNumber;
    char acctType;
    float acctBalance;
    double minimumBalance;
    double interest;


    System.out.print("Enter the account " + "number: ");
    accountNumber = console.nextInt();
    System.out.println();

    System.out.print("Enter the account type: " + "type: ");
    accountType = console.next().charAT (0);
    System.out.println();

  2. #2
    Darkzombies is offline Senior Member
    Join Date
    Nov 2012
    Posts
    105
    Rep Power
    0

    Default Re: Homework Help

    Well I suggest making a new class for Savings accounts and Checking accounts class with the required methods, that way you can do savingsAccount s = new savingsAccount(46728, 1000, 2700);

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: Homework Help

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Homework Help
    By EZ-Ed in forum New To Java
    Replies: 3
    Last Post: 04-10-2012, 08:11 PM
  2. Homework Help please!
    By ghjk in forum New To Java
    Replies: 5
    Last Post: 03-19-2012, 03:44 AM
  3. Need help with homework
    By bkim33 in forum New To Java
    Replies: 9
    Last Post: 02-11-2011, 05:50 AM
  4. Homework help
    By rclausing in forum New To Java
    Replies: 26
    Last Post: 11-24-2009, 07:06 AM
  5. Please Help with Homework
    By theuser in forum Advanced Java
    Replies: 2
    Last Post: 07-30-2009, 04:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •