资 源 简 介
一个飞机票订票和退票系统。假设某民航机场有m个航次的班机,每个航次都只到达一个目的地,试为该机场售票处设计一个自动订票和退票系统。
该系统需要实现以下功能:
(1) 订票:若该航次余票数大于等于客订票数,则在该航次的乘客表(按乘客姓氏字母词典顺序排列)中,插入订票乘客的信息项,并修改该航次有关数据,否则给出相应提示信息;
(2) 退票:若退票数小于该乘客原订票数,则在相应的乘客表中找到该乘客项,修改该航次及乘客表中有关数据。当由于退票使得该乘客的订票数为零时,要从乘客表中撤销该乘客项;否则给出相应的提示信息;
(3) 将某航次的余票数恢复初值为该航次的最大客票数;
(4) 显示:显示该机场各航次班机的售票情况。-Booking air tickets and a refund system. Assuming there are m a civil airport voyage of the flights, each voyage only to reach a destination, the trial design for an automated airport ticket booking and refund system.
The system needs to achieve the following functions:
(1) booking: If the voyage than the number of votes greater than or equal to the number of passengers booking, the passenger in the voyage List (alphabetical by passengers dictionary order), insert the booking information of passengers, and modify the data of the voyage Otherwise, the corresponding message
(2) Refund: If the refund is less than the number of votes of the original passeng