java help about constructors

Newbie Spellweaver
Joined
Aug 20, 2005
Messages
24
Reaction score
0
hey i am taking java in school and we have a project due 2morrow and on the sheet it says

" add a construtor to the circle class in shapes so that the initial x and y coordinates of the center are parameters to this additioanal 2 parameer constructor"
when i run it a circle its drawn on the screan

dont realy get wht its asking am i suppose to add another constructor so 2 circles will be drawn cause on the bottom it sasy test each constroctor by createing 2 circles how an i suppose to add anouther constrotor not sure how too
 
A constructor is basicly a function of a JAVA object. Basicly, you'll have to add another circle drawing function that takes that original X and Y coordinate and does the same as your first constructor.

Not sure what the hell it is exactly what you want us to tell you though.. :eh:
 
public Circle()
{
diameter = 30;
xPosition = 20;
yPosition = 60;
color = "blue";
isVisible = false;

this is the construtor right i think so i would just make a copy of that and add it to the class?
 
Back