簡單泊車管理系統 c 實現

2021-08-10 20:30:17 字數 1671 閱讀 1769

泊車系統

該系統要求對乙個檔案中所儲存的汽車資料進行各種常規操作,如:查詢、計費、顯示等功能。目的是熟練掌握檔案、陣列的各種操作,以及一些演算法思想的應用,實現乙個簡單的泊車管理系統。

#include #include #include #include #include #include using namespace std;

struct location //車位資訊

;class manager //管理人員

} //停車登記 停車位為第乙個為空的位置,自動查詢給出車牌號,車位滿給出提示

void add()

else

}if (num == -1) //車位已滿

else

strcpy(carport[num].id, idadd.c_str()); //string 匯入char陣列

cout << "請輸入車輛型別(a,b,c)" << endl;

cin >> carclass;

carport[num].carclass = carclass;

//車輛入庫時間

carport[num].starttime = time(null);

//標記為已經停車

carport[num].carstate = 1;

cout << "車輛停泊在" << num + 1 << "號車位" << endl;

system("pause");

system("cls");

} }//取車登記(按車牌/車位查詢) 根據車輛停泊時間自動計算費用並顯示

void reduce()

}break;

case 2:

cout << "請輸入車位號碼:" << endl;

cin >> numreduce;

for (int i = 0;i < carportlength;i++)

}break;

case 3:

break;

default:

break;

} } //查詢 根據車牌、車位號

void search()

else

}break;

case 2:

cout << "請輸入車位(1-100)" << endl;

cin >> num;

for (int i = 0;i < carportlength;i++)

}else

}break;

case 3:

break;

default:

cout << "error input" << endl;

search();

break;

} }//修改車位資訊(狀態:正常使用,維修)

void changeinfo() }

void showstate()

system("pause");

system("cls");

}

};class usersystem}}

else}}

};int main()

C 實踐 租車管理系統

密碼檢測 public static bool check 3 count count 防止輸入累加 input string.empty secretinput ref input if input.equals password else car base.cs using system nam...

停車管理系統

停車管理系統設計 1.基礎版本 屬性 停車場最多停車數 max car 當前停車數 cur car 當前停車列表 car list 方法 停車 park 1 如果沒有達到最多停車數,則允許停車 2 如果沒有達到最多停車數,則允許停車 出停車場 exit 1 判斷該汽車是否進入,如果進入,則刪除car...

停車管理系統

1.基礎版本 屬性 停車場最多停車數 max car 當前停車數 cur car 當前停車列表 car list 方法 停車 park 1 如果沒有達到最多停車數,則允許停車 2 如果沒有達到最多停車數,則允許停車 出停車場 exit 1 判斷該汽車是否進入,如果進入,則刪除car list裡面相關...