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, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
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
World Languages, 02.01.2022 14:00
question
Mathematics, 02.01.2022 14:00
question
Mathematics, 02.01.2022 14:00
question
Biology, 02.01.2022 14:00