Assignment Four

Lab assignment:

Create a class called Rectangle that has functionality like Circle. You are given RecDemo, a very simple demonstration program. Examine the code in RecDemo and make a Rectangle class that will perform the necessary functions. Hints: My version has... 4 private instance variables (all floats) 3 public final static (class) variables (all ints) 1 instance of the Rectangle class 2 static (class) methods for calculation 3 constructors (2 doubles, no parameters, one int) 4 double getters 1 String getter 2 setters no event handling Comment out most of the code in the init method of RecDemo. Uncomment just a small part at a time, and implement that part in Rectangle. When it is working, move on to the next part. For example, I started by testing only the two double constructor and the String getter. When I got that working, I uncommented the code for the next constructor in RecDemo, then built the code for it in Rectangle. When I had this adequately tested, I moved on. Suggested order of implementation