'''class_worksheet_elevator.py Practice making a class for an elevator that carries people and has a weight limit Oliver W. Layton CS 151: Computational Thinking: Visual Media Spring 2021 ''' class Elevator: def __init__(self, max_weight=400): ''' TODO: Create IVs for: - max weight capacity - list of people names on elevator (initially empty list) - list of people weights on elevator (initially empty list) ''' pass def getMaxWeight(self): '''TODO: Write this get method ''' pass def getRiderNames(self): '''TODO: Write this get method ''' pass def getRiderWeights(self): '''TODO: Write this get method ''' pass def setMaxWeight(self, newMaxWeight): '''TODO: Write this set method ''' pass def addRider(self, name, weight): '''TODO: Write this method This method is called when someone gets on the elevator It should append the name and weight to the appropriate IV lists. ''' pass def findTotalRiderWeight(self): '''TODO: Write this method This method should determine and return the total weight of all the people in the elevator. ''' pass def isCapacityOk(self): '''TODO: Write this method This method should return True if the weight of all the people on the elevator is BELOW the max capacity, otherwise return False. ''' pass if __name__ == '__main__': vator = Elevator() vator.addRider('Jane', 100) vator.addRider('Jim', 100) vator.addRider('Bob', 100) print('Current weight of all riders:', vator.findTotalRiderWeight()) print('The limit is:', vator.getMaxWeight()) print('Do we have room for another rider on the elevator?', vator.isCapacityOk()) vator.addRider('Sue', 100) print('Current weight of all riders:', vator.findTotalRiderWeight()) print('Do we have room for another rider on the elevator?', vator.isCapacityOk())