Saturday

February 28, 2015

February 28, 2015

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

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)

**Answer this Question**

**Related Questions**

Algebra 2 - An ice-cream parlor sells sundaes with 3 different types of ice-...

Algebra! - An ice cream parlor sells sundaes with 3 different type of ice cream ...

Math ( Word Problem ) - Joel sells ice cream cones at the county fair. he has to...

Math 6 - n ice cream stand sells chocolate, vanilla, and strawberry ice cream ...

Maths - An ice cream store sells 20 different flavors of ice cream and 3 ...

Algebra 2 - an ice cream store has 31 flavors of ice cream and 10 toppings. A ...

math - one out of every five people who buy ice cream buys vanilla ice cream. If...

Economics - A newspaper story on the effect of higher milk prices on the market ...

algebra2 - An ice-cream parlor sells sundaes with 3 different types of ice-cream...

Algebra 2 - An ice-cream parlor sells sundaes with 3 different types of ice-...