Paint - /* / Paint.java / / Determine how much paint is...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//********************************************************** // Paint.java // // Determine how much paint is needed to paint the walls // of a room given its length, width, and height //********************************************************** import java.util.Scanner; public class Paint { public static void main(String[] args) { final int COVERAGE = 350; //paint covers 350 sq ft/gal final int DOOR_AREA = 20; final int WINDOW_AREA = 15; Scanner scan = new Scanner(System.in); //declare integers length, width, and height; int length, width, height; // declare integers numDoors and numWindows int numDoors, numWindows; //declare double totalSqFt; double totalSqFt; //declare double paintNeeded; double paintNeeded; //Prompt for and read in the length of the room System.out.print ("Enter the length of the room: "); length = scan.nextInt(); //Prompt for and read in the width of the room System.out.print ("Enter the width of the room: "); width = scan.nextInt();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.

Page1 / 2

Paint - /* / Paint.java / / Determine how much paint is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online