Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Statement: A painting company has determined that for every 115 square feet of wall space, one gallon of paint and eight hours of labor

Problem Statement:

A painting company has determined that for every 115 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $20.00 per hour for labor.

Develop a Java program, where

  • data are provided (under Input Requirements) to the program,
  • computations (under Processing) are performed using the data (under Input Requirements),
  • results of the processing (under Output Requirements) are displayed

Input Requirements:

Set up the data for the following as named constants for one gallon of paint:

  • 115 square feet of wall space
  • eight hours of labor

Also, set up a named constant for the following:

  • $20.00 per hour for labor

Enter the following input data at the keyboard:

  • The square feet of wall space to be painted
  • The price of the paint per gallon

Processing:

Your program is to perform the following calculations:

  • The number of gallons of paint required
  • The hours of labor required
  • The cost of the paint
  • The labor charges
  • The total cost of the paint job

Output Requirements:

  • The square feet of wall space to be painted
  • The price of the paint per gallon
  • The number of gallons of paint required
  • The hours of labor required
  • The cost of the paint
  • The labor charges
  • The total cost of the paint job

NOTE: Precede each of the above output data items with an appropriate message.

For instance, if the user entered 1150 square feet of wall space during the inputting, then

display a message like the following, along with the suare footage: 1150 square feet of wall space needs to be painted.

Extra-Credit (5 points): Display the data that is of type double using 2 digits after the decimal point.

Refer to section 2.3 and/or section 2.4 on how to format your output data with digits after the decimal point.

======================================================================

Use MS-Word to create a file to contain the text of your solution (in Java).

Save the file you created using MS-Word to your computer (or flash drive).

You need to set up a Java program that is complete and workable. For your solution to be complete, you must

  • provide the above input data
  • set up correct formulas to process the input data, arriving at the output data
  • provide the output data to the user

For your solution to be workable,

  • Your solution should be free of any type of errors (syntax, run-time, logic)
  • you may want to develop an algorithm first, using pseudocode
  • you do NOT need to turn in any algorithm

Instructions on documenting your solutions:

  • Prior to the start of your solution, include a paragraph, explaining what is being accomplished. (3 points)

For examples on how to do documentation, check out section 2.4 in the text

Within your solution, include the following 3 sections:

    • Input Data: document variables used to hold input data (2 points)
    • Output Data: document variables used to hold output data (2 points)
    • Processing: document the formulas/equations you set up as part of your processing (2 points)

Grading rubric:

  • Documentation (9 points)
  • Solution complete and working properly (16 points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions