0

`

   */
    class is BankAccount
    */
    public class BankAccount
    {
    private int name = John Doe
    private double nextAccountNumber = 123456;
    private int balance = 5000;
    public int tpyeofaccount = checking;
    {
    public void setname(int name);
    this.name = name
    public void setBalance(int bal);
    this.balance = bal;
    public void setAccountNumber(int AccountNumber);
    this.nextAccountnumber =nextAccountNumber;
    public void settypeofaccount(double typeofaccount)
    this.typeofaccount(int typeofaccount)


Public class BankDriver
{
public static void main (string[] args)
{
// create instance of Bankaccount
Bank account = new Bank();
Bank name = new Bank();
Bank account.number = new Bank();
Bank balance = new Bank();

system.out.println("Account type: " + bank.getAccounttype());
}

how does it look?

1

It looks like you are wasting a lot of time. That code still has all the errors that you said you had fixed earlier, and the main method makes no sense at all.
Re-post your code after you have compiled it and fixed as many errors as you can.

Votes + Comments
LOL! :D
0

Int is a whole number(1,2,3 etc), double is a number with precision and decimal point(23.11). Having this in mind, look at your variables, you might want to switch some around. Also as James said the main method doesn't make sense, it won't compile. If you want an advice, finish your first class first and make sure that it works as expected before starting the next one

Edited by Slavi

-1

again, i have no idea what the program would even look like my instructor isnt helping either

1

i have no idea what the program would even look

To be realistic - copy/pasting stuff and hoping for the best is not goiung to work for you... you need to learn properly about Java and programming starting from the very beginning. There are people here who will help you do that, but there are so many courses and tutorials on the web that nobody will write a new one just for you.
Searh the web for a beginners "starting java" that seems confortable to you and work at that. Don't expect to get far in less that 10-20 hours real study, but after that you should be able to complete this exercise.

Good luck
JC

0

your instructor can only help you if you're willing to learn.
You seem only to be caring about getting your homework accepted with minimal effort, that's not going to make your instructor interested in helping you, especially if (as is clear from your questions) you've not been paying attention in class.

0

how is this
Bank account = new Bank();
ever supposed to compile? you do realize your class is named BankAccount, right?

0

At a quick scan I see 11 lines that won't compile before he even gets to that line! I told him before to try to compile his code, but obviously he's not listening.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.