#################################################
# Script name: ITS320_Module8_Final.py
# Author: Ashton Mellott
# Created: 2018-OCT-06
#################################################
#
# Create a home inventory
...
#################################################
# Script name: ITS320_Module8_Final.py
# Author: Ashton Mellott
# Created: 2018-OCT-06
#################################################
#
# Create a home inventory class that will be used by a National Builder to
maintain inventory of available houses in the country. The following attributes
should be present in your home class:
# private int squarefeet
# private string address
# private string city
# private string state
# private int zipcode
# private string Modelname
# private string salestatus (sold, available, under contract)
#
# Your program should have appropriate methods such as:
##
constructor
# add a new home
# remove a home
# update home attributes
# At the end of your program, be sure that it allows the user to output all
home inventory to a text file.
# Be sure that your final program includes your source code and screenshots
of the application, executing the application, and the results.
#
class Home:
# constructor
def __init__(self):
self.__squarefeet = 0 # the square footage of the home
self.__address = "" # the address of the home
self.__city = "" # the closest city of the home
self.__state = "" # the state where the home is located
self.__zipcode = 0 # the zip code of the home
self.__modelname = "" # the model name of the home
self.__salestatus = "" # the status of the sale
# add method
def addNewHome(self):
self.__squarefeet = int(input("Enter square footage of the home: "))
self.__address = input("Enter the address of the home: ")
self.__city = input("Enter the closest city: ")
self.__state = input("Enter the state: ")
self.__zipcode = int(input("Enter the zip code: "))
self.__modelname = input("Enter the model name: ")
self.__salestatus = input("Enter sale status (sold, available, under
contract): ")
# remove method
def removeHome(self):
self.__squarefeet = 0
self.__address = ""
self.__city = ""
self.__state = ""
self.__zipcode = 0
self.__modelname = ""
self.__salestatus = ""
print("Home record removed!\n")
# update method
def updateHome(self):
[Show More]