CS1 Standard Demo Page

The following text was written to the standard output stream when the /*A program to display the area of the desk */ package shapes; public class WorkArea { public static void main (String [] args){ SRectangle desk = new SRectangle (24,36); SRectangle book = new SRectangle (8.5,11); SCircle plate = new SCircle (8); SCircle glass = new SCircle (1.35); SSquare coaster = glass.circumscribingSquare(); System.out.println("area of desk = " + desk.area()); System.out.println("area of 2 books = " + book.area()*2); System.out.println("area of 3 coasters = " + coaster.area()*3); System.out.println("area of 3 plates = " + plate.area()*3); System.out.println("area of the glass = " + glass.area()*3); System.out.println("Total area of the objects taking up space = " + (book.area()*2+coaster.area()*3+plate.area()*3)); System.out.println("Area of the free space in the desk " + (desk.area()-(book.area()*2+coaster.area()*3+plate.area()*3))); } } program was executed from IntelliJ.

area of desk = 864.0
area of 2 books = 187.0
area of 3 coasters = 21.870000000000005
area of 3 plates = 603.1857894892403
area of the glass = 17.176657833502198
Total area of the objects taking up space = 812.0557894892403
Area of the free space in the desk 51.94421051075972