JOption Pane 1,

I have to write a program for the Shipshape packing Company wants a program for their Order Department to calculate and display the price of an order. The order clerks enter the number of the units ordered. The prices are as follows:

1-6?0

7-1145

12-21 35

22-60 30

Over 6025

I may have an idea using if statement but confused to write a calculation on if statement anyone has any suggestion please help.

[446 byte] By [Shyaa] at [2007-10-2 13:24:06]
# 1

This can be solved with a simple if-else format. This is probably a class assignment, so I'll let you figure the most part out.

I would just set up a series of ifs and else if's that test if a number is in a certain range. Then inside the if, you would just multipy the number of units by the appropriate price. Quite simple.

Good luck.

Smurfera at 2007-7-13 11:02:33 > top of Java-index,Java Essentials,New To Java...