Java homework

Schoolies

Senior member
Oct 9, 1999
495
0
76
Hello everyone, I've got a pretty simple Java assignment. If anyone knows anything about Java please help me out. I can get most of it but the last two implementations I have trouble with. There are 3 classes. I need to implement one, Geometry. The other two are circle and rectangle. The paper doesn't have it but both have a getx and gety method. Here are the links:

The Homework
Circle class
Rectangle class

THANKS!
 

MattXSpencer

Junior Member
Mar 18, 2002
7
0
0
For the Circle inside the Rectangle, set the Circles radius = 1/2 the length/width/height of the square.

For the Square inside the Circle, set the (square of the Circles radius)/2 = 1/2 the length/width/height of the square.

Now you just have to figure out a way to get these positioned right, which shouldn't be too hard. Just find what the position of these two objects is based on, and find a way they will always overlap. Good luck.