import java.util.Scanner;
public class CarpentPaintCounter {
public static void main(String[] args) {
double roomLength = 0;
double roomWidth = 0;
double roomHeight = 0;
double doorWidth = 0;
double doorHeight = 0;
double windowOneWidth = 0;
double windowOneHeight = 0;
double windowTwoWidth = 0;
double windowTwoHeight = 0;
double bookshelfHeight = 0;
double bookshelfWidth = 0;
double paintingCosts = 0;
double carpenteringCosts = 0;
Scanner scan = new Scanner(System.in);
System.out.println("Please insert room length and press Enter: ");
roomLength = scan.nextDouble();
System.out.println("Please insert room width and press Enter: ");
roomWidth = scan.nextDouble();
System.out.println("Please insert room height and press Enter: ");
roomHeight = scan.nextDouble();
System.out.println(
"Room length is: " + roomLength + ", width: " + roomWidth + " and height: " + roomHeight + " feet");
System.out.println("\nPlease provide door width and press Enter: ");
doorWidth = scan.nextDouble();
System.out.println("Please provide door height and press Enter: ");
doorHeight = scan.nextDouble();
System.out.println("Please provide first window width and press Enter: ");
windowOneWidth = scan.nextDouble();
System.out.println("Please provide first window height and press Enter: ");
windowOneHeight = scan.nextDouble();
System.out.println("Please provide second window width and press Enter: ");
windowTwoWidth = scan.nextDouble();
System.out.println("Please provide second window height and press Enter: ");
windowTwoHeight = scan.nextDouble();
System.out.println("Please provide book shelf height and press Enter: ");
bookshelfHeight = scan.nextDouble();
System.out.println("Please provide book shelf width and press Enter: ");
bookshelfWidth = scan.nextDouble();
System.out.println("Please provide painting costs for one sqare feet and press Enter: ");
paintingCosts = scan.nextDouble();
System.out.println("Please provide carpentering costs for one sqare feet and press Enter: ");
carpenteringCosts = scan.nextDouble();
double costForWallPainting = Math.ceil(((2 * (roomLength * roomHeight) + 2 * (roomHeight * roomWidth))
- (doorWidth * doorHeight) - (windowOneWidth * windowOneHeight) - (windowTwoWidth * windowTwoHeight)
- (bookshelfHeight * bookshelfWidth)) * paintingCosts);
System.out.println("Cost of wall painting:" + costForWallPainting);
double costforFloorCarpentering = Math.ceil(roomLength * roomWidth * carpenteringCosts);
System.out.println("Cost of floor carpentering: " + costforFloorCarpentering);
scan.close();
}
}
Comments
Leave a comment