Thursday
May 23, 2013

Homework Help: Programming

Posted by Scotty on Monday, February 25, 2008 at 2:10am.

How do I declare how many boxes there are and how much per box with this information.....
Write an IceCreamStation class in Java. An ice cream station sells ice cream cones, but needs to buy ice cream (by the pint) and cones (by the box) to make the ice cream cones. A box of cones contains 20 10 cones and has a fixed price of $2.50 per box; a pint of ice cream also has a fixed price of $3.25 per pint. To make an ice cream cone, you need a single cone and 1/4 of a pint of ice cream. The price of an ice cream cone is not fixed and is indicated during a sale.

An ice cream station should be able to monitor its inventory: how many cones it has left as well as how much ice cream it has left. In addition, it should keep track of how many ice cream cones it has sold so far and how much money it has on hand. When an ice cream station is created, start it off with $100.00.

You will need to implement the following methods for the IceCreamStation class:

* buyCones: buys cones by the box; number of boxes is indicated as a parameter
* buyIceCream: buys ice cream by the pint; number of pints is indicated as a parameter
* sellIceCreamCones: sells ice cream cones; both the number of ice cream cones and the unit price are indicated as parameters
* getConesLeft: returns the number of cones left
* getIceCreamLeft: returns the amount of ice cream left (in pints)
* getNumIceCreamConesSold: returns the number of ice cream cones sold
* getCashOnHand: returns the cash the station has on hand (in dollars)

No one has answered this question yet.

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

programming.Java language - Write a program to plot a face. Provide a class ...
Arithmetic - Whichh is cheaper of the 2 following boxes?: One liter (1000 ml) ...
calculus - A company wants to bid on an order of 20,000 square based boxes which...
algebra - A shipping clerk wishes to determine the weights of each of the 4 ...
Algebra 2 - Linear Programming Your club is making boxes and plant hangers to ...
College Algebra - Staples recently charged $17.99 per box of Pilot Precise ...
physics - In loading a lorry a man lifts boxes each of weight 100N throughta ...
math - A certain brand of cereal costs $3.25 per box before sales tax is added. ...
MAT101 - Suppose you have a cookie stand, and when you charge $3 per cookie box ...
Math 101 - Suppose you have a cookie stand, and when you charge $3 per cookie ...

For Further Reading

Search
Members
Community