This is my first time trying to do anything with "constructors" and after an hour or so of looking around for help on this topic, I still feel like I have no idea what I am doing.
So here is a class file that I created for a different program, and its supposed to have 2 constructors. I tried my best, but compiler kept telling me I need identifiers.
How do I identify the constructors?
public class property
{
int storey = 0;
int width = 0;
int length = 0;
property(int storey, int width, int length)
{
{
this.storey = storey;
this.width = width;
this.length = length;
}
}
property(int width, int length)
{
this(1, width, length);
}
public int calculateArea(int area)
{
return (storey * width * length);
}
public double calculatePrice(double price)
{
return (((storey * width * length) * 2.24) *1.15);
}
}