1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

help...Javascript coding

Discussion in 'JavaScript' started by syxx34, Oct 27, 2018.

  1. #1
    blah
     
    Last edited: Oct 28, 2018
    syxx34, Oct 27, 2018 IP
  2. syxx34

    syxx34 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    when i run the file. it says no main method. what does this mean? can someone help me out with what I am missing so I can learn. Thank you.
     
    syxx34, Oct 27, 2018 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #3
    with your homework?

    I can see that you have created functions but I don't see them being called. Set up a jsfiddle and point us to specific problems.
     
    sarahk, Oct 27, 2018 IP
  4. syxx34

    syxx34 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #4
    what is a jsfiddle?
     
    syxx34, Oct 27, 2018 IP
  5. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #5
    Can you google?
    It's a website where you can set up your code for other people to come and test, make suggestions etc.
     
    sarahk, Oct 27, 2018 IP
  6. syxx34

    syxx34 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #6

    i have but all it does it test the program. i can do that in the program i have. i dont see where i can post to get help. i just need to be able to create a program (two files) and run the following:

    Scenario 1 :
    User creates a new empty bank account and manipulates the new account
    ACCOUNT PROCESSING MENU
    1. Create new account–empty account
    2. Create new account–information available
    3. Make deposit
    4. Make withdrawal
    5. Calculate monthly interest
    6. View account balance
    7. Next available account number
    8. Update monthly interest rate
    9. Print account information
    10. Exit

    Please enter your preferred option:1
    Account #12345 successfully created.

    Please enter your preferred option:9
    Account number: 12345
    Account balance: $ 0.0
    Monthly interest: $ 0.0

    Please enter your preferred option:3
    Please enter the deposit amount: 1000

    Please enter your preferred option:6
    Account balance: $1000.0

    Please enter your preferred option: 4
    Please enter the withdrawal amount:1001
    Insufficient funds. Withdrawal not made.

    Please enter your preferred option:4
    Please enter the withdrawal amount: 250
    Withdrawal successful

    Please enter your preferred option: 8
    What is the new monthly interest rate? 0.025

    Please enter your preferred option:5
    Monthly interest earned:$18.75

    Pleaseenter your preferred option:9
    Account number: 12345

    Account balance: $750.0
    Monthly interest:$18.75

    Please enter your preferred option:7

    Next available account number: 12346

    Please enter your preferred option: 10
    Exiting program.

    Scenario 2:
    User creates a bank account with known information and manipulates the new
    account

    ACCOUNT PROCESSING MENU
    1. Create new account–empty account
    2. Create new account –information available
    3. Make deposit
    4. Make withdrawal
    5. Calculate monthly interest
    6. View account balance
    7. Next available account number
    8. Update monthly interest rate
    9. Print account information
    10. Exit

    Please enter your preferred option:2
    Please enter the starting balance:750
    Please enter the monthly interest rate:0.01
    Account #12345 successfully created.

    Please enter your preferred option:7
    Next available account number: 12346

    Please enter your preferred option:9
    Account number: 12345
    Account balance:$750.0
    Monthly interest:$7.5

    Please enter your preferred option:3
    Please enter the deposit amount:500

    Please enter your preferred option:9
    Account number: 12345
    Account balance:$1250.0
    Monthly interest:$12.5

    Please enter your preferred option:
    10
    Exiting program.
     
    Last edited: Oct 27, 2018
    syxx34, Oct 27, 2018 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    You share the link with us and tell us where the problem is. So far all we have a cut and paste instructions and a class that you never use to create an object and therefore never call.

    Show us how you are using the class at the very least. Remember, we're people offering you some help, not your school's tutors who are paid to assist you.

    oh, and if you had googled you'd have found these:
    1. https://www.chegg.com/homework-help...ite-program-allows-user-create-proc-q19732640
    2. https://hwdost.com/homeworkhelp/Com...lication-Write-a-program-that-allows-the.html
    3. https://www.coursehero.com/tutors-p...his-homework-I-am-attaching-the-instructions/
     
    sarahk, Oct 27, 2018 IP
  8. syxx34

    syxx34 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #8
    I understand that you are helping. What i pasted is what I have. my other file is just this....i dont know how to call things. this is our first assignment with two files. ive been trying all week. everything i do here...gets error messages

    public class BankAccountApp {
        public static void main() {
         
            /*  //logic names     
            int nAccountNumber;
            int nNextAccountNumber;
            double dBalance;
            double dMonthlyInterestRate;
            */
         
            System.out.println("ACCOUNT PROCESSING MENU");
            System.out.println("1. Create new account - empty account");
            System.out.println("2. Create new account - information available");
            System.out.println("3. Make deposit");
            System.out.println("4. Make withdrawal");
            System.out.println("5. Calculate monthly interest");
            System.out.println("6. View account balance");
            System.out.println("7. Next available account number");
            System.out.println("8. Update monthy interest rate");
            System.out.println("9. Print account information");
            System.out.println("10. Exit");
            System.out.println(" ");
        }
    }
    Code (markup):
    edit: mod added bbcode
     
    Last edited by a moderator: Oct 28, 2018
    syxx34, Oct 27, 2018 IP