Joined: Wed May 05, 2010 10:51 pm Posts: 1 Has thanked: 0 time Have thanks: 0 time
Hi could anyone please help me complete the following code.
Many Thanks,
class Rectangle { add appropriate code here }
public class UseRectangle { Rectangle r = new Rectangle();
r.setLength(4.3); //sends a message to r telling it what length of side to have r.setBreadth(3.9); System.out.println("..." + r.reportArea()); System.out.println("..." + r.reportLengthAroundEdge()); System.out.println("..." r.reportLengthFromAnyCornerToTheOneDiagonallyOpposite()); }
msi_333
Question subject: Re: help with some missing coding
Posted: Thu May 06, 2010 9:20 am
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2103 Location: Earth Has thanked: 39 time Have thanks: 56 time
For example :
Code:
private float side ;
public void setLength(float side){ this.side = side; }
.....
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )