资源简介

数据结构大作业完整版,做的是航空客运订票系统,用c++写的,里面包括源代码,开发文档等等

资源截图

代码片段和文件信息

//对FlightInfo.h所有类中函数的实现

#include“FlightInfo.h“


//PsgOn中的函数的实现
PsgOn::PsgOn(char N[20]const int Bconst int RPsgOn *Ne)
{    for(int i=0;i<=20;i++)
{
Name[i]=N[i];
}
Booknum=B;Rank=R;next=Ne;   
 }

PsgOn::PsgOn(PsgOn *Ne)
{  next=Ne;   }

//POList中的函数的实现
void POList::init()
{
fence=tail=head=new PsgOn;
leftcnt=rightcnt=0;
}


POList::POList(int size){       init();       }

bool POList::insert(char N[20]const int Bconst int R)
{
fence->next=new PsgOn(NBRfence->next);
if(tail==fence)tail=fence->next;
rightcnt++;                               
return true;
}

bool POList::append(char N[20]const int Bconst int R)
{
tail=tail->next=new PsgOn(NBRNULL);
rightcnt++;
return true;
}

bool POList::remove(char *Nint &B)
{
if(fence->next==NULL)return false;
N=fence->next->Name;B=fence->next->Booknum;
PsgOn *ltemp=fence->next;
fence->next=ltemp->next;
if(tail==ltemp)tail=fence;
delete ltemp;
rightcnt--;                                    //减去此人的订票额
return true;
}

void POList::setStart()
{     fence=head;rightcnt+=leftcnt;leftcnt=0;}

void POList::setEnd()
{    fence=tail;leftcnt+=rightcnt;rightcnt=0;}

void POList::prev()
{
PsgOn *temp=head;
if(fence==head)return;
while(temp->next!=fence)temp=temp->next;
fence=temp;
leftcnt--;rightcnt++;
}

void POList::next()
{
if(fence!=tail)
{fence=fence->next;rightcnt--;leftcnt++;}
}

int POList::leftLength()const
{return leftcnt;}

int POList::rightLength()const
{return rightcnt;}

bool POList::gerValue(char *Nint &Bint &R)const
{
if(rightLength()==0)return false;
N=fence->next->Name;B=fence->next->Booknum;R=fence->next->Rank;
return true;
}

//PsgWait中的函数的实现
PsgWait::PsgWait(char N[20]const int DPsgWait *Ne)
{         for(int i=0;i<=20;i++)
{
Name[i]=N[i];
}
Need=D;next=Ne;   
}

PsgWait::PsgWait(PsgWait *Ne)
{    next=Ne;    }

//PWList中的函数的实现
void PWList::init()
{
fence=tail=head=new PsgWait;
leftcnt=rightcnt=0;
}


PWList::PWList(int size){       init();       }


bool PWList::insert(char N[20]const int D)
{
fence->next=new PsgWait(NDfence->next);
if(tail==fence)tail=fence->next;
rightcnt++;
return true;
}

bool PWList::append(char N[20]const int D)
{
tail=tail->next=new PsgWait(NDNULL);
rightcnt++;
return true;
}

bool PWList::remove(char *N)
{
if(fence->next ==NULL)return false;
N=fence->next->Name;
PsgWait *ltemp=fence->next;
fence->next=ltemp->next;
if(tail==ltemp)tail=fence;
delete ltemp;
rightcnt--;
return true;
}

void PWList::setStart()
{     fence=head;rightcnt+=leftcnt;leftcnt=0;}

void PWList::setEnd()
{    fence=tail;leftcnt+=rightcnt;rightcnt=0;}

void PWList::prev()
{
PsgWait *temp=head;
if(fence==head)return;
while(temp->next!=fence)temp=temp->next;
fence=temp;
leftcnt--;rightcnt++;
}

bool PWList::next()
{
if(fence!=tail)
{fence=fence->next;leftcn

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    I.A....    229426  2007-06-24 21:52  Flight\Flight\Debug\Flight.exe

    I.A....    363776  2007-06-24 21:52  Flight\Flight\Debug\Flight.ilk

    I.A....    254164  2007-06-24 21:52  Flight\Flight\Debug\Flight.pch

    I.A....    574464  2007-06-24 21:52  Flight\Flight\Debug\Flight.pdb

    I.A....     24277  2007-06-24 21:52  Flight\Flight\Debug\FlightInfo.obj

    I.A....     15917  2007-06-24 21:52  Flight\Flight\Debug\FlightMain.obj

    I.A....     58368  2007-06-24 21:52  Flight\Flight\Debug\vc60.idb

    I.A....     69632  2007-06-24 21:52  Flight\Flight\Debug\vc60.pdb

    I.A....     14097  2007-06-24 21:52  Flight\Flight\Debug\查询航线.obj

    I.A....     10736  2007-06-24 21:52  Flight\Flight\Debug\订票业务.obj

    I.A....      9439  2007-06-24 21:52  Flight\Flight\Debug\退票业务.obj

    I.A....      4621  2007-06-24 13:04  Flight\Flight\Flight.dsp

    I.A....       537  2007-06-24 13:04  Flight\Flight\Flight.dsw

    I.A....     66560  2007-06-24 21:53  Flight\Flight\Flight.ncb

    I.A....     54784  2007-06-24 21:53  Flight\Flight\Flight.opt

    I.A....      1565  2007-06-24 21:52  Flight\Flight\Flight.plg

    I.A....      3573  2007-06-24 21:52  Flight\Flight\FlightInfo.cpp

    I.A....      2309  2007-06-24 21:53  Flight\Flight\FlightInfo.h

    I.A....      2360  2007-06-24 21:49  Flight\Flight\FlightMain.cpp

     文件     270336  2007-09-07 14:34  Flight\Flight\Flight开发文档.wps

    I.A....      2208  2007-06-24 14:34  Flight\Flight\查询航线.cpp

    I.A....      1833  2007-06-24 21:49  Flight\Flight\订票业务.cpp

    I.A....      1989  2007-06-24 21:49  Flight\Flight\退票业务.cpp

    I..D...         0  2007-06-24 21:52  Flight\Flight\Debug

    I..D...         0  2007-09-07 14:34  Flight\Flight

     目录          0  2007-09-07 14:33  Flight

----------- ---------  ---------- -----  ----

              2036971                    26


评论

共有 条评论