Question
Java Program, A group of friends is organizing a ski trip. Write a program CostEstimate.java that performs the following, 1) Hotel room cost is $120
Java Program, A group of friends is organizing a ski trip. Write a program CostEstimate.java that performs the following, 1) Hotel room cost is $120 per day and is limited to 4 people.Lift Ticket costs as follows: A) For a group with 1-5 people, cost is $90 per person per day. B) For a group with 6-10- people, cost is $80 per person per day. C) For a group with more than 10 people, cost is $70 per person. 2)People in the group will split the total cost evenly. Define a method called splitCost which takes one parameter, the number of people, calculates per person price (room cost plus lift tickets cost), then returns the cost per person. 3) Call splitCost method in the program to take user input of the size of the group, then estimate the trip cost per person per day. Program should be able to do multiple estimates until user enter -1 to quit.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started