Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 10 of 10

Thread: Please I need help

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Please I need help

    I need help with this project


    A bank has hired you to write a program for their ATMs/mobile apps. The bank would like the program to do the following:
    1. Prompt the user for a user name and check whether it is valid. Give several tries before locking user out.
    a. If user is locked out, take photo of him if at ATM
    2. Prompt the user for a PIN and check whether it is valid. Give several tries before locking user out.
    a. If user is locked out take photo of him if at ATM
    3. Give a welcome message.
    a. Message should include any specials.
    4. Create the following options:
    a. Make a deposit
    i. Cash
    ii. Check
    1. Mobile app
    2. ATM
    iii. Indicate that cash/check dispensed
    iv. Indicate when cash/check available for use.
    v. May have more than one check to deposit.
    b. Make a withdrawal
    i. Fast cash from debit card
    1. $20
    2. $40
    3. $100
    4. $500
    5. Indicate that cash was dispensed
    6. Limit withdrawals to one a day.
    ii. Fast cash from credit card
    1. $20
    2. $40
    3. $100
    4. $500
    5. Indicate that cash was dispensed
    6. Limit withdrawals to one a day.
    7. Indicate interest to be charged.
    c. Check balances on
    i. Checking account
    ii. CDs
    iii. Loans
    iv. Credit cards
    1. Warn of overdraft and specify penalties
    v. Debit cards
    1. Warn of overdraft and specify penalties.
    vi. Check for bonus points on debit/credit card.
    d. Make a transfer from one account to another.
    i. Specify which accounts
    ii. Check for overdrafts
    iii. Specify when funds are available
    e. In each option the appropriate change should be made to the account balance.
    5. Check for overdraft on each transaction.
    6. Announce any changes in rates.
    7. In each option the user should be prompted for operation desired, dollar amount, and date transaction should occur.
    8. When done program should ask if user wishes to do anything else. If so cycle back to new transaction.
    9. When done program should give thank you message and log user out.

  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need help

    What kind of help do you need?

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please I need help

    I need help with the atm pictures

  4. #4
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need help

    What kind of help do you need with the atm pictures?

  5. #5
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please I need help

    a. If user is locked out, take photo of him if at ATM

  6. #6
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need help

    That seems like multiple things.
    Find the user in the database
    access properties of the user
    take an action depending on the value of a specific property or do nothing

    Which could be broken down into even smaller details. Please clarify exactly what it is you are having problems with.

  7. #7
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Please I need help

    /**
    *
    * @author Ty
    */

    import java.util.Scanner;

    /**
    *
    * @author Caroline
    */
    public class Main {
    private double currentBal =1000;
    Scanner input = new Scanner(System.in);

    public void mainMenu(){
    int selection;

    System.out.print("Welcome to the Automated Teller Machine!\n");
    System.out.println("Select from the following menu options below:\n");
    System.out.println("========================");
    System.out.println("| [1] Check Balance |");
    System.out.println("| [2] Withdrawal |");
    System.out.println("| [3] Deposit |");
    System.out.println("| [4] Exit |");
    System.out.println("========================");
    System.out.print("Please select your option now: ");
    selection =input.nextInt();

    switch (selection){
    case 1:
    viewBalance();
    break;
    case 2:
    withdrawFunds();
    break;
    case 3:
    depositFunds();
    break;
    case 4:
    System.out.println("Thank you for using ATM! \n Goodbye! \n");
    }
    }

    public void viewBalance() {
    int selection1;
    System.out.println("You have selected Balance.\n");
    System.out.println("\t-- Your Current Balance is:$ " + currentBal);
    System.out.println("Return to main menu? \n [1] for YES \n");
    selection1 =input.nextInt();

    switch (selection1){
    case 1:
    mainMenu();
    break;
    }

    }
    public void withdrawFunds() {
    int withdrawSelection;

    System.out.println("Amount to withdraw: ");
    System.out.println("[1] - $20");
    System.out.println("[2] - $40");
    System.out.println("[3] - $100");
    System.out.println("[4] - $500");
    System.out.println("[5] - MAIN MENU");
    System.out.print("Please select your option now: ");
    withdrawSelection =input.nextInt();

    switch (withdrawSelection){
    case 1:
    accountWithdraw(20);
    mainMenu();
    break;
    case 2:
    accountWithdraw(40);
    mainMenu();
    break;
    case 3:
    accountWithdraw(100);
    mainMenu();
    break;
    case 4:
    accountWithdraw(500);
    mainMenu();
    break;
    case 5:
    mainMenu();
    break;
    }

    }
    public void accountWithdraw(int withdrawFunds){
    currentBal = currentBal -withdrawFunds;
    System.out.println("Please take your funds.");
    }
    public void depositFunds(){
    int addSelection;

    System.out.println("Amount to deposit: ");
    System.out.println("[1] - $20");
    System.out.println("[2] - $40");
    System.out.println("[3] - $50");
    System.out.println("[4] - $100");
    System.out.println("[5] - MAIN MENU");
    System.out.print("Please select your option now: ");
    addSelection =input.nextInt();

    switch (addSelection){
    case 1:
    accountAdd(20);
    mainMenu();
    break;
    case 2:
    accountAdd(40);
    mainMenu();
    break;
    case 3:
    accountAdd(50);
    mainMenu();
    break;
    case 4:
    accountAdd(100);
    mainMenu();
    break;
    case 5:
    mainMenu();
    break;
    }
    }
    public void accountAdd (int depositFunds){
    currentBal = currentBal +depositFunds;
    System.out.println("Thank you.");
    }
    public static void main(String[] args) {
    Main main;
    main = new Main();
    }

    }

  8. #8
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need help

    While posting the code does show more of an effort, by that I do mean some as opposed to none, it still does not explain what it is you are having problems with.

    While you may have all day, you may not have my attention all day. I suggest you invest yourself in your next question the way you would like someone to invest their self in your next reply.

    Please edit your post and wrap the code in code tags so it is more readable on the forum.
    Directions can be found on the Announcements page if you need help.

  9. #9
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can u help me go foward??

    This is my project

    A bank has hired you to write a program for their ATMs/mobile apps. The bank would like the program to do the following:
    1. Prompt the user for a user name and check whether it is valid. Give several tries before locking user out.
    a. If user is locked out, take photo of him if at ATM
    2. Prompt the user for a PIN and check whether it is valid. Give several tries before locking user out.
    a. If user is locked out take photo of him if at ATM
    3. Give a welcome message.
    a. Message should include any specials.
    4. Create the following options:
    a. Make a deposit
    i. Cash
    ii. Check
    1. Mobile app
    2. ATM
    iii. Indicate that cash/check dispensed
    iv. Indicate when cash/check available for use.
    v. May have more than one check to deposit.
    b. Make a withdrawal
    i. Fast cash from debit card
    1. $20
    2. $40
    3. $100
    4. $500
    5. Indicate that cash was dispensed
    6. Limit withdrawals to one a day.
    ii. Fast cash from credit card
    1. $20
    2. $40
    3. $100
    4. $500
    5. Indicate that cash was dispensed
    6. Limit withdrawals to one a day.
    7. Indicate interest to be charged.
    c. Check balances on
    i. Checking account
    ii. CDs
    iii. Loans
    iv. Credit cards
    1. Warn of overdraft and specify penalties
    v. Debit cards
    1. Warn of overdraft and specify penalties.
    vi. Check for bonus points on debit/credit card.
    d. Make a transfer from one account to another.
    i. Specify which accounts
    ii. Check for overdrafts
    iii. Specify when funds are available
    e. In each option the appropriate change should be made to the account balance.
    5. Check for overdraft on each transaction.
    6. Announce any changes in rates.
    7. In each option the user should be prompted for operation desired, dollar amount, and date transaction should occur.
    8. When done program should ask if user wishes to do anything else. If so cycle back to new transaction.
    9. When done program should give thank you message and log user out.







    I have this so far!!



    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package atmmachine2;

    /**
    *
    * @author Caroline
    */

    import java.util.Scanner;

    public class AtmMachine2
    {
    private double availableBal =1000;
    private double totalBal =1000;
    Scanner input = new Scanner(System.in);

    public int userAccount()
    {
    System.out.print("Enter your account number: ");
    int account;
    account = input.nextInt();

    return account;
    }

    public int userPin()
    {
    System.out.print("Enter your pin number: ");
    int pin;
    pin =input.nextInt();

    return pin;
    }

    public void startAtm()
    {
    userAccount();
    userPin();
    drawMainMenu();
    }

    public void drawMainMenu()
    {
    int selection;

    System.out.println("\nATM main menu:");
    System.out.println("1 - View account balance");
    System.out.println("2 - Withdraw funds");
    System.out.println("3 - Add funds");
    System.out.println("4 - Terminate transaction");
    System.out.print("Choice: ");
    selection =input.nextInt();

    switch(selection)
    {
    case 1:
    viewAccountInfo();
    break;
    case 2:
    withdraw();
    break;
    case 3:
    addFunds();
    break;
    case 4:
    System.out.println("Thank you for using this ATM!!! goodbye");
    }
    }

    public void viewAccountInfo()
    {
    System.out.println("Account Information:");
    System.out.println("\t--Total balance: $"+totalBal);
    System.out.println("\t--Available balance: $"+availableBal);
    drawMainMenu();
    }

    public void deposit(int depAmount)
    {
    System.out.println("\n***Please insert your money now...***");
    totalBal =totalBal +depAmount;
    availableBal =availableBal +depAmount;
    }

    public void checkNsf(int withdrawAmount)
    {
    if(totalBal -withdrawAmount < 0)
    System.out.println("\n***ERROR!!! Insufficient funds in you accout***");
    else
    {
    totalBal =totalBal -withdrawAmount;
    availableBal =availableBal -withdrawAmount;
    System.out.println("\n***Please take your money now...***");
    }
    }

    public void addFunds()
    {
    int addSelection;

    System.out.println("Deposit funds:");
    System.out.println("1 - $20");
    System.out.println("2 - $40");
    System.out.println("3 - $100");
    System.out.println("4 - $500");
    System.out.println("5 - Back to main menu");
    System.out.print("Choice: ");
    addSelection =input.nextInt();

    switch(addSelection)
    {
    case 1:
    deposit(20);
    drawMainMenu();
    break;
    case 2:
    deposit(40);
    drawMainMenu();
    break;
    case 3:
    deposit(100);
    drawMainMenu();
    break;
    case 4:
    deposit(500);
    drawMainMenu();
    break;
    case 5:
    drawMainMenu();
    break;
    }
    }

    public void withdraw()
    {
    int withdrawSelection;

    System.out.println("Withdraw money:");
    System.out.println("1 - $20");
    System.out.println("2 - $40");
    System.out.println("3 - $100");
    System.out.println("4 - $500");
    System.out.println("5 - Back to main menu");
    System.out.print("Choice: ");
    withdrawSelection =input.nextInt();

    switch(withdrawSelection)
    {
    case 1:
    checkNsf(20);
    drawMainMenu();
    break;
    case 2:
    checkNsf(40);
    drawMainMenu();
    break;
    case 3:
    checkNsf(100);
    drawMainMenu();
    break;
    case 4:
    checkNsf(500);
    drawMainMenu();
    break;
    case 5:
    drawMainMenu();
    break;
    }
    }

    public static void main(String args[])
    {
    AtmMachine2 myAtm = new AtmMachine2();
    myAtm.startAtm();
    }
    }

  10. #10
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Please I need help

    Please do not double post the same question.
    Threads merged.