Question: Write a Java program for each question below. You can create a separate NetBeans project for each question. 7.11 Write statements that perform the following
Write a Java program for each question below. You can create a separate NetBeans project for each question. 7.11 Write statements that perform the following one-dimensional-array operations, note that you can write one main method with all of these operations in it. 1. Set the 10 elements of integer array counts to zero. 2. Add one to each of the 15 elements of integer array bonus. 3. Display the five values of integer array bestscores in column format. 7.14 (Variable-Length Argument List) Write an application that calculates the proquct of a series of integers that are passed to method product using a variable-length argument list. Test your method with several calls, each with a different number of arguments. 7.19 (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. You've been asked to develop the new system. You're to write an application to assign seats on each flight of the airline's only plane fcapacity: 10 seats). Your application should display the following alternatives please type 1 fon First class and Please type 2 for fconciny. If the user types 1. your application should assign a seat in the first-class section (seats 1-5). If the user types 2, your application should assign a seat in the economy section (seats 6-10). Your application should then display a boarding pass indicating the persons seat number and whether its in the first-class or economy section of the plane. Use a one-dimensional array of primitive type boolean to represent the seating chart of the plane. Initialize alr the elements of the arrav to fal se to indicate that all the seats are empty. As each seat is assigned, set the corresponding efement of the array to true Your application should never assien a seat that has already been assigned. When the economy section is full, your application should ask the person if it' acceptable to be olaced in the first class section (and vice vera), If yes, make the appeopriate seat arsignment. If no, ditplay the message "Next fi1eht leaves in a hours
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
