''' DS2500 Spring 2025 Sample code from lecture 1/21/25 - making a Food class to help Laney figure out where to eat lunch now that B.Good has closed Attributes: * name (nominal) * rating (discrete) * price (discrete) * wait (discrete) * hours (nominal) * category (nominal) * features (nominal) * proximity (discrete) Open questions: 1. what do we do about duplicates? 2. how do know if two objects are the same? If they have the same name ''' class Food: def __init__(self, name, price, cat, rating = 1, wait = 1, hours = "", feats = "", prox = 1): self.name = name self.price = price self.category = cat self.rating = rating self.wait = wait self.hours = hours self.features = feats self.proximity = prox def __str__(self): ''' return a pretty string to represent the object ''' return f"{self.name}, price scale: {self.price}" def __eq__(self, other): ''' return True if self == other ''' return self.name == other.name