Write a Java program that calculates the cost of painting a room, assuming the room is...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Java program that calculates the cost of painting a room, assuming the room is rectangular and has four rectangular walls; prompt the user for the length of the room, the width of the room, the ceiling height, and the price per square foot. Sample program run Enter the length of the room: 35 Enter the width of the room: 22 Enter the ceiling height: 8 Enter the price per square foot: 5 The cost of a paint job for a 35 by 22 room is $4560 Coding Requirements for this and all Programming Assignments: Course coding conventions: organizations use coding conventions to ensure consistency in their programs and facilitate code maintenance; in this course, we will start using the following: a Program Description: your program must have a comment at the top briefly describing what the program does. Usually, one sentence is enough, for example: // This program calculates the cost of painting a room based on the room // dimensions and cost per square foot entered by the user. b Variable names: use lower camel case; do not use underscore. Example: totalCost instead of total_cost. c Constant names: use all uppercase; use underscore to separate words. Example: MAX_WIDTH Write a Java program that calculates the cost of painting a room, assuming the room is rectangular and has four rectangular walls; prompt the user for the length of the room, the width of the room, the ceiling height, and the price per square foot. Sample program run Enter the length of the room: 35 Enter the width of the room: 22 Enter the ceiling height: 8 Enter the price per square foot: 5 The cost of a paint job for a 35 by 22 room is $4560 Coding Requirements for this and all Programming Assignments: Course coding conventions: organizations use coding conventions to ensure consistency in their programs and facilitate code maintenance; in this course, we will start using the following: a Program Description: your program must have a comment at the top briefly describing what the program does. Usually, one sentence is enough, for example: // This program calculates the cost of painting a room based on the room // dimensions and cost per square foot entered by the user. b Variable names: use lower camel case; do not use underscore. Example: totalCost instead of total_cost. c Constant names: use all uppercase; use underscore to separate words. Example: MAX_WIDTH
Expert Answer:
Answer rating: 100% (QA)
The source code for the given problem Java code import javautilScanner public class RoomPaintingCost... View the full answer
Related Book For
Financial Algebra advanced algebra with financial applications
ISBN: 978-0538449670
1st edition
Authors: Robert K. Gerver
Posted Date:
Students also viewed these programming questions
-
Create the following GUI. tk ID Number Name Category Price Onhand Save Record Clear Text Product Name Display Record Clear Text Note that the large panel on the right side of the GUI is a Text...
-
What should be the STP (Segmentation, Targeting, Positioning) based on boat industry in Canada?
-
Explain this answer please a. Combining Traditional Methods and High-tech Innovations Western companies do not have adequate access to equivalent workforce. Using a combination of old ways and...
-
What constant should replace the question mark in this system so that the solution set is {(1, 1, 1)}? 2x - 3y + -5x + 2y z = 0 - 2 = x + y + 2z = ? 4 -4
-
Negate the statements. (a) If two triangles are similar, their sides are equal. (b) There exists a real number x such that x2 = 5. (c) For every positive integer n, if n is even, then n2 is even...
-
The Stock of Payout Corp will go ex-dividend tomorrow. The dividend will be .50 per share, and there are 20,000 shares of stock outstanding. The market value balance sheet for Payout is shown on the...
-
A centrifugal pump is an example of a/an (a) Closed system (b) Open system (c) Isolated system (d) None of these.
-
The T-accounts below summarize the ledger of Zimmer Landscaping Company at the end of the first month of operations. Instructions (a) Prepare the complete general journal (including explanations)...
-
What is tactical marketing? Please explain and give me a few example. Why is Zara one of the top innovative companies in the world?
-
Harper Morgan owns White Mountain Assessments in Laconia, New Hampshire. The standard workweek is 40 hours. For the weekly payroll ending September 9, 2022, checks dated September 14, 2022, complete...
-
In 2019, a major automotive manufacturer, called Auto Inc., discovered that one of its former employees had stolen confidential designs and provided them to a competitor. The employee, a design...
-
Distinguish between the concepts of motive and intent in the criminal law. Can you cite an instance where, despite good motives, a person would be guilty of a crime?
-
Should the criminal law punish a person whose mere carelessness, as opposed to willfulness, causes harm to another?
-
Name some important similarities and distinctions between the offenses of robbery and extortion.
-
Given the fact that the common-law requirement of intent is not an element of strict liability crimes, what rationale supports legislative enactment of such offenses?
-
Is it fair to assess the same degree of fault and impose the same punishment on an accomplice as on a perpetrator? What rationale supports your conclusion?
-
If 20 persons can work in 7 days then calculate persons required to complete the work in 28 days?
-
Which of the following streaming TV devices does not involve use of a remote controller? A) Google Chromecast B) Apple TV C) Amazon Fire TV D) Roku
-
Nick's annual salary is $90,000. His employer matches his 401k contributions at $0.75 for each dollar up to 8% of his annual salary. Nick contributes $350 from each biweekly paycheck to his 401k...
-
How much more would $10,000 earn in three years compounded daily at 4.33%, than compounded semiannually at 4.33%?
-
Use the mortality table to answer parts a and b. a. If the company insures 10,000 63-year-old males, how many are expected to die before their 64th birthday? Round to the nearest integer. b. Based on...
-
What services does an underwriter provide for a company that employs the underwriter to facilitate going public? What factors influence an issuing firms choice of underwriter?
-
From the perspective of the entrepreneur, what are the pros and cons of an IPO as opposed to private sale of the venture to a public company in exchange for stock or cash?
-
Describe the process of going public using an IPO, starting with underwriter selection and proceeding through the various stages that lead to determination of an issue price.
Study smarter with the SolutionInn App