java solution
\nclass ParkingSystem {\n    int[] openSpace = new int[3];\n    public ParkingSystem(int big, int medium, int small) {\n        openSpace[0] = big;\n        ope
```\nclass ParkingSystem {\n    int[] openSpace = new int[3];\n    public ParkingSystem(int big, int medium, int small) {\n        openSpace[0] = big;\n        openSpace[1] = medium;\n        openSpace[2] = small;\n    }\n    \n    public boolean addCar(int carType) {\n        if(openSpace[carType-1]>0)\n        {\n            openSpace[carType-1]--;\n            return true;\n        }\n        else\n            return false;\n    }\n}\n\n/**\n * Your ParkingSystem object will be instantiated and called as such:\n * ParkingSystem obj = new ParkingSystem(big, medium, small);\n * boolean param_1 = obj.addCar(carType);\n */\n```
[]