My code is very straightforward. I’m trying to build an airport booking system and there is a customer class with the following code and constructor:
import java.io.*;
class customer implements Serializable
{
public customer(String name, String address, String town, String county, String country, double cost, Boolean veg, Boolean dis)
{
…
}
When i try to make a pretend object for this class I get an error saying cannot resolve symbol. symbol : constructor customer (…type of variables…). location: class customer. It puts the arrow under the new, as in it can’t find this class. I don’t know why, I’ve made pretend flights and planes already with out errors but the customer gives the error for the code:
customer c2 = new customer(“name”, “address”, “town”, “county”, “country”, cost, b, b);
Can anyone see what I’ve done wrong? Any help much appreciated.
*edit
a new customer object can be created if the class is overloaded and customer c2 = new customer();, but why doesn’t the first one work?
Thanks
Mick