SIMPLE C++ CODE
Code\n\nclass ParkingSystem {\npublic:\n    int low=0; int mid=0; int high=0;\n    ParkingSystem(int big, int medium, int small) {\n        low= small;\n       
# Code\n```\nclass ParkingSystem {\npublic:\n    int low=0; int mid=0; int high=0;\n    ParkingSystem(int big, int medium, int small) {\n        low= small;\n        mid= medium;\n        high= big;\n    }\n    \n    bool addCar(int carType) {\n        if (carType==3){\n            if (low>=0)low--;\n            return low>=0;\n        }\n        else if (carType==2){\n            if (mid>=0)mid--;\n            return mid>=0;\n        }\n        else{\n            if (high>=0)high--;\n            return high>=0;\n        }\n    }\n};\n\n/**\n * Your ParkingSystem object will be instantiated and called as such:\n * ParkingSystem* obj = new ParkingSystem(big, medium, small);\n * bool param_1 = obj->addCar(carType);\n */\n```
['C++']