停車場管理系統(tǒng)(C++)-創(chuàng)新互聯(lián)

大二寫的肯定會有很多很多很多缺點~希望大佬們能指出~給大家提供一個可以改的一個小東西,改成其他的什么什么也是可以的~有bug在評論區(qū)里說一下~952行~基本重要的都有注釋~

在萍鄉(xiāng)等地區(qū),都構建了全面的區(qū)域性戰(zhàn)略布局,加強發(fā)展的系統(tǒng)性、市場前瞻性、產品創(chuàng)新能力,以專注、極致的服務理念,為客戶提供做網站、網站設計 網站設計制作定制網站設計,公司網站建設,企業(yè)網站建設,品牌網站建設,營銷型網站,成都外貿網站建設公司,萍鄉(xiāng)網站建設費用合理。文章目錄
      • 本“項目”實現(xiàn)了:
      • “項目”截圖:
        • 入站:
        • 入候車場:
        • 出站及候車場自動入庫
        • 查詢:
        • 經營詳情:
        • 退出系統(tǒng):
  • 全部代碼:

本“項目”實現(xiàn)了:

1.大中小車型分類
2.進場候車道
3.時間的自動提取
4.車牌的判定
5.查詢、進車、出庫、經營情況管理、自動收費系統(tǒng)、退出系統(tǒng)的銷毀等等基礎內容
6.停車場車輛的實時顯示
7.拿走能三連一下嘛~
8.停車場用的順序表候車道用的隊列

“項目”截圖: 入站:

在這里插入圖片描述

入候車場:

在這里插入圖片描述

出站及候車場自動入庫

在這里插入圖片描述

查詢:

經營詳情:

在這里插入圖片描述

退出系統(tǒng):

在這里插入圖片描述

全部代碼:

說明:本代碼為UTF-8編碼要是報錯了就改改編碼另存一下,在c站找找怎么辦~ 貼貼~

#include#include#include#include#include#include#include#include// 車輛詳情:
#define MaxSize 2

const double unitprice = 0.01;
using namespace std;
typedef struct
{int Tplace;
    string place;
    string time;
    string type;
    string license; // 車牌
    string provice; // 省份
    time_t current_time;
} peo;
// 總價錢
double totalPrice = 0;
// 車位的比較數(shù)組
int a[33] = {0};

string x1[6] = {""};
// 車牌號的比較數(shù)組
string x2[13] = {""};
vectorsplit(const string &str, const string &pattern);
void Getp(peo &e)
{// 輸入停車位
    cout<< "停車位置:";
    int tplace;
    cin >>tplace;
    e.Tplace = tplace;
    e.place = e.type + "停車場" + to_string(tplace) + "號位";

    if ((e.Tplace >2 || e.Tplace< 1))
    {cout<< "該停車位不存在,請輸入1~2的數(shù)字"<< endl;
        Getp(e);
    }
    else
    {for (int x = 0; x< 6; x++)
        {if (x1[x].compare(e.place) == 0)
            {cout<< "該停車位已被占用了哦~還請另找車位~"<< endl;
                Getp(e);
            }
        }
    }
}
void Getn(peo &e)
{// 輸入車牌
    cout<< "車牌號碼:";
    string indexL; // 暫時車牌

    cin >>indexL;
    int index = indexL.find("·"); // 能找到“·”;
    if (index == 3)
    {vectorTlicense = split(indexL, "·");
        if (Tlicense[0].length() == 3 && Tlicense[1].length() == 5)
        {string indexpro = indexL.substr(0, 2); // 找到省份;
            if (indexpro != "魯" && indexpro != "京" && indexpro != "津" && indexpro != "冀" && indexpro != "晉" && indexpro != "蒙" && indexpro != "遼" && indexpro != "吉" && indexpro != "黑" && indexpro != "滬" && indexpro != "蘇" && indexpro != "浙" && indexpro != "皖" && indexpro != "閩" && indexpro != "贛" && indexpro != "臺" && indexpro != "豫" && indexpro != "鄂" && indexpro != "湘" && indexpro != "粵" && indexpro != "桂" && indexpro != "瓊" && indexpro != "港" && indexpro != "澳" && indexpro != "渝" && indexpro != "川" && indexpro != "貴" && indexpro != "云" && indexpro != "藏" && indexpro != "陜" && indexpro != "甘" && indexpro != "青" && indexpro != "寧")
            {Getn(e);
                cout<< "輸入車牌號的省份有錯哦,本停車場還不支持外國哦"<< endl
          << endl;
            }
            else
            {if (indexL[2] >= 'A' && indexL[2]<= 'Z')
                {e.provice = indexpro;
                    e.license = indexL;
                }
                else
                {cout<< "車牌的第二位數(shù)要嚴格按照大寫字母哦~不然就吃掉你!"<< endl
              << endl;
                }
            }
        }
        else
        {cout<< "輸入車牌號有錯哦,請按樣例格式輸入(樣例:魯N·88888)"<< endl
      << endl;
            Getn(e);
        }
    }
    else
    {cout<< "輸入車牌號有錯哦,請按樣例格式輸入(樣例:魯N·88888)"<< endl
  << endl;
        Getn(e);
    }

    for (int x = 0; x< 13; x++)
    {if (x2[x] == e.license)
        {cout<< "該牌車輛已在場,請重新確認您的車牌號后再輸入哦~"<< endl;
            Getn(e);
        }
    }
}
void Gett(peo &e)
{// 輸入時間
    cout<< "停車時間為:";
    e.current_time = time(NULL);
    e.time = ctime(&e.current_time);
    cout<< ctime(&e.current_time)<< endl<< endl;
}
void Settype(peo &e)
{// 輸入類型
    cout<< "停車類型:";
    cin >>e.type;
    if (e.type.compare("大") != 0 && e.type.compare("中") != 0 && e.type.compare("小") != 0)
    {cout<< "車輛類型輸入有誤,請檢查后重新輸入哦~"<< endl;
        Settype(e);
    }
}
// 車牌
void Getn1(peo &e, string i)
{// 輸入隊列進的車牌
    e.license = i;
}
void Gettt1(peo &e)
{// 進隊時間合體
    Getn(e);
    for (int x = 0; x< 13; x++)
    {if (x2[x] == "")
        {x2[x] = e.license;
            break;
        }
    }
}
void Get1(peo &e)
{// 時間位置號碼合體
    Getp(e);
    Getn(e);
    Gett(e);
    for (int x = 0; x< 7; x++)
    {// 將信息記錄入數(shù)組
        if (x1[x] == "")
        {x1[x] = e.place;
            break;
        }
    }
    for (int x = 0; x< 13; x++)
    {if (x2[x] == "")
        {x2[x] = e.license;
            break;
        }
    }
}
void Out1(peo &e)
{cout<< "停車位置:"<< e.place<< "  "<< "車輛類型:"<< e.type<< "  "<< "車牌號碼:"<< e.license<< "  "<< "停車時間:"<< e.time<< endl;
}
void Gettt(peo &e) // 隊列錢
{time_t etime = time(NULL);
    string endtime = ctime(&etime);
    int mtime = etime - e.current_time;
    double indexPrice = 0;
    int seconds = mtime;
    int hours = seconds / 3600;               // 計算小時數(shù)
    int remainingSeconds = seconds % 3600;    // 計算剩余的秒數(shù)
    int minutes = remainingSeconds / 60;      // 計算分鐘數(shù)
    remainingSeconds = remainingSeconds % 60; // 計算剩余的秒數(shù)
    seconds = remainingSeconds;               // 秒數(shù)
    cout<< "本次停車于: "<< endl<< e.time<< "\b\b開始 "<< endl<< "于 "<< endtime<< "\b\b結束 "<< endl<< "共耗時 "<< hours<< " 小時 "<< minutes<< " 分 "<< seconds<< " 秒 。"<< endl;

    if (mtime<= 60)
    {cout<< "本次停車時間小于1分鐘 免費!"<< endl;
    }
    else
    {cout<< "本停車場收費規(guī)則為每秒"<< unitprice<< "元~"<< endl;
        indexPrice = unitprice * mtime;
        cout<< "本次停車費用為:"<< indexPrice<< "元~"<< endl;
        totalPrice += indexPrice;
    }
}
// 分割字符串函數(shù)
vectorsplit(const string &str, const string &pattern)
{vectorret;
    if (pattern.empty())
        return ret;
    size_t start = 0, index = str.find_first_of(pattern, 0);
    while (index != str.npos)
    {if (start != index)
            ret.push_back(str.substr(start, index - start));
        start = index + 1;
        index = str.find_first_of(pattern, start);
    }
    if (!str.substr(start).empty())
        ret.push_back(str.substr(start));
    return ret;
}
// 車輛詳情 end

// 排隊等候隊列

typedef string ElemType1;
typedef struct qnode
{ElemType1 data;
    struct qnode *next;
} DataNode;
typedef struct
{DataNode *front;
    DataNode *rear;
} LinkQuNode;

void InitQueue(LinkQuNode *&q)
{// 初始化
    q = new LinkQuNode();
    q->front = q->rear = NULL;
}
// 找找是否存在
bool findQueue(LinkQuNode *queue, ElemType1 data)
{DataNode *p = queue->front;
    while (p != NULL)
    {if (p->data == data)
        {return true;
        }
        p = p->next;
    }
    return false;
}
void DestroyQueue(LinkQuNode *&q)
{// 銷毀
    DataNode *pre = q->front, *p;
    if (pre != NULL)
    {p = pre->next;
        while (p != NULL)
        {free(pre);
            pre = p;
            p = p->next;
        }
        free(pre);
    }
    free(q);
}
bool QueueEmpty(LinkQuNode *q)
{// 判斷空否
    return (q->rear == NULL);
}
void EnQueue(LinkQuNode *&q, ElemType1 e)
{// 進隊
    DataNode *p;
    p = new DataNode();
    p->data = e;
    p->next = NULL;
    if (q->rear == NULL)
        q->front = q->rear = p;
    else
    {q->rear->next = p;
        q->rear = p;
    }
}
bool DeQueue(LinkQuNode *&q, ElemType1 &e)
{// 出隊
    DataNode *t;
    if (q->rear == NULL)
        return false;
    t = q->front;
    if (q->front == q->rear)
        q->front = q->rear = NULL;
    else
        q->front = q->front->next;
    e = t->data;
    free(t);
    return true;
}
int QueueLength(LinkQuNode *q)
{// 隊列的長度
    int length = 0;
    if (QueueEmpty(q))
        return length;
    else if (!QueueEmpty(q))
    {DataNode *p;
        p = q->front;
        while (p)
        {length++;
            p = p->next;
        }
        return length;
    }
    return length;
}
void DispQueue(LinkQuNode *q) // 輸出等待
{DataNode *t = q->front;
    while (t != NULL)
    {cout<< t->data<< endl
  << endl;
        t = t->next;
    }
}
// 排隊等候隊列 end
// 停車順序表
typedef peo ElemType;
typedef struct
{ElemType data[MaxSize];
    int length;
} SqList;                 // 順序表類型
void InitList(SqList *&L) // 初始化
{L = new SqList();
    L->length = 0;
    for (int i = 0; i< MaxSize; i++)
    {L->data[i].license = "";
    }
}

void DestroyList(SqList *&L) // 銷毀
{free(L);
}
bool ListEmpty(SqList *L) // 檢查空
{return (L->length == 0);
}
int ListLength(SqList *L) // 長度
{return (L->length);
}
void DispList(SqList *L) // 輸出
{int i;
    if (ListEmpty(L))
    {cout<< "             當前類型停車位還沒有車哦~"<< endl;
        return;
    }
    for (i = 0; i< L->length; i++)
        Out1(L->data[i]); // stu類型
    printf("\n");
}

bool GetElem(SqList *L, int i, ElemType &e) // 求值
{if (i< 1 || i >L->length)
        return false;
    e = L->data[i - 1];
    return true;
}

int LocateElem(SqList *L, ElemType e) // 查找
{int i = 0;
    while (i< L->length && L->data[i].license != e.license)
        i++;
    if (i >= L->length)
        return 0;
    else
        return i + 1;
}

bool ListInsert(SqList *&L, int i, ElemType e) // 插入
{int j;
    if (i< 1 || i >L->length + 1)
        return false;
    i--;
    for (j = L->length; j >i; j--)
        L->data[j] = L->data[j - 1];
    L->data[i] = e;
    L->length++;
    return true;
}

bool ListDelete(SqList *&L, int i, ElemType &e) // 刪除
{int j;
    if (i< 1 || i >L->length)
        return false;
    i--;
    e = L->data[i];
    for (j = i; j< L->length - 1; j++)
        L->data[j] = L->data[j + 1];
    L->length--;
    return true;
}

// 獲取車輛類型
int Gettype(peo &e, SqList *L, SqList *L1, SqList *L2)
{for (int i = 0; i< L->length; i++)
    {if (e.license == L->data[i].license)
        {return 0;
        }
    }
    for (int i = 0; i< L1->length; i++)
    {if (e.license == L1->data[i].license)
        {return 1;
        }
    }
    for (int i = 0; i< L2->length; i++)
    {if (e.license == L2->data[i].license)
        {return 2;
        }
    }
    return -1;
} // 0為大1為中2為小否則返回-1

// 停車順序表end

int main()
{LinkQuNode *q1, *q2, *q3, *q1max, *q1min; // 隊列

    SqList *L, *LMin, *LMax; // 鏈表停車場

    InitQueue(q1);    // 進隊
    InitQueue(q2);    // 出隊結算
    InitQueue(q3);    // 出隊結算
    InitQueue(q1max); // 出隊結算
    InitQueue(q1min); // 出隊結算
    InitQueue(q3);    // 出隊結算

    InitList(L);    // 鏈表中
    InitList(LMax); // 鏈表大
    InitList(LMin); // 鏈表小

    string type = "請輸入汽車類型";
    string userCarNum;
    char i = 'F'; // 操作標識符

    int overBigNum = 0;
    int oversmallNum = 0;
    int overmidNum = 0;

    int sumCar[3] = {0};

    ElemType e, efind; // 車輛對象
    ElemType1 e1, e2;  // 隊列自定類型對象
    int e3;
    int iiiType;
    // 系統(tǒng)主體
    cout<< "================歡迎使用c0re的停車場================"<< endl<< endl;
    cout<< "本停車場分為3個類型每個類型最多可停放2輛汽車"<< endl<< endl;
    cout<< "本停車場收費規(guī)則為每秒"<< unitprice<< "元~"<< endl<< endl;
    cout<< "來停車系統(tǒng)會自動記錄時間"<< endl<< endl;
    cout<< "本停車場為三個類型分別配有能停放一個車輛的候車道"<< endl<< endl;
    while (i != 'E')
    {cout<< "====================c0re系統(tǒng)界面===================="<< endl
  << endl;

        cout<< "             當前已停放"<< ListLength(L) + ListLength(LMin) + ListLength(LMax)<< "輛汽車~"<< endl;

        cout<< "大型車位停放車輛情況"<< endl;
        DispList(LMax);
        cout<< "中型車位停放車輛情況"<< endl;
        DispList(L);
        cout<< "小型車位停放車輛情況"<< endl;
        DispList(LMin);
        if (!QueueEmpty(q1max))
        {// 候車區(qū)非空
            cout<< "當前大型車輛候車區(qū)停放的車輛有:"<< endl;
            DispQueue(q1max);
        }
        if (!QueueEmpty(q1))
        {// 候車區(qū)非空
            cout<< "當前中型車輛候車區(qū)停放的車輛有:"<< endl;
            DispQueue(q1);
        }
        if (!QueueEmpty(q1min))
        {// 候車區(qū)非空
            cout<< "當前小型車輛候車區(qū)停放的車輛有:"<< endl;
            DispQueue(q1min);
        }

        if (QueueEmpty(q1min) && QueueEmpty(q1) && QueueEmpty(q1max))
        {// 候車區(qū)空
            cout<< "候車區(qū)暫無車輛哦"<< endl;
        }
        cout<< "您可以選擇:"<< endl
  << endl;
        cout<< " A:入站"
  << "  "
  << "D:出站"
  << "  "
  << "F:查詢"
  << "  "
  << "M:經營詳情"
  << "  "
  << "E:退出系統(tǒng)"<< endl
  << endl;
        cout<< "請選擇:";
        cin >>i;
        switch (i)
        {case 'A':
            //
            cout<< "請輸入您要停車的車輛的類型"<< endl
      << "(本停車場提供三種類型的車位請輸入您的車輛類型)"<< endl
      << "輸入“大”或“中”或“小”"<< endl;
            Settype(e);
            if (e.type.compare("大") == 0)
            {if (ListLength(LMax) == 2)
                {// 停車場大車順序表長度滿2
                    if (QueueLength(q1max) == 1)
                    {cout<< "     目前已無停放大車車位,且候車道已滿還請另尋他處停車~"<< endl
                  << endl;
                        overBigNum++;
                    }
                    else if (QueueLength(q1max) != 1)
                    {cout<< "     目前無停放大車車位,還請在侯車道內等待~"<< endl
                  << endl;
                        Gettt1(e); // 車牌
                        e1 = e.license;
                        EnQueue(q1max, e1); // 進隊等
                        sumCar[0]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停車場的第一位顧客^v^可以獲得1億元代金券!"<< endl;
                    else
                    {cout<< "當前已被使用的車位有:";
                        for (int x = 0; x< ListLength(LMax); x++)
                        {// 遍歷顯示被用的車位
                            for (int y = 0; y< 2; y++)
                            {if (LMax->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "請輸入入站汽車的相關信息:"<< endl;
                    Get1(e); // 獲取車牌車位時間
                    if (ListInsert(LMax, ListLength(LMax) + 1, e))
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,您的車已入庫~~車主貼貼~"<< endl
                  << endl;
                        sumCar[0]++;
                    }
                    else
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,不知道出現(xiàn)了什么問題呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入大停車場
                }
            }
            if (e.type.compare("中") == 0)
            {if (ListLength(L) == 2)
                {// 停車場大車順序表長度滿2
                    if (QueueLength(q1) == 1)
                    {cout<< "     目前已無停放中車車位,且候車道已滿還請另尋他處停車~"<< endl
                  << endl;
                        overmidNum++;
                    }
                    else if (QueueLength(q1) != 1)
                    {cout<< "     目前無停放中車車位,還請在侯車道內等待~"<< endl
                  << endl;
                        Gettt1(e); // 車牌
                        e1 = e.license;
                        EnQueue(q1, e1); // 進隊等
                        sumCar[1]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停車場的第一位顧客^v^可以獲得1億元代金券!"<< endl;
                    else
                    {cout<< "當前已被使用的車位有:";
                        for (int x = 0; x< ListLength(L); x++)
                        {// 遍歷顯示被用的車位
                            for (int y = 0; y< 2; y++)
                            {if (L->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "請輸入入站汽車的相關信息:"<< endl;
                    Get1(e); // 獲取車牌車位時間
                    if (ListInsert(L, ListLength(L) + 1, e))
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,您的車已入庫~~車主貼貼~"<< endl
                  << endl;
                        sumCar[1]++;
                    }
                    else
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,不知道出現(xiàn)了什么問題呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入大停車場
                }
            }
            if (e.type.compare("小") == 0)
            {if (ListLength(LMin) == 2)
                {// 停車場大車順序表長度滿2
                    if (QueueLength(q1min) == 1)
                    {cout<< "     目前已無停放小車車位,且候車道已滿還請另尋他處停車~"<< endl
                  << endl;
                        oversmallNum++;
                    }
                    else if (QueueLength(q1min) != 1)
                    {cout<< "     目前無停放小車車位,還請在侯車道內等待~"<< endl
                  << endl;
                        Gettt1(e); // 車牌
                        e1 = e.license;
                        EnQueue(q1min, e1); // 進隊等
                        sumCar[2]++;
                    }
                }
                else
                {if (ListLength(L) == 0 && ListLength(LMin) == 0 && ListLength(LMax) == 0)
                        cout<< "您是本停車場的第一位顧客^v^可以獲得1億元代金券!"<< endl;
                    else
                    {cout<< "當前已被使用的車位有:";
                        for (int x = 0; x< ListLength(LMin); x++)
                        {// 遍歷顯示被用的車位
                            for (int y = 0; y< 2; y++)
                            {if (LMin->data[x].place == x1[y])
                                    cout<< x1[y]<< " ";
                            }
                        }
                    }
                    cout<< endl
              << "請輸入入站汽車的相關信息:"<< endl;
                    Get1(e); // 獲取車牌車位時間
                    if (ListInsert(LMin, ListLength(LMin) + 1, e))
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,您的車已入庫~~車主貼貼~"<< endl
                  << endl;
                        sumCar[2]++;
                    }
                    else
                    {cout<< "嘟嚕嚕~嘟嚕嚕~夸嚓,不知道出現(xiàn)了什么問題呢?小的正在火速debug中"<< endl
                  << endl;
                    } // 插入小停車場
                }
            }

            break;
            // 改到這里了?。?!2022年12月20日
        case 'D':

            if (ListEmpty(L) && ListEmpty(LMin) && ListEmpty(LMax))
                cout<< "             沒生意啊好心酸TvT~"<< endl;
            else
            {cout<< endl
          << "請輸入要出站的車的車牌號:";
                ElemType i1;
                cin >>i1.license; // 車牌

                int Type = Gettype(i1, LMax, L, LMin);
                bool panduan = false;

                if (Type == 0)
                {panduan = ListDelete(LMax, LocateElem(LMax, i1), e);
                }
                else if (Type == 1)
                {panduan = ListDelete(L, LocateElem(L, i1), e);
                }
                else if (Type == 2)
                {panduan = ListDelete(LMin, LocateElem(LMin, i1), e);
                }
                else
                {panduan = false;
                }

                if (panduan)
                {// 查找并刪除,e是被刪的車s
                    cout<< "車牌號為"<< e.license<< "的汽車已駛入結算區(qū)~"<< endl;
                    e2 = e.license; // 獲取車牌

                    cout<< "車牌為"<< e2<< "的車輛現(xiàn)進行費用結算~!"<< endl;
                    Gettt(e); // 算錢
                    cout<< "車牌號為"<< e2<< "的汽車已駛出停車場~~~!"<< endl;
                    for (int x = 0; x< 13; x++)
                    {// 出場的車銷毀車牌
                        if (x2[x] == e2)
                        {x2[x] = "";
                            break;
                        }
                    }
                    // 改到這里了
                    if (Type == 0)
                    {if (!QueueEmpty(q1max))
                        {   // 進隊列非空
                            DeQueue(q1max, e1); // 出隊(車牌
                            Getn1(e, e1);       // 車牌獲取
                            cout<< "車牌為"<< e.license<< "的車輛現(xiàn)可以入庫~!還請確定入庫時間:"<< endl;
                            Gett(e);                                   // 進場時間
                            ListInsert(LMax, ListLength(LMax) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 車位刪除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                    else if (Type == 1)
                    {if (!QueueEmpty(q1))
                        {// 進隊列非空
                            DeQueue(q1, e1); // 出隊(車牌
                            Getn1(e, e1);    // 車牌獲取
                            cout<< "車牌為"<< e.license<< "的車輛現(xiàn)可以入庫~!還請確定入庫時間:"<< endl;
                            Gett(e);                             // 進場時間
                            ListInsert(L, ListLength(L) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 車位刪除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                    else if (Type == 2)
                    {if (!QueueEmpty(q1min))
                        {   // 進隊列非空
                            DeQueue(q1min, e1); // 出隊(車牌
                            Getn1(e, e1);       // 車牌獲取
                            cout<< "車牌為"<< e.license<< "的車輛現(xiàn)可以入庫~!還請確定入庫時間:"<< endl;
                            Gett(e);                                   // 進場時間
                            ListInsert(LMin, ListLength(LMin) + 1, e); // 插入
                        }
                        else
                        {for (int x = 0; x< 6; x++)
                            {// 車位刪除
                                if (x1[x] == e.place)
                                {x1[x] = "";
                                    break;
                                }
                            }
                        }
                    }
                }
                else
                {cout<< "不存在此車輛哦~請檢查后重新輸入~~"<< endl;
                }
            }

            break;
        case 'M':
            time_t rawtime;
            struct tm *timeinfo;

            time(&rawtime);
            timeinfo = localtime(&rawtime);
            char buffer[80];
            strftime(buffer, 80, "%Y年%m月%d日", timeinfo);

            cout<< "==============c0re停車場"<< buffer<< "經營詳情============"<< endl
      << endl;
            cout<< "大車停車總計:"<< sumCar[0]<< "輛"<< endl
      << endl;
            cout<< "中車停車總計:"<< sumCar[1]<< "輛"<< endl
      << endl;

            cout<< "小車停車總計:"<< sumCar[2]<< "輛"<< endl
      << endl;

            cout<< "因大停車場滿而未停車總計:"<< overBigNum<< "輛"<< endl
      << endl;
            cout<< "因中停車場滿而未停車總計:"<< overmidNum<< "輛"<< endl
      << endl;
            cout<< "因小停車場滿而未停車總計:"<< oversmallNum<< "輛"<< endl
      << endl;

            if (overBigNum != 0)
            {cout<< "建議多增加"<< overBigNum<< "輛大車位"<< endl
          << endl;
            }
            if (overmidNum != 0)
            {cout<< "建議多增加"<< overmidNum<< "輛中車位"<< endl
          << endl;
            }
            if (oversmallNum != 0)
            {cout<< "建議多增加"<< oversmallNum<< "輛小車位"<< endl
          << endl;
            }

            cout<< "$$$$$$$$$$$$$$$  目前已累計收入"<< totalPrice<< "元  $$$$$$$$$$$$$$$$"<< endl
      << endl;
            break;
        case 'E':
            cout<< endl
      << "     c0re竭誠為您服務,歡迎下次再來~"<< endl;

            // 銷毀
            DestroyList(L);
            DestroyList(LMax);
            DestroyList(LMin);

            DestroyQueue(q1);
            DestroyQueue(q1max);
            DestroyQueue(q1min);

            DestroyQueue(q2);
            DestroyQueue(q3);
            break;
        case 'F':

            cout<< "歡迎來到c0re停車場的查詢系統(tǒng)~"<< endl;
            cout<< "寶貝請輸入愛車車牌號:";
            cin >>userCarNum;
            efind.license = userCarNum;
            iiiType = Gettype(efind, LMax, L, LMin);
            if (findQueue(q1max, userCarNum))
            {cout<< "您的愛車在大型車輛候車道~等大型停車場有車出來時您就可以進去了哦"<< endl
          << endl;
            }
            else if (findQueue(q1min, userCarNum))
            {cout<< "您的愛車在小型車輛候車道~等大型停車場有車出來時您就可以進去了哦"<< endl
          << endl;
            }
            else if (findQueue(q1, userCarNum))
            {cout<< "您的愛車在中型車輛候車道~等大型停車場有車出來時您就可以進去了哦"<< endl
          << endl;
            }

            else if (iiiType == 0)
            {GetElem(LMax, LocateElem(LMax, efind), efind);
                cout<< "您的愛車在大型車輛停車場~詳細信息如下:"<< endl;
                Out1(efind);
            }
            else if (iiiType == 2)
            {GetElem(LMin, LocateElem(LMin, efind), efind);
                cout<< "您的愛車在小型車輛停車場~詳細信息如下:"<< endl;
                Out1(efind);
            }
            else if (iiiType == 1)
            {GetElem(L, LocateElem(L, efind), efind);
                cout<< "您的愛車在中型車輛停車場~詳細信息如下:"<< endl;
                Out1(efind);
            }
            else
            {cout<< "沒有找到呢QWQ"<< endl;
            }

            break;

        default:
            cout<< "您的輸入有誤,請檢查后重新輸入~"<< endl;
        }
    }
    system("pause");
    return 0;
}

你是否還在尋找穩(wěn)定的海外服務器提供商?創(chuàng)新互聯(lián)www.cdcxhl.cn海外機房具備T級流量清洗系統(tǒng)配攻擊溯源,準確流量調度確保服務器高可用性,企業(yè)級服務器適合批量采購,新人活動首月15元起,快前往官網查看詳情吧

新聞標題:停車場管理系統(tǒng)(C++)-創(chuàng)新互聯(lián)
新聞來源:http://www.muchs.cn/article24/dhcgje.html

成都網站建設公司_創(chuàng)新互聯(lián),為您提供網站收錄商城網站、用戶體驗網站設計公司、微信小程序、云服務器

廣告

聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網站優(yōu)化