Dimensional array lab

Assignment Help HR Management
Reference no: EM13876400

Chapter 7 Two - Dimensional Array Lab

Change the program (AirlineDriver.java) to assign passenger seats in an airplane. Chesapeake Airlines is a small commuter airline with seats for 20 passengers in 5 rows of 4 seats each. Here is the layout:

1 A B C D

2 A B C D

3 A B C D

4 A B C D

5 A B C D

The user enters the row (1 - 5) and the seat (A - D). The seat entry may be lowercase.

Use this code to enter the seat:

System.out.print(" Enter row and seat ");

seat = scan.nextLine();

 

r = seat.??

c = seat.??

What will you need to do to change r to a valid row entry?

What will you need to do to change the character (A, B, C, D) in the variable c to the column index in the array? Check the program example on page 347. I have included the LetterCount program in the Chapter Seven Activities.

The program checks the array to see if the seat is available. An X in the array indicates the seat is not available.

If the seat is available, assign an X to that position in the array. If it's unavailable, display a message to the passenger. Use the displaySeats method after each row/seat entry.

After some seats are assigned, the layout may look like this:

1 X B C X

2 A B C D

3 A X C X

4 A B C D

5 A B C D

Continue processing requests until the user enters -1 for seat.

Reference no: EM13876400

Questions Cloud

Create a class called student : Java Create a class called Student that contains: - A field to store the name - A field to store their average numerical grade
Assume poisson properties apply : Leaks occur along a pipeline at the mean rate of 0.5 leaks per mile. Assume Poisson properties apply. What is the probability that a 3 mile stretch will have no leaks? (to four decimal places)
Value bond outstanding with coupon rate : Yan Yan Corp. has a $10,000 par value bond outstanding with a coupon rate of 5.2 percent paid semi annually and 28 years to maturity. The yield to maturity on this bond is 4.3 percent. What is the price of the bond?
In a method named setfavoritesports declare : In a method named setFavoriteSports declare the sports array and populate it.  This method will return the sports array to the calling statement.  The 9 in the prompt below will print 1 for the first sport, then 2 for the 2nd one and so forth.  Use t..
Dimensional array lab : Change the program (AirlineDriver.java) to assign passenger seats in an airplane. Chesapeake Airlines is a small commuter airline with seats for 20 passengers in 5 rows of 4 seats each. Here is the layout:
East and west. bmi has a cost of capital : Back Mountain Industries (BMI) has two divisions: East and West. BMI has a cost of capital of 15%. Selected financial information (in thousands of dollars) for the first year of business follows:
Provide a dollar estimate of the annual cost savings : Provide a dollar estimate of the annual cost savings associated with the recently enacted quality improvements. Show calculations.
Did anyone different get admitted : Is this enough information to determine who should get into the University? If not what other information would you want and why
Estimate financial benefits associated with adoption of jit : You have been asked, in conjunction with your position as the management accountant for the company, to construct an Excel spreadsheet that can be used to estimate the financial benefits associated with the adoption of JIT.

Reviews

Write a Review

HR Management Questions & Answers

  Examine the effectiveness of your organizations training

analyze the effectiveness of your organizations training and development process. prepare a powerpoint presentation

  Reflect on the importance of capital budgeting

Critically reflect on the importance of capital budgeting. Why is this such a heated subject in many boardrooms? How does capital budgeting promote the financial health of an organization?

  Jobs regarding communication

Write an essay about how technology helps manager better with their jobs regarding communication, explain how today's technology helps managers in the work field

  Top executives

What is the difference between the position a person holds in a company and their political power and Is the top executive in an organization always the person who holds the most political power?

  How often should formal performance evaluations take place?

How often should formal performance evaluations take place? Informal ones?

  Global organizational goals

How do global human capital goals differ from global organizational goals? How can global human capital goals be strategically aligned with the global organizational goals?

  Determine an organization you will analyze and evaluate

selection of the firmdetermine an organization you will analyze and evaluate over the six weeks of this course. the

  Doing business with the poor a field guide

Please read the following Harvard Business Review article: Doing Business with the poor, a field guide

  Technology utilized to increase employee

technology utilized to increase employee producvtivityassessment of the technology requirements relevant to employee

  After viewing flsa tutorial located in this weeks lecture

after viewing the flsa tutorial located in this weeks lecture complete the reading and review the lecture notes in

  Explain a new product idea

Make a professional proposal that explain a new product idea in detail, giving brief consideration to the feasibility of the following categories

  Develop a selection process for a human resource manager

develop a selection process for a human resource manager description specificationsyour selection process should

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd