Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Example
- {
- public static void main(String[] args)
- {
- ImprovedRectPrism rp1 = new ImprovedRectPrism(5, 6, 3);
- ImprovedRectPrism rp2 = new ImprovedRectPrism(2, 3, 7);
- System.out.println("Volume of rp1 is " + rp1.calcVolume());
- System.out.println("Volume of rp2 is " + rp2.calcVolume());
- System.out.println("\nSurface Area of rp1 is " + rp1.calcSurfaceArea());
- System.out.println("Surface Area of rp2 is " + rp2.calcSurfaceArea());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment