ShippingCharges Class
The Fast Freight Shipping Company charges the following rates:
Weight of Package (in kilograms) | Rate per 500 Miles Shipped |
2 Kg or less | $1.10 |
Over 2 Kg but not more than 6 Kg | $2.20 |
Over 6 Kg but not more than 10 Kg | $3.70 |
Over 10 Kg | $4.80 |
The shipping charges per 500 miles are not prorated. For example, if a 2 Kg package is shipped 550 miles, the charges would be $2.20.
Design a class that stores the weight of a package and has a method that returns the shipping charges.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.