Respond to both of the following scenarios. Scenario #1: A car dealership has hi
ID: 3907714 • Letter: R
Question
Respond to both of the following scenarios.
Scenario #1: A car dealership has hired your software development firm to create a new car inventory program. You first need to develop a class that represents the inventory of the dealership. What components and attributes will need to be included in your automobile class? Why?
Scenario #2: A national builder has hired your software development firm to create a home inventory program. You first need to develop a class that represents the inventory of the homes in the nation. What components and attributes will need to be included in your home class? Why?
Create a Python Example program For both.
Explanation / Answer
# following attributes determine the quality of automobie class Automobile: def __init__(self, name, color, model, mileage, cost): self.name=name self.color=color self.model=model self.mileage=mileage self.cost=cost def get_name(self): return self.name def get_color(self): return self.color def get_model(self): return self.model def get_mileage(self): return self.mileage def get_cost(self): return self.color def set_name(self, value): self.name=value def set_color(self, value): self.color=value def set_model(self, value): self.model=value def set_mileage(self, value): self.mileage=value def set_cost(self, value): self.cost=value # following attributes determine the quality of house class Home: def __init__(self, location, size, rooms, stories, make): self.location=location self.size=size self.rooms=rooms self.stories=stories self.make=make def get_location(self): return self.location def get_size(self): return self.size def get_rooms(self): return self.rooms def get_stories(self): return self.stories def get_make(self): return self.make def set_location(self, value): self.location=value def set_size(self, value): self.size=value def set_rooms(self, value): self.rooms=value def set_stories(self, value): self.stories=value def set_make(self, value): self.make=value
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.