My assignment wants me to get and return values for a rectangle.
I'm having difficulty getting the perimeter and center values to show up.
I'm also thinking that my code does not look that great for getting values. so if you have any critiques I would be happy to hear them
here are the instructions just in case:
"Have the class define methods to calculate and return values for:
the area of a rectangle: areaRectangle()
the perimeter of the rectangle: perimeterRectangle()
the X value of the center of the rectangle: centerX()
the Y value of the center of the rectangle: centerY()
Be sure to have an
applet that has a paint method that first draws a rectangle using
Be careful to change the y values in your drawString calls so they do not overwrite each other and so that the first one is low enough to not be in the way of the drawn rectangle.
Hint: the drawString for the center of the rectangle will probably use a lot of
String concatenation to get the point brackets and comma in ( , ) "