A small airline company is developing software to control its operations. You should design and develop a class that will be used to create objects that hold information about flights. The information kept about each flight includes: • Flight number • Departure time • • Seats sold • Seat capacity Flight destination Flight departure point (i.e. Dublin, Cork, etc.)

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...
icon
Related questions
Question
A small airline company is developing software to control its operations. You should design and
develop a class that will be used to create objects that hold information about flights. The information
kept about each flight includes:
● Flight number
• Departure time
•
Seat capacity
Seats sold
Flight destination
Flight departure point (i.e. Dublin, Cork, etc.)
When creating a flight object the flight number, departure time, seat capacity, flight destination and
departure point are given.
Behaviour Functions of this class:
• Default Constructor - initialises all data members.
Constructor that takes the flight no as input parameter and request user input, departure
time, seat capacity, flight destination, flight departure point, flight time.
●
•
A check_available_seats function that returns the number of unsold (still available) seats on
a flight;
•
A sellseats function that takes as a parameter the number of seats a customer requires on a
flight. If there are sufficient seats available the seats sold is increased by that amount. If
Transcribed Image Text:A small airline company is developing software to control its operations. You should design and develop a class that will be used to create objects that hold information about flights. The information kept about each flight includes: ● Flight number • Departure time • Seat capacity Seats sold Flight destination Flight departure point (i.e. Dublin, Cork, etc.) When creating a flight object the flight number, departure time, seat capacity, flight destination and departure point are given. Behaviour Functions of this class: • Default Constructor - initialises all data members. Constructor that takes the flight no as input parameter and request user input, departure time, seat capacity, flight destination, flight departure point, flight time. ● • A check_available_seats function that returns the number of unsold (still available) seats on a flight; • A sellseats function that takes as a parameter the number of seats a customer requires on a flight. If there are sufficient seats available the seats sold is increased by that amount. If
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY