Wed May 05, 2010 10:57 pm
class Rectangle
{
[b]add appropriate code here[/b]
}
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());
}
Thu May 06, 2010 9:20 am
private float side ;
public void setLength(float side){
this.side = side;
}
.....
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.