Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago