Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //preset carpark
- CarPark *carpark = new CarPark[numCarPark];
- int *numSlot = new int[numCarPark];
- double *Pfee = new double[numCarPark];
- int slot[3] = { 6,30,20 };
- int slot2[3] = { 1,5,3 };
- int slot3[3] = { 8,20,10 };
- double fee[3] = { 25,28,28 };
- double fee2[3] = { 30,36,32 };
- double fee3[3] = { 15,22,20 };
- for (int i = 0; i < numCarPark;i++) {
- numSlot[i] = slot[i];
- Pfee[i] = fee[i];
- }
- carpark[0] = CarPark(numSlot, Pfee, "Happy Parking", "Happy Valley");
- for (int i = 0; i < numCarPark; i++) {
- numSlot[i] = slot[i];
- Pfee[i] = fee[i];
- }
- carpark[1] = CarPark(numSlot, Pfee, "Wealthy Parking", "Mong Kok");
- for (int i = 0; i < numCarPark; i++) {
- numSlot[i] = slot2[i];
- Pfee[i] = fee2[i];
- }
- carpark[2] = CarPark(numSlot, Pfee, "Come Parking", "Kowloon Tong");
- for (int i = 0; i < numCarPark; i++) {
- numSlot[i] = slot3[i];
- Pfee[i] = fee3[i];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement