Trying Develop program to control operations of small bus transport companies. You should design and develop a class that will be used to create objects that hold information about their routes. The information kept about each route includes: • Route number • Departure time • Bus type • Seat capacity • Seats sold • Route departure town (i.e. the starting point) • Route destination town (i.e. the other end point) • Additional information Behaviour - Functions of this class: • Constructor - default constructor, all data members initialised to default values. • Constructor - takes the route number, seat capacity, departure and destination as input parameters. • A check available seats function that returns the number of unsold (still available) seats on the route; • A sell _seats function that takes as a parameter the number of seats a customer requires. If there are sufficient seats available the seats sold is increased by that amount. If there are insufficient seats a message to that effect is printed. Also this company only allows a maximum of ten seats to be bought at a time. Add a function that allows additional information to be held for each route. For example, the following could be added: whether on-board free WiFi is available, if this is an express route, etc. Allow for up to 10 pieces of information to be held for each route. Use an array of 10 strings to implement this data member. • Overload << operator to print out all the details of a route using cout. Note that all the data members should be private
Trying Develop program to control operations of small bus transport companies. You should design and develop a class that will be used to create objects that hold information about their routes. The information kept about each route includes: • Route number • Departure time • Bus type • Seat capacity • Seats sold • Route departure town (i.e. the starting point) • Route destination town (i.e. the other end point) • Additional information Behaviour - Functions of this class: • Constructor - default constructor, all data members initialised to default values. • Constructor - takes the route number, seat capacity, departure and destination as input parameters. • A check available seats function that returns the number of unsold (still available) seats on the route; • A sell _seats function that takes as a parameter the number of seats a customer requires. If there are sufficient seats available the seats sold is increased by that amount. If there are insufficient seats a message to that effect is printed. Also this company only allows a maximum of ten seats to be bought at a time. Add a function that allows additional information to be held for each route. For example, the following could be added: whether on-board free WiFi is available, if this is an express route, etc. Allow for up to 10 pieces of information to be held for each route. Use an array of 10 strings to implement this data member. • Overload << operator to print out all the details of a route using cout. Note that all the data members should be private
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
Trying Develop program to control operations of small bus transport companies. You should design and develop a class that will be used to create objects that hold information about their routes.
The information kept about each route includes:
• Route number
• Departure time
• Bus type
• Seat capacity
• Seats sold
• Route departure town (i.e. the starting point)
• Route destination town (i.e. the other end point)
• Additional information
Behaviour - Functions of this class:
• Constructor - default constructor, all data members initialised to default values.
• Constructor - takes the route number, seat capacity, departure and destination as input parameters.
• A check available seats function that returns the number of unsold (still available) seats on the route;
• A sell _seats function that takes as a parameter the number of seats a customer requires. If there are sufficient seats available the seats sold is increased by that amount. If there are insufficient seats a message to that effect is printed. Also this company only allows a maximum of ten seats to be bought at a time.
Add a function that allows additional information to be held for each route. For example, the following could be added: whether on-board free WiFi is available, if this is an express route, etc. Allow for up to 10 pieces of information to be held for each route. Use an array of 10 strings to implement this data member.
• Overload << operator to print out all the details of a route using cout.
Note that all the data members should be private.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps
Recommended textbooks for you
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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
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…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
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)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY