Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CODE MUST BE IN JAVA 1. All employees in a company, by default, start with 2 weeks of vacation per year. If the employee has
CODE MUST BE IN JAVA 1. All employees in a company, by default, start with 2 weeks of vacation per year. If the employee has served the company for 3 years, (s)he gets 3 weeks of vacation. Then, every additional year of service gets .2 additional vacation days, upta 6 years of service. Beyond 6 years, employees get 1 additional vacation day for each year of service. Write the code for yacation Rays() method: get # of years of service as a parameter and return the # of vacation days. Note: one week of vacation translates to 5 days. There is no need to code main or get user input or print output etc. static int vacationDays (int vears) 2. Write a program to control the seating for any event, as per the following details: Prompt the user to input # of available seats and get it first. Then, keep admitting the groups as long as you can accommodate (keep track of available seats). When a group cannot be accommodated, output how many seats are available. Once all seat:s are taken, program can end. Here is the sample input & output. of available seats: 100 How many people in your party: '7 Enjoy the show! How many people in your party: 5 Enjoy the show! How many people in your party: 8 Enjoy the show! . . . (after accommodating several more groups) How many people in your party: 5 Sorry, only 4 seat (s)available. How many people in vour party: 3 Enjoy the show! How many people in your party: 2 Sorry, only 1 seat (s) available How many people in your party: 1 Enjoy the show! All seats are taken & Event admission closed. Bye
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