Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Β© A+ Computer Science - www.apluscompsci.com
- //Name - Chris Clemente
- //Date - 10-13-2016
- //Class - Comp Sci
- //Lab -
- public class Rectangle
- {
- private int length;
- private int width;
- private int perimeter;
- public void setLengthWidth(int len, int wid )
- {
- length=len;
- width=wid;
- }
- public void calculatePerimeter( )
- {
- perimeter=((2 * length) + (2 * width));
- }
- public void print( )
- {
- System.out.println("The perimeter is :: " + perimeter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement