Assignment #1 Instructions: Assigning Seats - planeseats Through this programming assignment, the students will learn to do the following: 1. Know how to use a Makefile. 2. Perform basic C commands. 3. Use arrays, integers and strings. This assignment asks the user to write a program to assign seats in an airplane. There will be 12 seats on the plane, 4 in first class and 8 in economy. • The program should display the following menu for the user Please type 1 for "first class" Please type 2 for "economy" Please type to quit • If the user types 1 then the user should be assigned a seat in first class. If the user types 2 then the user should be assigned a seat in economy. • If the user types O for a sentinel value the program should ext with a O return code. • The program should then print a line indicating the seat the person was assigned. This would be like a boarding pass. should not assign a seat that has already been assigned. If all seats in the desired section are taken, but there are available seats in the other section, then the user should be asked if they want a seat in the other section. • If the user says no, tell them "The next flight will be tomorrow" • You must use an array to represent the seats on the plane. • Create a simple Makefile to compile your program into an executable called planeseats.
Assignment #1 Instructions: Assigning Seats - planeseats Through this programming assignment, the students will learn to do the following: 1. Know how to use a Makefile. 2. Perform basic C commands. 3. Use arrays, integers and strings. This assignment asks the user to write a program to assign seats in an airplane. There will be 12 seats on the plane, 4 in first class and 8 in economy. • The program should display the following menu for the user Please type 1 for "first class" Please type 2 for "economy" Please type to quit • If the user types 1 then the user should be assigned a seat in first class. If the user types 2 then the user should be assigned a seat in economy. • If the user types O for a sentinel value the program should ext with a O return code. • The program should then print a line indicating the seat the person was assigned. This would be like a boarding pass. should not assign a seat that has already been assigned. If all seats in the desired section are taken, but there are available seats in the other section, then the user should be asked if they want a seat in the other section. • If the user says no, tell them "The next flight will be tomorrow" • You must use an array to represent the seats on the plane. • Create a simple Makefile to compile your program into an executable called planeseats.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Indentation
You can choose to indent your code 2, 3, o r 4 spaces for each level of nesting as long as you are consistent through out
the code. If you modify a file, then you should make all indentation in that file match your style.
Curly Braces
You can choose either style for your curly braces, but be consistent :
if (...) {
}
Or
if (...).
(
Submissions
You should submit a compressed zip file named FirstNameLastNameA1.zip with the following files.
1. The source code, planeseats.c
2. The Makefile file which should be called Makefile with no extension. I should be able to type make at the command
line to compile your program.
Do not include any other files or folders in the zip file.
Programs that do not compile and do something useful when run will not earn any credit at all.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4520de78-0a0a-482c-afaa-a6d57a7397ae%2F2a06fde6-f255-4917-9027-42cdd696d839%2Fgmb579r_processed.png&w=3840&q=75)
Transcribed Image Text:Indentation
You can choose to indent your code 2, 3, o r 4 spaces for each level of nesting as long as you are consistent through out
the code. If you modify a file, then you should make all indentation in that file match your style.
Curly Braces
You can choose either style for your curly braces, but be consistent :
if (...) {
}
Or
if (...).
(
Submissions
You should submit a compressed zip file named FirstNameLastNameA1.zip with the following files.
1. The source code, planeseats.c
2. The Makefile file which should be called Makefile with no extension. I should be able to type make at the command
line to compile your program.
Do not include any other files or folders in the zip file.
Programs that do not compile and do something useful when run will not earn any credit at all.
![Assignment #1 Instructions: Assigning Seats - planeseats
Through this programming assignment, the students will learn to do the following:
1. Know how to use a Makefile.
2. Perform basic C commands.
3. Use arrays, integers and strings.
This assignment asks the user to write a program to assign seats in an airplane. There will be 12 seats on the plane, 4 in
first class and 8 in economy.
• The program should display the following menu for the user:
Please type 1 for "first class"
Please type 2 for "economy"
Please type 0 to quit
• If the user types 1 then the user should be assigned a seat in first class. If the user types 2 then the user should be
assigned a seat in economy.
• If the user types O for a sentinel value the program should ext with a O return code.
• The program should then print a line indicating the seat the person was assigned. This would be like a boarding pass.
• The program should not assign a seat that has already been assigned. If all seats in the desired section are taken, but
there are available seats in the other section, then the user should be asked if they want a seat in the other section.
• If the user says no, tell them "The next flight will be tomorrow"
• You must use an array to represent the seats on the plane.
• Create a simple Makefile to compile your program into an executable called planeseats.
Formatting
The source file should have your name & PantherID included in it and it should have an affirmation of originality stating
something like: "I affirm that I wrote this program myself without any help from any other people or sources from the
internet.".
It is expected that this program and the programs from this class follow programming standards learned in previous
classes. There should be a program description at the top as well as descriptions of all functions used in the code.
Code should be nicely indented using a consistent style and commented appropriately.
Indentation
You can choose to indent your code 2, 3, o r 4 spaces for each level of nesting as long as you are consistent through out
the code. If you modify a file, then you should make all indentation in that file match your style.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4520de78-0a0a-482c-afaa-a6d57a7397ae%2F2a06fde6-f255-4917-9027-42cdd696d839%2Fn3pk0to_processed.png&w=3840&q=75)
Transcribed Image Text:Assignment #1 Instructions: Assigning Seats - planeseats
Through this programming assignment, the students will learn to do the following:
1. Know how to use a Makefile.
2. Perform basic C commands.
3. Use arrays, integers and strings.
This assignment asks the user to write a program to assign seats in an airplane. There will be 12 seats on the plane, 4 in
first class and 8 in economy.
• The program should display the following menu for the user:
Please type 1 for "first class"
Please type 2 for "economy"
Please type 0 to quit
• If the user types 1 then the user should be assigned a seat in first class. If the user types 2 then the user should be
assigned a seat in economy.
• If the user types O for a sentinel value the program should ext with a O return code.
• The program should then print a line indicating the seat the person was assigned. This would be like a boarding pass.
• The program should not assign a seat that has already been assigned. If all seats in the desired section are taken, but
there are available seats in the other section, then the user should be asked if they want a seat in the other section.
• If the user says no, tell them "The next flight will be tomorrow"
• You must use an array to represent the seats on the plane.
• Create a simple Makefile to compile your program into an executable called planeseats.
Formatting
The source file should have your name & PantherID included in it and it should have an affirmation of originality stating
something like: "I affirm that I wrote this program myself without any help from any other people or sources from the
internet.".
It is expected that this program and the programs from this class follow programming standards learned in previous
classes. There should be a program description at the top as well as descriptions of all functions used in the code.
Code should be nicely indented using a consistent style and commented appropriately.
Indentation
You can choose to indent your code 2, 3, o r 4 spaces for each level of nesting as long as you are consistent through out
the code. If you modify a file, then you should make all indentation in that file match your style.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY