answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nikklg [1K]
1 year ago
9

Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompt

s the user for the length, width, and height of a rectangular room. Pass these three values to a method that does the following: Calculates the wall area for a room Passes the calculated wall area to another method that calculates and returns the number of gallons of paint needed Displays the number of gallons needed Computes the price based on a paint price of $32 per gallon, assuming that the painter can buy any fraction of a gallon of paint at the same price as a whole gallon Returns the price to the main() method The main() method displays the final price. For example:
Computers and Technology
1 answer:
Makovka662 [10]1 year ago
5 0

Answer:

<em>C++</em>

#include <iostream>

#include <cmath>

using namespace std;

///////////////////////////////////////////////////////////////////////

int noOfGallons(int wallArea) {

   int gallon = 350;

   int gallon_price = 32.0;

   float total_price = 0.0;

   ///////////////////////////////////////////

   float noOfGallons = (float)wallArea/(float)gallon;

   printf("No of gallons needed %.2f", noOfGallons);

   cout<<endl;

   //////////////////////////////////////////

  total_price = noOfGallons*gallon_price;

   return round(total_price);

}

int wallArea(int length, int width, int height) {

   int wall_area = length*width;

   int total_price = noOfGallons(wall_area);

}

///////////////////////////////////////////////////////////////////////

int main() {

   int length, width, height;

   ///////////////////////////////////////////

   cout<<"Enter length: ";

   cin>>length;

   

   cout<<"Enter width: ";

   cin>>width;

   

   cout<<"Enter height: ";

   cin>>height;

   

   cout<<endl;

   ///////////////////////////////////////////

   int total_price = wallArea(length, width, height);

  cout<<"Total price: $"<<total_price;

   ///////////////////////////////////////////

   return 0;

}

You might be interested in
Give the logical function for the following: If cell B7 equals 12, check contents of cell B10. If cell B10 is 10, then the value
ASHA 777 [7]

Answer:

=IF( B7 = 12, ( IF( B10 = 10,"YES", "")), 7) and PRESS ENTER

Explanation:

the above logical if function checks the following

-IF cell B7 is 12, if true, check the value of cell B10, IF cell B10 contains 10 the function should produce YES as output to whatever cell selected, IF B10 is not 10 output of the function should be an empty string, IF B7 is not equal to 12 the the output of the function should be 7.

5 0
2 years ago
1. Which of the following are considered CAD powerhouses?
allsm [11]

Answer:

1. D.Autodesk and microstation.

2. D. the creation of a computer model, paricularly for purposes of studying.

3. A.internet delivered through standard household phone lines.

4. C.3-D sculptures used to pray for fertility.

5. C.technology.

Explanation:

8 0
2 years ago
What happens as the key length increases in an encryption application?
pashok25 [27]
<span>The answer is : Increasing the key length of DES would  protect it against brute force attacks.  </span>Brute force is when the attacker tries every key knowing that one will eventually work.  <span>Key length increase proportionally increases the key space,  having a keyspace l</span>arge enough that it takes too much time and money to accomplish a brute force attack.
6 0
2 years ago
Find the error in the following pseudocode.
Ber [7]

Answer:

Following are the error in the given program are explain in the explanation part .

Explanation:

The main() function call the function getMileage() function after that the control moves to the getMileage() definition of function. In this firstly declared the  "mileage" variable after that it taking the input and module is finished we see that the "mileage" variable is local variable i,e it is declared inside the  " Module getMileage() "  and we prints in the main module that are not possible to correct these we used two technique.

Technique 1: Declared the mileage variable as the global variable that is accessible anywhere in the program.

Technique 2: We print the value of  "mileage" inside the Module getMileage() in the program .

5 0
2 years ago
LensForAll is a company that sells affordable contact lenses on its website. The CEO of the company realizes that an app must be
s344n2d4d5 [400]

Answer:

B, It should be native app so that the device camera can be used by the app.

Explanation:

A native application according to https://searchsoftwarequality.techtarget.com  is a software program that is developed for use on a particular platform or device. Because a native app is built for use on a particular device and its OS, it has the ability to use device-specific hardware and software.

The app should be able to use the device camera to facilitate the virtual contact lenses process.

7 0
2 years ago
Other questions:
  • Mechanical advantage is the ratio of the force required to move a load divided by______
    12·1 answer
  • When using preventative insecticides which holiday period should trigger an application?
    15·2 answers
  • Marco makes $65,000 a year as a graphic designer. He makes a charitable donation of $1,000 each year. He also has $5,000 of busi
    12·2 answers
  • 5.William travels a lot on business purpose. He needs to regularly communicate with his business partner. He also needs to send
    15·1 answer
  • Identify the articulation site that allows us to nod our head ""yes"".
    13·1 answer
  • Two-dimensional array indexes are listed as
    8·1 answer
  • A bunch of computer scientists take over an island and start their own country. They want the license plates to use binary numbe
    11·1 answer
  • You are using a polynomial time 2-approximation algorithm to find a tour t for the metric traveling salesman problem. Which of t
    7·1 answer
  • A ______________ deals with the potential for weaknesses within the existing infrastructure to be exploited.
    10·2 answers
  • The symbol asterisk(*) in a select query retrieves​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!