Friday, 2024-03-29, 8:55 PM
Logged in as Guest | Group "Guests"Welcome Guest | RSS

Love Makes The World Go Round

Site Menu
Tag Board
Site Working Days

File Catalog

Main » Files

Total entries in catalog: 3
Shown entries: 1-3

/* 
* Copyright (C) TES@NPU 
* School of Automation InfoSec
* All rights reserved.
*
* FileName: Ticket Booking System.h
* Version: 1.0
* Updated @ Oct. 13 2011
* Finished @ Oct. 13 2011
 */

// 参考资料是一回事,根据资料上的东西来写好的自己自己调又是另外一回事。
// 纸上得来终觉浅,绝知此事要躬行。 声色犬马,于孤何加焉!~~!~~~!~~~~!!!
#ifndef TICKET_BOOKING_SYSTEM_H

#include <iostream>
#include <process.h>
#include <string.h>
#include <conio.h>
#include <stdio.h>
#include <iomanip>
using namespace std;

#define MAX 60
#define NULL 0

typedef int Boolean;
typedef struct Customer
{
// 乘客信息
char Name[8];  // 姓名
int Amount;  // 订票数
char Rank;  // 舱位等级
int IDinfor;  // 个人信息
struct Customer *Next;  // 指向下一乘客结点
}Customer;

typedef struct Flight
{
// 航线信息
char Des_Name[10];  // 终点站名
char Flight_No[6];  // 航班号
char Plane_No[6];  // 飞机号
int Week_Day;  // 飞行周日(星期几)
int Customer_Amount;  // 乘员定额
int Free_Amount;  // 剩余票数
int Price[3];  // 舱位等级的价格
Customer *CustName;  // 该航班的已订票乘客名单
Customer *ReplName;  // 该航班的候补乘客名单
struct Flight *Next;  // 指示下一航线结点
}Flight, *PFlight;

// 全局变量  // 呃,之后貌似有极个别的变量没有被定义。
// 果然在运行的时候出现了错误,试着给flag标一个注释了的全局变量看看后果...
int Customer_Count = 0;  // 所有航线的订票乘客总数

Flight *Head;  // 航线头指针
Flight *p2;  // 航线结点指针

Customer *Custp1[MAX];  // 各条航线乘客结点指针
Customer *Replp1[MAX];  // 各条航线候补结点指针

int IsEmpty = 1;  // 是否有订票乘客
int IsReplace = 1;  // 是否有候补乘客

Customer *prior;  // 满足要求的订票乘客的前结点,以做删除操作
int shouldsave = 0;  // 根据名称,应该讨论的是是否需要保存
int flag = 1;

// 1. 询问是否继续的函数
char Continue(); // 可以考虑定义成Boolean类型的,你懂~

// 2. 操作出错函数
void ErrorMess();

// 3. 航线查找函数
int Find_Line(PFlight L, char *key);

// 4. 航线查找函数
int Find_Line(PFlight L, char *key, PFlight &p2, int &Flight_No);

// 5. 航班查找函数
void Line_Search();

// 6. 航线添加函数
void Line_Add();

// 7. 航线为空的判定函数
int Empty_Flight();

// 8. 航线查看函数
void Line_See();

// 9. 航线管理菜单
void LinemanageMenu();

// 10. 订票办理函数
void BookingMenu();

// 11. 订票乘客信息
void Display_Reserve();

// 12. 候补乘客信息
void DisPlay_Replace();

// 13. 退票办理函数
void RefundticketMenu();

// 14. 乘客管理子菜单函数
void CustomermagMenu();
#endif

Data Structure | Views: 917 | Downloads: 196 | Added by: tes1991 | Date: 2011-10-13 | Comments (0)

/*
数组的顺序存储结构
 */
struct Array
{
ElemType *base;  // 数组元素基址,由InitArray分配
int dim;  // 数组维数
int *bounds;  // 数组维界基址,由InitArray分配
int *constants;  // 数组映象函数常量基址,由InitArray分配
};

/* 基本操作函数的声明部分 */
Status InitArray(Array &A, int dim, ...);
Status DestroyArray(Array &A);
Status LocateArray(Array A, va_list ap, int &off);
Status Value(ElemType &e, Array A, ...);
Status Assign(Array &A, ElemType e, ...);
Data Structure | Views: 860 | Downloads: 222 | Added by: tes1991 | Date: 2011-12-08 | Comments (0)

/* 
* Copyright TES@NPU 
* School of Automation InfoSec
* All rights reserved.
*
* FileName: Josephus Problem.cpp
* Version: 1.0
* Updated @ Oct. 12 2011
* Finished @ Oct. 12 2011
 */
Data Structure | Views: 951 | Downloads: 206 | Added by: tes1991 | Date: 2011-10-12 | Comments (0)

Tags...
Tencent
Statistics

Total online: 1
Guests: 1
Users: 0

Copyright MyCorp © 2024