Question

C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION ) (Please screenshot window form of this program and...

C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION )
(Please screenshot window form of this program and write code on computer. Thank you very much !)

For this week's assignment , create and complete a Windows application for the following question.

Airline Reservation System: An airline has just bought a computer for its new reservation system. Develop a new system to assign seats on the new airplane( capacity: 10 seats)

Display the following alternatives: "Please type 1 for first class, and please type 2 for Economy". If the user enters 1, your application should assign a seat in the first class( seats 1-5). If the user enters 2, your application should assign a seat in the economy class( seats 6-10).

Use a one-dimensional array of bool to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all the seats are empty. As each seat is assigned, set the corresponding element of the array to true to indicate that the seat is no longer available.

Your program should never assign a seat that has already been assigned. When the economy section is full, your program should ask the user if he would like to be placed in the first class, and vice-versa. If yes, make the appropriate seat assignment. if no, display the message, " Next flight leaves in 3 hours".

Remember to include comments in your code .

0 0
Add a comment Improve this question Transcribed image text
Answer #1

private void button1_Click(object sender, EventArgs e)
{
bool[] seats = new bool[10];
int option = Convert.ToInt32(inputTxt.Text); //selected option
if (option == 1)
{
for (int i = 0; i < 5; i++)
{
if (seats[i] != true)
{
seats[i] = true;
}
else
{
continue;
}
}
}
else
{
for (int i = 5; i < 10; i++)
{
if (seats[i] != true)
{
seats[i] = true;
}
else
{
continue;
}
}
}
}
}

Add a comment
Know the answer?
Add Answer to:
C# WINDOWS FORMS APPLICATION (not CONSOLE APPLICATION ) (Please screenshot window form of this program and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For this week's assignment , create and complete a Windows application for the following question. Airline...

    For this week's assignment , create and complete a Windows application for the following question. Airline Reservation System: An airline has just bought a computer for its new reservation system. Develop a new system to assign seats on the new airplane( capacity: 10 seats) Display the following alternatives: "Please type 1 for first class, and please type 2 for Economy". If the user enters 1, your application should assign a seat in the first class( seats 1-5). If the user...

  • C# Question. Please do a lot of documenting of what your code did and thorough explaining...

    C# Question. Please do a lot of documenting of what your code did and thorough explaining in your // comments. A small airline has just purchased a computer for its new automated reservations system. You have been asked to develop the new system. You’re to write an app to assign seats on each flight of the airline’s only plane (capacity: 10 seats). Display the following alternatives: Please enter 1 for First Class or 2 for Economy. If the user types...

  • Programming language C++. (Airline Reservations System) A small airline has just purchased a computer for its...

    Programming language C++. (Airline Reservations System) A small airline has just purchased a computer for its new au- tomated reservations system. You have been asked to develop the new system. You’re to write an app to assign seats on each flight of the airline’s only plane (capacity: 10 seats). Display the following alternatives: Please type 1 for First Class and Please type 2 for Economy. If the user types 1, your app should assign a seat in the first-class section...

  • I could really use some help with this question! Thanks!! Must use C# and it must...

    I could really use some help with this question! Thanks!! Must use C# and it must be a console application ------------------------------------------------------------------------------------------------------------------------------ You start working on this w/o arrays just with seats: bool f1, f2,..., e1, e2,.... You can use Console application for now. A small airline has just purchased a computer for its new automated reservations system. You have been asked to develop the new system. You’re to write an app to assign seats on each flight of the airline’s...

  • (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system

    (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. The president has asked you to program the new system. You'll write a program to assign seats on each flight of the airline's only plane (capacity: 10 scats).Your program should display the following menu of alternatives:Please type 1 for "first class"please type 2 for "economy"If the person types 1 , then your program should assign a seat in the first class section (seats...

  • Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your...

    Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your program should display the following menu of alternatives: Please type 1 for "section A, $50/ticket" type 2 for "section B, $70/ticket", and type 3 for "section C, $80/ticket".  If the user types 1, then your program should assign a seat in the A section (seats 1–50). If the user types 2, then your program should assign a seat in the B section (seats 51–100). If...

  • I have to write a C program to assign seats on each flight of the airline’s...

    I have to write a C program to assign seats on each flight of the airline’s only plane (capacity: 40 seats, in 10 rows). For the sake of simplicity, assume that each row has 4 seats labeled A, B, C, D. Your program should display the following menu of alternatives: Please type 1 for "first class" Please type 2 for "business class" Please type 3 for “economy class”. If the person types 1, then your program should assign a seat...

  • A small airline has just purchased a computer for its new automated reservations system

    OBJECTIVE:The objective of the assignment is to use object-oriented design techniques to design an application.DESCRIPTION:A small airline has just purchased a computer for its new automated reservations system. You have been hired to design an airline seating application for the FBN (Fly-By-Night) Airlines. In this portion of the assignment, the task is to do the object oriented design for the application. This system will be used only by the company and its employees. Customers will not interact with the system.Your...

  • Labs CSIT 210 Introduction to Programming LAB 9B Arrays Change the program AirlineDriver.java to assign passenger seats in an airplane. Chesapeake Airlines is a small commuter airline with seats for...

    Labs CSIT 210 Introduction to Programming LAB 9B Arrays 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: 1ABCD 2ABCD 3ABCD 4ABCD 5ABCD 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...

  • Programming Language: C++ Develop a seat reservation system for your airline. Consider the following airline seating...

    Programming Language: C++ Develop a seat reservation system for your airline. Consider the following airline seating pattern: A         1          2          3          4          5          6          7          8          9          ……    100 B         1          2          3          4          5          6          7          8          9          ……    100 AISLE C         1          2          3          4          5          6          7          8          9          ……    100 D         1          2          3          4          5          6          7          8          9          ……    100 Either use 2D STL array (array that contains array) or 4 single dimensional STL arrays of size 100. Write a program to display a menu to the user with the options to reserve a seat of choice, reserve a window seat, reserve an aile seat, reserve a seat (any available), withdraw reservation, update reservation (change seat) and display...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT