Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RoomDimension {
- private double length;
- private double width;
- public RoomDimension(double l, double w)
- {
- this.length = l;
- this.width = w;
- }
- public double getArea()
- {
- return length * width;
- }
- public String toString()
- {
- return "Length: " + this.length +"\nWidth: " + this.width;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement