⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 parksysteml.cpp

📁 Car Parking System project for software engineering lecture with Rational Rose and C++.
💻 CPP
字号:
// ParkSystemL.cpp : Defines the entry point for the console application.
//
#include <iostream.h>
#include <string.h>
#include "classheaders.h"
void main()

{	
	CPlace cpark;
	LPlace lpark;
	Place park;
	int choice=0;
	Car* c1;
	Lorry* l1;
	
	do
	{
		cout<<"				1. Add Car to Park"<<endl;
		cout<<"				2. Add Lorry to Park"<<endl;
		cout<<"				3. Remove Car From Park"<<endl;
		cout<<"				4. Remove Lorry From Park"<<endl;
		cout<<"				5. Show Park"<<endl;
		cout<<"				6. Show Car Park"<<endl;
		cout<<"				7. Show Lorry Park"<<endl;
		cout<<"				8. QUIT"<<endl;
		cout<<"				9. Total Entry Today"<<endl;
		cout<<"Choice = ";
		cin>>choice;
		cout<<endl;
		cout<<endl;
		switch(choice)
		{
		case 1:
			c1=new Car;
			cpark.CarIn(c1);
			break;
		case 2:
			l1=new Lorry;
			lpark.LorryIn(l1);
			break;
		case 3:
			c1=cpark.CarOut();
			delete c1;
			break;
		case 4:
			l1=lpark.LorryOut();
			delete l1;
			break;
		case 5:
			cout<<"Cars in Car Park: ";
			cout<<cpark.ShowCarPark()<<endl;
			cout<<"Lorries in Lorry Park: ";
			cout<<lpark.ShowLorryPark()<<endl;
			break;
		case 6:
			cout<<Car::getCarCount()<<endl;
			break;
			
		case 7:
			cout<<Lorry::getLorryCount()<<endl;
			break;
		case 8:
			cout<<"===Thank you for using CewSoft

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -