Question

This exercise requires designing a program which solves the problem described in the problem statement below....

This exercise requires designing a program which solves the problem described in the problem statement below. Provide comments as necessary in your pseudo-code and the Java program.

Your solution must include these components:

  1. Flowchart
  2. Pseudo-code
  3. Hierarchy Chart
  4. Program Coded
  5. Program Output

Problem Statement

A painting company has determined that to paint 115 square feet of wall space, the task will require one gallon of paint and 8 hours of labor. The company charges $20.00 per hour for labor. Design a modular program that asks the user to enter the number of square feet of wall space to be painted and the price of paint per gallon. The program should then calculate and display the following data:

  • 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

Expected Output

Enter wall space in square feet: 500

Enter price of paint per gallon: 25.99

Gallons of paint: 4.3478260869565215

Hours of labor: 34.78260869565217

Paint charges: $112.99999999999999

Labor charges: $695.6521739130435

Total Cost: $808.6521739130435

Your program should contain only the following modules:

  • Module main. Accepts user input of the wall space (in square feet) and the price of a gallon of paint. Calculates the gallons of paint needed to paint the room, the cost of the paint, the number of labor hours needed, and the cost of labor. Calls summaryPaint, passing variables assigned the gallons paint needed to paint the room, the cost of the paint, the number of labor hours needed and the labor charges as arguments.

  • Module summary Paint. Accepts the gallons of paint needed, the cost of the paint, the number of labor hours needed, and the cost of labor. Calculates and displays total cost of the job and statistics shown in the Expected Output. Note that numbers in your output may not be exactly as shown.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Flow chartStart Take input wall space Take input print galon Calculate no. of galon used to print the wall Calculate no. of hours of la

Pseudocode

This program calculates the price of paint per gallon used to paint a wall.

Take input wall space from the user in square feet and store it to a.

Take another input price of paint per gallon and store it in b.

No. of gallon of paint used to paint given wall = 1.0/(115 * a).

No. of hours of labour needed to paint the wall = 8.0*(115 * b).

Total charge of paint = no. of gallon * price of gallon and labour charge = total no. of labour hours * $20.0.

Total charge needed to paint given wall = paint charge + labour charge.

Program code

import java.util.Scanner;
public class Main{
public static void main(String []args){
  
System.out.println("Enter wall space in square feet :");
double a;
  
Scanner sc = new Scanner(System.in);
a = sc.nextFloat();
  
System.out.println("Enter price of paint per gallon :");
double b;
b = sc.nextFloat();
  
double gallon = (1.0/115)*a;
System.out.println("Gallons of paint : " + gallon);
  
double labour = (8.0/115)*a;
System.out.println("Hours of labour : "+ labour );
  
System.out.println("Paint charges : $" + b*gallon );
  
System.out.println("Labour charge : $" + labour* 20.0);
  
double total = summaryPaint(gallon,b , labour , 20.0) ;
System.out.println("Total cost : $" + total );
}


public static double summaryPaint(double gallon , double paintcost , double labourHours , double labourcost)
{
return gallon*paintcost + labourHours*labourcost ;
}
}



Hierarchy chart

main summarypaint(double gallon, double paintcost, double labourHours , double labourcost))

Add a comment
Know the answer?
Add Answer to:
This exercise requires designing a program which solves the problem described in the problem statement below....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for...

    Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of paint per gallon. The program should display the following data: The use of functions is required....

  • PLEASE HELP WITH CODE PYTHON BASE.!!!!!!!! Tasks: Complete the following programs noted below: Problem 1: A...

    PLEASE HELP WITH CODE PYTHON BASE.!!!!!!!! Tasks: Complete the following programs noted below: Problem 1: A painting company has determined that for 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of paint per gallon. The program should display the following data:...

  • A painting company has determined that for every 110 square feet of wall space, one gallon...

    A painting company has determined that for every 110 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $25.00 per hour for labor. Write a modular program that allows the user to enter the number of rooms that are to be painted (different colors) and the price of the paint per gallon. It should also ask for the square feet of wall space in each room. Rooms and gallons...

  • A painting company has determined that for every 112 square feet of wall space, one gallon...

    A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor. Write a program that asks the user to enter the square feet of wall space to be painted and the price of the paint per gallon. Use a function (or multiple functions if you want) to calculate the following values - you also need to output...

  • I need to write a paint job estimator program in python. I have most of it...

    I need to write a paint job estimator program in python. I have most of it down but i keep getting errors and I dont know how to fix it or what im doing worng specs: A painting company has determined that for every 350 square feet of wall space, one gallon of paint and six hours of labor are required. The company charges $62.25 per hour for labor. Write a program call paintjobestimator.py that asks the user to enter...

  • Paint Job Estimator in Python and Raptor Psusedo

    Hello, I have seen this in Java and C++ but I am trying to learn it in Python ..any help on the code would be great..ThanksPaint job estimatorQuestion DetailsA painting company has determined that for every 115 square feet or wall space, one gallon of paint and eight hours of labor will be required. The company charges$20.00 per hour for labor . Write a program that allows the user to enter the number of rooms to be painted and the...

  • I need help making a javascript program to do the following: A painting company has determined...

    I need help making a javascript program to do the following: A painting company has determined that for every 112 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $35.00 per hour for labor and $15.00 for a gallon of paint. Write a function that takes in the number of square feet of wall space and displays the following data: The number of gallons of paint required The hours...

  • C++, please make it as simple as possible. A Paint Company is hiring you to develop...

    C++, please make it as simple as possible. A Paint Company is hiring you to develop an application to estimate the costs for a job. They have determined that for every 120 square feet of wall area, one gallon of paint and eight hours of labor is required. The company charges US$ 18.00 per hour for labor. Write a modular program that allows the user to enter the number of rooms that are to be painted and the price of...

  • CENGAGE MINDTAP gramming Exercise 3-8 PaintCalculator.java Instructions Assume that a gallon of paint covers about 350...

    CENGAGE MINDTAP gramming Exercise 3-8 PaintCalculator.java Instructions Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompts the user for the length, width, and height of a rectangular room. Pass these three values to a method that does the following: 1 import java.util.Scanner; 2 public class PaintCalculator { 3 public static void main(String args[]) { // Write your code here public static double computeArea double length, double...

  • in python please (1) Prompt the user to input a wall's height and width. Calculate and...

    in python please (1) Prompt the user to input a wall's height and width. Calculate and output the wall's area (integer). (Submit for 2 points). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet (2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). Assume a gallon of paint covers 350 square feet. Store this value in a variable. Output the amount of paint...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT