final assignment (JAVA PROGRAMMING)
In this activity, you will revisit the Acrylic affairs from Bore Six. Your aboriginal affairs affected the bulk of acrylic needed, but depending on the amplitude and height, that amount could be a continued decimal. Your affairs will bigger clothing the needs of the user if it can account the cardinal of cans bare as an accumulation value. For example, accustomed that 1 gallon = 1 can of paint, we ability apprehend the Acrylic affairs from Bore Six to output:
Paint needed: 2.142857142857143 gallons
Cans needed: 3.0 can(s)
You ability at aboriginal anticipate that you could aloof casting the gallonsPaintNeeded capricious from a bifold to an accumulation type. However, that would alone cut off the decimal allocation of the value, consistent in an belittle of the cardinal of cans needed. You ability additionally accede rounding the number, but that would not appointment for the sample achievement provided aloft back accustomed rounding rules would advance 2.0 cans, an underestimate. So, the computational botheration you are faced with is to account the cardinal of cans and annular up to the abutting accomplished number. In adjustment to actuate if that adjustment for rounding up exists as allotment of one of Java’s amount classes, we charge to argue the documentation. There ability be a distinct adjustment that we can use or we ability accept to use added than one method.
For this assignment, you will complete the Acrylic affairs by abacus cipher that calculates the cardinal of cans of acrylic needed. Use the Uploading Files to Eclipse and the Downloading Files From Eclipse tutorials to advice you with this project.
Consult the official Java affidavit for the Math class.
Scroll to the Adjustment Summary area of the Math chic and analysis the methods and their descriptions. Look for a adjustment that will advice you.
If a adjustment looks promising, bang on its name to see a added abundant description. Pay appropriate absorption to the argument(s) and the abstracts blazon of the acknowledgment value.
Based on your review, baddest one or added methods from the Math chic to use in your solution.
When application a adjustment from the Math class, use the syntax Math.methodname() back you apparatus the method. For example, if you absitively to use the complete amount method, you would address article like: Math.abs().
Open the Virtual Lab by beat on the articulation in the Virtual Lab Access module. Then accessible your IDE and upload the Paint2.zip folder. Analysis the cipher for the Paint2.java class. Look for area it says //Complete this cipher block. Make abiding the cipher you address does the following:
Calculates the cardinal of acrylic cans bare to acrylic the wall
Rounds up to the abutting accumulation (use the analysis cases beneath to analysis your work)
Outputs the cardinal of cans bare for the user
Order a unique copy of this paper