Hey guys, I'm not sure if you can tell how long I've been registered by my status or something but I'm new obviously and having a little problem with an program I'm writing. I get an error message stating that
"The constructor bankofMark.mattsAccount(String, String, String, String, String, String, String,
String, String, String, String, String, String) is undefined"
The application has (or will have) 5 bank accounts and should allow me to make withdrawals and deposits only after you get into the account with a password if statement. Its incomplete at this time because I'm just trying to get my private attributes to show up first. Then I'll write the code to check for sufficient funds later. Anyways, any feedback would be much appreciated.
import java.io.*;
import java.text.*;
import javax.swing.*;
//Banking application that creates 5 accounts and allows them to make a deposit and withdrawal.
public class bankofMark
{//boClass
private String firstName;
private String lastName;
private String Address;
private String City;
private String State;
private String zipCode;
private String Id;
private String passWord;
private int ccLimit;
private double ccBalance;
private double caBalance;
private double saBalance;
private int pinNumber;
public bankofMark(String firstname, String lastname, String address, String city, String state, String zipcode, String id, String password,
int cclimit, double ccbalance, double cabalance, double sabalance, int pinnumber)//This is my constructor
{//boConstructor
firstName = firstname;
lastName = lastname;
Address = address;
City = city;
State = state;
zipCode = zipcode;
Id = id;
passWord = password;
ccLimit = cclimit;
ccBalance = ccbalance;
caBalance = cabalance;
saBalance = sabalance;
pinNumber = pinnumber;
}//eoConstructor
public String getfirstName(){return firstName;}
public void setfirstName(String a){firstName = a;}
public String getlastName(){return lastName;}
public void getlastName(String b){lastName = b;}
public String getaddress(){return Address;}
public void getaddress(String c){Address = c;}
public String getcity(){return City;}
public void getcity(String d){City = d;}
public String getstate(){return State;}
public void getstate(String e){State = e;}
public String getzipcode(){return zipCode;}
public void getzipcode(String f){zipCode = f;}
public String getid(){return Id;}
public void getid(String g){Id = g;}
public String getpassword(){return passWord;}
public void getpassword(String h){passWord = h;}
public int getcclimit(){return ccLimit;}
public void getcclimit(int i){ccLimit = i;}
public double getccbalance(){return ccBalance;}
public void getccbalance(double j){ccBalance = j;}
public double getcabalance(){return caBalance;}
public void getcabalance(double k){caBalance = k;}
public double getsabalance(){return saBalance;}
public void getsabalance(double l){saBalance = l;}
public int getpinnumber(){return pinNumber;}
public void getpinnumber(int m){pinNumber = m;}
public final class mattsAccount extends bankofMark
{
public mattsAccount(String firstname, String lastname, String address, String city, String state, String zipcode, String id,
String password, int cclimit, double ccbalance, double cabalance, double sabalance, int pinnumber)
{
super(firstname, lastname, address, city, state, zipcode, id, password, cclimit, ccbalance, cabalance, sabalance, pinnumber);
}
}
public static void main(String[] args) throws IOException
{//boMain
String Password;
int ID;
DecimalFormat num = new DecimalFormat(",###.00");
System.out.println("Hello and Welcome to Marks Bank.\n This application will allow you to access your account and HOPEFULLY allow you to make deposits and withdrawls");
BufferedReader userInput = new BufferedReader(new InputStreamReader(System.in));
System.out.println();
//BO MATT DAMONS ACCOUNT
System.out.println("Which account are you trying to access:\n" + "1. MattD\n" + "2. BillG\n" + "3. MarkF");
ID = Integer.parseInt(userInput.readLine());
if (ID == 1)
{
System.out.println("Welcome Mr. Damon. Please Enter your Password (case sensitive)");
Password = (userInput.readLine());
if (Password.equals("Damon"))
{
System.out.println("This is your account information");
bankofMark mattsAccount = new mattsAccount
("Matt","Damon","2644 30th Street","Santa Monica","CA","90405","MattD","Damon","1000","400","500","200","1970")
System.out.println(mattsAccount.firstName + "" + mattsAccount.lastName + "" + mattsAccount.Address + "" + mattsAccount.City +
"" + mattsAccount.State + "" + mattsAccount.zipCode + "" + mattsAccount.Id + "" + mattsAccount.passWord + "" +
mattsAccount.ccLimit + "" + mattsAccount.ccBalance + "" + mattsAccount.caBalance + "" + mattsAccount.saBalance + "" +
mattsAccount.pinNumber);
/*this section is dedicated for withdrawing and (maybe) depositing if i can figure out the code to check for
sufficient funds. Then just repeat for the following accounts*/
}
else
{
System.out.println("Incorrect password");
}
}//EO MATT DAMONS ACCOUNT
else if (ID == 2)
{
System.out.println("Welcome Mr. Gates. Please Enter your Password (case sensitive)");
Password = (userInput.readLine());
if (Password.equals("Gates"))
System.out.println("congrats, your in");
else
{
System.out.println("Incorrect password");
}
}
else if (ID == 3)
System.out.println("Welcome Mr. Ferguson. Please Enter your Password");
else
System.out.println("This account does not exist");
}//eoMain
}//eoClass