Python - simple and concise - multiple solutions!
Array Solution:\n\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.spaces = [0, big, medium, small]\n\n    def addCar(se
**Array Solution**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.spaces = [0, big, medium, small]\n\n    def addCar(self, carType):\n        self.spaces[carType] -= 1\n        return self.spaces[carType] >= 0\n```\n\n**Do not allow *spaces* to go negative**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.spaces = [0, big, medium, small]\n\n    def addCar(self, carType):\n        if self.spaces[carType] > 0:\n            self.spaces[carType] -= 1\n            return True\n        else:\n            return False\n```\n\nIn the prior solutions, the first element in the array is to line up the indices of the *spaces* array variable with the *carType* variable expected inputs. This can also be done through subtracting 1 from *carType* variable during the index call.\n\n**Do not prepend array element**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.spaces = [big, medium, small]\n\n    def addCar(self, carType):\n        self.spaces[carType-1] -= 1\n        return self.spaces[carType-1] >= 0\n```\n\n**Dictionary solution**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.spaces = {1: big, 2: medium, 3: small}\n\n    def addCar(self, carType):\n        self.spaces[carType] -= 1\n        return self.spaces[carType] >= 0\n```\n\n**Individual Class Variables with If Statement**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.big, self.medium, self.small = big, medium, small\n\n    def addCar(self, carType):\n\t\tif carType == 1:\n\t\t\tself.big -= 1\n\t\t\treturn self.big >= 0\n\t\telif carType == 2:\n\t\t\tself.medium -= 1\n\t\t\treturn self.medium >= 0\n\t\telif carType == 3:\n\t\t\tself.small -= 1\n\t\t\treturn self.small >= 0\n\t\telse:\n\t\t\treturn False\n```\n\n**Individual Class Variables with Match**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.big, self.medium, self.small = big, medium, small\n\n    def addCar(self, carType):\n        match carType:\n            case 1:\n                self.big -= 1\n                return self.big >= 0\n            case 2:\n                self.medium -= 1\n                return self.medium >= 0\n            case 3:\n                self.small -= 1\n                return self.small >= 0\n            case _:\n                return False\n```\n\n**Individual Class Variables with Reflection**:\n```\nclass ParkingSystem(object):\n    def __init__(self, big, medium, small):\n        self.big, self.medium, self.small = big, medium, small\n\n    def addCar(self, carType):\n\t\tcarTypeName = ["","big","medium","small"][carType]\n\t\tsetattr(self, carTypeName, getattr(self, carTypeName)-1)\n\t\treturn getattr(self, carTypeName) >= 0\n```
['Python', 'Python3']