Advertisement
jbonanno

calculateVacationPrice.java

Jun 18th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.54 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package vacationprice;
  6.  
  7. /**
  8.  *
  9.  * @author j
  10.  */
  11. public class calculateVacationPrice
  12. {
  13.    static  int mealPrice = 8;
  14.    static  int weeklyPrice = 1000;
  15.  
  16.    
  17.    
  18.    
  19.  
  20.    public static double calculateVacationPrice(int weeksOnVacation, int peopleNum, int mealsNum)
  21.     {
  22.      
  23.        double vacationPrice = (weeksOnVacation * peopleNum * weeklyPrice)+ (mealsNum*8);
  24.          
  25.        
  26.        return vacationPrice;
  27.    }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement