Unformatted text preview: set method that accepts four sets of coordinates and verifies that each of these is in the first quadrant with no single xor ycoordinate larger than 20.0. The set method also verifies that the supplied coordinates do, in fact, specify a rectangle. Provide methods to calculate the length , width , perimeter , and area . The length is the larger of the two dimensions. Include a predicate method isSquare which determines whether the rectangle is a square. Write a program to test class NewRectangle . Remember, for extra credit, you are on your own. Don’t expect help from the tutors. Also, if you are able to complete only portions of this extra credit, I will give you a proportion of extra credit points....
View
Full
Document
This note was uploaded on 10/12/2009 for the course CS 120 taught by Professor Robertdependahl during the Fall '09 term at Santa Barbara City.
 Fall '09
 ROBERTDEPENDAHL
 Java Programming

Click to edit the document details