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

Sorry guys, i just noticed that its not really clear where the error lies. Its right after "//BO MATT DAMONS ACCOUNT" and 11 lines down.

First things first, it would be helpfull to set small chunks of code between the [ code ] [ /code] tags. Without the spaces that is.

Second: Could you please put your project up for download, unless you don't want that which I understand. I'm also pretty new, so I don't know what the guidelines are for that.

And now finally, for the problem:
Your problem lies within the defining of your object. Your constructor expects

(String, String, String, String, String, String, String,
String, int, double, double, double, int)

Where you supply
("Matt","Damon","2644 30th Street","Santa Monica","CA","90405","MattD","Damon","1000","400","500","200","1970").

You are giving the values 1000, 400, 500 etc... as strings to your object. You need to give them as normal values. Just try to remove the " " around your doubles and int's
: ("Matt","Damon","2644 30th Street","Santa Monica","CA","90405","MattD","Damon",1000,400,500,200,1970)

I THINK that that could work, however it's been a while since I done java. There is a possibility that you'll have to parse your values to doubles and int's.

Hope this helps.

Thanks Jens for the input. I tried removing the "" around all the int and doubles and it removed my previous error and instead replaced it with this one. "Syntax error, insert ";" to complete LocalVariableDeclarationStatement" see attachment error1.jpg.

after i added ";" to the end of the statement, it then moved to this error message "No enclosing instance of type bankofMark is accessible. Must qualify the allocation with an
enclosing instance of type bankofMark (e.g. x.new A() where x is an instance of bankofMark)." see attachment error2.jpg

Any ideas?

also, I'm not sure how annoying this is but i reposted the entire code, this time using the code blocks you told me about.

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

so I'm playing around and instead of:
bankofMark mattsAccount = new mattsAccount

i changed it to:
bankofMark mattsAccount = mattsAccount.new mattsAccount

I'm not sure if thats the proper syntax, but it just gives me an error now stating "The local variable mattsAccount may not have been initialized" I don't know the syntax for that problem. I'm not even sure if I'm on the right track.

So after poking around more, i changed it to this:

System.out.println("This is your account information");
	bankofMark mattsAccount = null;
	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 allows it to run but whenever i get to that point where it displays the account information, it crashes giving me this error message: "Exception in thread "main" java.lang.NullPointerException at bankofMark.main(bankofMark.java:99)"

Does this mean i need to parse?

I think that your object gets instantiated since you use the format bankofmark name = new bankofmark(constructor items);

But the problem lies in your constructor. You should add this. before each value in the constructorclass to declare that you are using the variable from that constructorclass.
It's all about scopes ;)

so either

mattsAccount.ccBalance = ccbalance;

OR
even better and much much easier

this.ccBalance = ccbalance;
{//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

To recapitulate (if that is the word in english).
Your objectcreation is possibly right, you just don't give a value to any of the fields.
Do this with this.

My gosh Jens, thank you so much for your input on this program. I FINALLY got it to work with your help. When i read you last post it stated:

"I think that your object gets instantiated since you use the format bankofmark name = new bankofmark(constructor items);"

I read it and noticed that the example you gave wasn't the one i had in the code. I had this:
bankofMark mattsAccount = new mattsAccount<<<<this was the problem, it should be "bankofmark" not "mattsAccount"

I really appreciate all the help you've given me. Seemed like i was just talking to myself for a while there. Much props.

Not a problem and glad I could help. We are here to learn ;).

Good luck coding

Last thing btw,

you know the code for adding the deposit to the initial amount in the saBalance by chance?

I think its:

public bankofMark(double initialAmount)
		{saBalance = initialAmount;}
		
		public void deposit(double amount)
		{saBalance += amount;}
		
		public double getBalance()
		{return saBalance;}

i declare that right above the main, but how do i return the balance inside the main?

Just call mattsAccount.getBalance() .

this doesn't work in the main?

System.out.println("Your new Balance is: " + mattsAccount.getsaBalance)

No because the method is getBalance(), not getsabalance (which you are accessing like a public variable anyway, not a method call)

Hmm, I don't know for sure. It would be easier to be able to test this.
I'm quickly gonna try something though, but I'm not certain if it will help you...

public double getnewBalance(double initam)
	{
            double newamount = 0;
            double initialAmount = initam;
            newamount += initialamount;
            return newamount;
        }

This way you'll only have to call getnewbalance.
If you would like your classes decoupled, which is actually good, you should make sure that you call each method in order.
You can't return a balance if it is never made.

It's late here though. If I remember I'll take another look tomorrow. If you find the solution, please let me know.

Greetings

Edit: On second view, Ezzarel is right I think. I didn't take writing errors in account :p.
Thanks Ezzarel

I'm sorry Ezzarel, I'm still a little confused. Been up for quite some time working on this and starting to get brain fried. So this will work outside of the main:

//method to calculate deposit
		public bankofMark(double initAmount)
		{saBalance = initAmount;}
		
		public void deposit(double amount)
		{saBalance += amount;}
		
		public double getBalance()
		{return saBalance;}

and then in the main i can use this:

System.out.println("Your new Balance is: " + mattsAccount.getBalance());

I just think I'm missing a step in my calculations. Its not returning the proper value

You don't show the other code in main(), but if you have properly created the mattsAccount object with the bankofMark(double initAmount) constructor, then mattsAccount.getBalance() should return the balance.

With just pieces of code to go on, we can only assume what you're doing there. If you posted the rest of the main method it would be a lot clearer.

I posted the main in the beginning but I'll do it again and try and make it more clear:
I put the part where i need the return in bold. Its in a nested if statement but i don't think that matters.

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;}

	//method to allow deposit
	//public void deposit(double amount){saBalance +=amount;}
	
	//method to calculate deposit
		public bankofMark(double initAmount)
		{saBalance = initAmount;}
		
		public void deposit(double amount)
		{saBalance +=amount;}
		
		public double getBalance()
		{return saBalance;}
		
	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, inputChoice;
		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();
	
		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)
		{//BO MATT DAMONS ACCOUNT
			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 bankofMark
				("Matt","Damon","2644 30th Street","Santa Monica","CA","90405","MattD","Damon",1000,400,500,200,1970);
				System.out.println("First Name: " + mattsAccount.firstName + "\nLast Name: " + mattsAccount.lastName + "\nAddress: " + 
						mattsAccount.Address + "\nCity: " + mattsAccount.City + "\nState: " + mattsAccount.State + "\nZip Code: " + mattsAccount.zipCode + "\nID: "
						+ mattsAccount.Id + "\nPassword " + mattsAccount.passWord + "\nCreditCard Limit: " + mattsAccount.ccLimit 
						+ "\nCreditCard Balance: " + mattsAccount.ccBalance + "\nChecking Account Balance: " + mattsAccount.caBalance + 
						"\nSavings Account Balance: " + mattsAccount.saBalance + "\nPin Number: " + mattsAccount.pinNumber);
				System.out.println();
				System.out.println("Would you like to make a \n1.deposit or 2.Logout?");
				inputChoice = Integer.parseInt(userInput.readLine());
				if (inputChoice == 1)
				{
					System.out.println("How much would you like to deposit?");
					Integer.parseInt(userInput.readLine());
					[B]System.out.println("Your new Balance is: " + mattsAccount.getBalance());[/B]
				}
				
				else if (inputChoice == 2)
				{
					System.out.println("Thank you and have a nice day");
					System.exit(0);
				}
				else
				{
					System.out.println("Sorry, but that's not one of the options");
				}
				
				/*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

Ok, here is your issue. You don't actually call the deposit method. You just read a value from the input and then show the balance. It's not going to call deposit(amount) on it's own automagically

if (inputChoice == 1)
{
    System.out.println("How much would you like to deposit?");
    Integer.parseInt(userInput.readLine());
    // you need to actually make the deposit() call here with the amount to deposit
    System.out.println("Your new Balance is: " + mattsAccount.getBalance());
}

Also, this part

//method to calculate deposit
		public bankofMark(double initAmount)
		{saBalance = initAmount;}

has nothing to do with making the deposit - you have created another constructor for the class that takes only "initAmount" as it's parameter. Your other constructor is the one that you are using and it already sets "saBalance" (though it really has way too many parameters for a constructor - most of that info should be set with a setXXX() call instead of throwing it all into the constructor - but that's another issue)

I'm pry gonna get flamed after this post but i still don't think i understand.

if (inputChoice == 1)
				{
					System.out.println("How much would you like to deposit?");
					Integer.parseInt(userInput.readLine());
					mattsAccount.deposit(amount);
					
					//System.out.println("Your new Balance is: " + mattsAccount.getBalance());
				}

I'm just really burnt out on this program. I added the mattsAccount.deposit(amount); in there but again, I'm missing a huge step. Its just my first time trying to access private variables and having a hard time grasping the concept of it not being called, but rather viewed and displayed. I don't see how the input is taken, then calculated, then spat back out.

//method to calculate deposit
		public void deposit(double amount)
		{saBalance =+ amount;}
		
		public double getBalance()
		{return saBalance;}

so i am keeping this method?^

It's as Ezzarel says. You can't magically use the deposit function.

First things first. You probably don't need the constructor overloader public bankofmark(double).
You can keep deposit(double) and the getbalance.

In your main you need to give the line you just read to the deposit method.

System.out.println("How much would you like to deposit?");
[B]Integer.parseInt(userInput.readLine());
mattsAccount.deposit(amount);[/B]

In the highlighted part we can note that you read a line, but never store it somewhere.
In order to work you could use:

double amount = Double.parseDouble(userInput.readLine());
//NOW we give the amount we just read to the method that will add it to the balance.
mattsAccount.deposit(amount);
//Here we will get the new balance that we have after the deposit
System.out.println("Your new Balance is: " + mattsAccount.getBalance());

Please note that you'll have to use your user input somewhere (we read it into 'amount' here), and that you need to give the double that is read to the deposit function.

Also slightly off - topic, but this is an ideal situation to try exception handling if you haven't used it before. Just try to handle the exception when a user tries to submit text instead of a double. If you plan doing this, I do encourage you to search for yourself on how to do this first.

But let's see if this works when you give a double. Could you please let me know?

Geed luck, jens

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.