Posted: March 6th, 2014

Programming assignment HELP i cannot make it run without errors

specifications:
The Burly Bottling Company wants to develop a program to track the number
of containers, and number of ounces left to be delivered. The company would
like to use as few containers as possible on any given order. These deliveries
are usually small in size. There are two sizes of containers a 40 oz. and a
6 oz.
CLICK HERE TO GET THIS PAPER WRITTEN
The program will read in one integer, the total number of oz. of castor oil to
be delivered in a given order. Based on the given input value, the program
will calculate and print the number of larger containers, the number of
smaller containers, and the number of ounces left over.

The number of ounces for containers could change at any time, so they must be
named constants, not literal constants. Each named constant will be declared at
the top of the program. Below that, each named constant is referred to only by
its name.

Call these two named constants:
SIZE_1
SIZE_2

CLICK HERE TO GET THIS PAPER WRITTEN

import java.util.Scanner;
public class Liquid
{
public static void main(String[] args)
{
// Declare all named constants.
final int SIZE_1 = 40; // Container size 1 in ounces.

// Declare as a named constant the number of ounces in the
// second container.
// This statement is similar to the final int statement above.

// [Insert code here]

// Declares the Scanner object to read in input.
Scanner scan = new Scanner(System.in);

// Declare all other variables that you will need.
int totalOunces,
numSize1,
numSize2,
ouncesLeftOver;

// Prompt user for the total number of ounces to be shipped.

// [Insert code here]

// Read in the user’s input and store the information into a variable

// [Insert code here]

// Calculate the number of container 1, container 2, and left over
// ounces here.

// [Insert code here]

// Print out the results.
// Write System.out.println statement(s) to print out the nine lines of
// output that are required.
// Do not calculate the values inside of the output statements.
// The values to be printed should already be available in the variables
// and named constants that were declared above.

// [Insert code here]

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Live Chat+1-631-333-0101EmailWhatsApp