Advertisement
Guest User

Untitled

a guest
Oct 24th, 2012
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public double shippingCharge(){
  2. return if (packageWeight <= 2 && packageWeight > 0) {
  3. shippingCharge = chargedMiles * 1.10;
  4. }
  5. else if(packageWeight <= 6) {
  6. shippingCharge = chargedMiles*2.20;
  7. }
  8. else if(packageWeight <= 10) {
  9. shippingCharge = chargedMiles*3.70;
  10. }
  11. else {
  12. shippingCharge = chargedMiles*4.80;
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement