- Terminal+1 // QuartsToGallons.java2 class QuartsToGallons {sandbox $ IWrite a program that declares a constant named QUARTS_IN_GALLONpublic static void main(String[] args) {// Write your code...


Programming Exercise 2-4<br>Instructions<br>QuartsToGallons,.java<br>+<br>>- Terminal<br>+<br>1 // QuartsToGallons.java<br>2 class QuartsToGallons {<br>sandbox $ I<br>Write a program that declares a constant named QUARTS_IN_GALLON<br>public static void main(String[] args) {<br>// Write your code here<br>}<br>3<br>which holds the number of quarts in a gallon (there are 4 quarts to a gallon).<br>4<br>Also declare a variable named quartsNeeded to represent the number of<br>5<br></><br>quarts needed for a painting job, and assign an appropriate value. Compute<br>6 }<br>and display the number of gallons and quarts needed for the job. Display<br>explanatory text with the values-for example, A job that needs 18 quarts<br>requires 4 gallons plus 2 quarts.<br>When submitting the program for testing/grading, assign the value 18 to<br>quartsNeeded.<br>Grading<br>Write your Java code in the area on the right. Use the Run button to compile<br>and run the code. Clicking the Run Checks button will run pre-configured<br>tests against your code to calculate a grade.<br>Once you are happy with your results, click the Submit button to record your<br>Score.<br>

Extracted text: Programming Exercise 2-4 Instructions QuartsToGallons,.java + >- Terminal + 1 // QuartsToGallons.java 2 class QuartsToGallons { sandbox $ I Write a program that declares a constant named QUARTS_IN_GALLON public static void main(String[] args) { // Write your code here } 3 which holds the number of quarts in a gallon (there are 4 quarts to a gallon). 4 Also declare a variable named quartsNeeded to represent the number of 5 quarts needed for a painting job, and assign an appropriate value. Compute 6 } and display the number of gallons and quarts needed for the job. Display explanatory text with the values-for example, A job that needs 18 quarts requires 4 gallons plus 2 quarts. When submitting the program for testing/grading, assign the value 18 to quartsNeeded. Grading Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre-configured tests against your code to calculate a grade. Once you are happy with your results, click the Submit button to record your Score.
Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here