subject
Computers and Technology, 14.10.2021 23:20 ari313

For this assignment, you will complete the Paint program by adding code that calculates the number of cans of paint needed to paint a wall, given its height and width. The following table shows four different test cases with sample input and output values that your completed program will need to handle. Input:Input:Input:Input:30257.522.8 203525.421.6Output:Output:Output:Ou tput:Paint needed: 2.142857142857143 gallonsCans needed: 3.0 can(s)Paint needed: 0.48857142857142855 gallonsCans needed: 1.0 can(s)Paint needed: 2.0 gallonsCans needed: 2.0 can(s)Paint needed: 1.5675428571428571 gallonsCans needed: 2.0 can(s)First, you will select a method that appropriately handles all of the included test cases by consulting the official Java documentation for the Math class. Use the following tips to help you navigate the documentation:Scroll to the Method Summary section of the Math class and review the methods and their descriptions. Look for a method that will help you round a value up to the nearest integer. If a method looks promising, click on its name to see a more detailed description. Pay special attention to the argument(s) and the data type of the return value. Based on your review, select one or more methods from the Math class to use in your program. Open the Virtual Lab by clicking on the link in the Virtual Lab Access module. Then open your IDE and upload the Paint2.zip folder. Review the code for the Paint2.java class, looking for the comment //Complete this code block. Here, you will implement your selected method so that your program meets the required functionality. The program should do the following:Calculate the number of paint cans needed to paint the wall. Round up to the nearest integer. Use the test cases to check your work. Output the number of cans needed for the user. TIP: When implementing your selected method from the Math class, use the syntax Math. methodname(). For example, if you decided to use the absolute value method, you would write the following code: Math. abs().

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:20
Your program will make use of long long int variables for all calculations. note: the use of long long int requires that you have c++11 support. you should have this automatically if you are using a newer version of visual studio. the support is there for gcc as well, but you may need the -std=c++11 or -std=c++0x compiler flag. you first need to read in the total number of seconds. there is no prompt for the read (that is, you just do the cin without using a cout to display a prompt). this is going to seem a little strange when you are running your program in your ide
Answers: 2
question
Computers and Technology, 22.06.2019 10:00
You need a reliable network for about twenty-five computers that will be distributed across a large building. it is important that the network be relatively cheap. which topology should you use?
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
You know the right answer?
For this assignment, you will complete the Paint program by adding code that calculates the number o...
Questions
question
English, 11.11.2020 07:20
question
Mathematics, 11.11.2020 07:20
question
Social Studies, 11.11.2020 07:20
question
History, 11.11.2020 07:20
question
Mathematics, 11.11.2020 07:20
Questions on the website: 13722362