Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Learning Java (Classes/Constructors

Name: Anonymous 2011-10-20 18:58

What do I need to look into to understand this better?
My professor gave an assignment to create a class called Circle in which I store the radius and diameter, using a constructor, then create a program that populates those variables using user input. I'm a bit confused because the book uses Rectangle as an example, and it seems that "Rectangle" and "box" are specifically part of java, whereas using "Circle" and "round" doesn't work for me.

I'm about to completely scratch what I have, copy the rectangle code, complile and run it to check it works, then try to customize it to work with a circle. Any advice would be much appreciated. Thanks. (Please don't just post code and do it for me.)

Name: Anonymous 2011-10-20 23:23

>>15
not exactly, but it's pretty typical Java.

no reason Java HAS to be like this, it just usually is.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List