ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 03 May 2017 My Price 9.00

Chapter 8 – Case 2 Airline Seat Selection

I have a project that is due today by 11:00pm cst . I have attached the instructions to the project. 

 

 

Chapter 8 – Case 2 Airline Seat Selection Figure 1 Instructions
In this case, you will create a Visual Basic solution that allows the Island Breezes Sea Planes airline to assign
seats to passengers. This program demonstrates the use of parallel one-dimensional arrays. One array is used to
represent the availability of each seat. The other array is used to manage the RadioButton controls on the form. It
introduces the technique of using an array of RadioButton objects. Here are instructions on how to design and
code this project:
Step 1: Create the Project:
Create a Visual Basic Project using the project name “AirplaneSeating”.
Step 2 – Design the Form:
Design the form as shown in Figure 1. You will need two button controls, one textbox, one group box, eight radio
buttons, one picture box, and two label controls.
Step 3 – Declare the form-level arrays:
Declare an array of Boolean values to indicate the availability of each seat:
Private availableSeats(7) As Boolean
Declare an object array as type RadioButton:
Private buttons(7) As RadioButton
Step 3 – Add code in the Form’s Load event to initialize the arrays:
Each object in the buttons array must be initialized to be a RadioButton object. In the Form’s Load event,
write a loop to initialize each array element using this syntax:
buttons(i) = New RadioButton
After this loop, load each individual radio button into an array position, using this syntax (in this example, the first
radio button control’s name is seat10ARadioButton, and it is being loaded into the first object array position):
buttons(0) = seat10ARadioButton
Do this for each radio button control.
Finally, write a loop to set the Checked property of all of the buttons array elements to False. Step 4 – Create a sub procedure for showing seat availability on the form:
Create a sub procedure named UpdateSeatButtons that will loop through the availableSeats array. If an
element in the availableSeats array equals False, set the corresponding buttons array element’s Enabled
property to False to visually indicate that this seat is no longer available.
Step 5 – Create a function for determining if there are any seats still available:
Create a Boolean function named CheckForAvailable that will loop through the availableSeats array to
determine if there are any seats still available. If there is at least one seat available, return a True value;
otherwise, return False.
Step 6 – Add code in the Confirm Seat button’s Click event to update the seating chart:
Loop through the buttons array to determine which button was selected. Set the corresponding
availableSeats array element to False. Then call the UpdateSeatButtons sub procedure to update the
visual seating chart.
Call the CheckForAvailable function to determine whether you should display a message indicating that the
flight is full.
Step 7 – Finish up:
Be sure to add the code for the Exit button.
Step 8: Save and run
Save all files, then start the application. Test the program using various selections. Figure 2 shows a sample run
of this program, with the user’s choices shown. Notice that the unavailable seats are grayed. Figure 2
Extra Credit:
Add a second form to the project that produces a visual “boarding pass”. Design the form to look like a printed
boarding pass. Include the passenger name and the seat assignment.

Attachments:

Answers

(11)
Status NEW Posted 03 May 2017 04:05 AM My Price 9.00

-----------

Attachments

file 1493786653-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)