Case Study Context
real estate agent rents individual rooms and whole properties to students. They manage various types of rental properties, ranging from houses to units and apartment units in city skyrises. You have been hired by the agent to develop a Python application to help manage their business. This proposed software will allow agent staff to:
● enter the details of newly acquired rental properties into the application
● manage these rental properties, such as changing their rental prices, the inclusions that come with these rental properties, and so on
● create periodic backups of the properties stored within. There are 2 categories of rentals that agent manages.
- RoomRental: These are rooms inside whole properties that are rented to individual students. For example, a house has 5 rooms within and they can be rented to 5 different students separately.
- Whole Rental: These are rental properties that are rented as a whole to a student.
Requirements
The functional requirements for the proposed application are: - Add new rental properties to the application by entering rental details for each property
- Retrieve the details of rental properties previously entered
- Edit and update the details of rental properties previously entered
- Delete rental properties from the application
- Display a list of available rental properties in the system
- Output the list of available rental properties into a file
- Exit the software safely.
Part One 1.
Designing your classes Each rental property entered has to be either Individual rooms or Whole properties. More categories might be introduced in future but that is outside the scope of this project. The attributes required for the two rental property types are shown in the table below. RoomRental-( Rental ID ,Address, Weekly price ,Furnished.)
Whole Rental-( Rental ID, Address, Weekly price, Furnished ,Description, Couples allowed, Attached bathroom , Number of rooms, Number of bathrooms, Garage space (how many cars can be parked), Pets allowed,)
Based on the given information, identify the object-oriented principles that can be implemented such as abstract classes, inheritance etc.
You are required to develop the application with the required functionality.
Please consider the following while designing:
● How the user will enter details for rental properties
● A menu based application that has options for the user to perform functions such as entering details, editing details, displaying list of properties etc.
● How the user can select which rental property type to enter information for:
○ consider using a sub menu that might be used to select the type of rental property the user wants to enter information for and ask for relevant information only ○ store in an appropriate data structure ○ save the information in a text file.
● How the user can edit details of the previously entered information for a rental property:
○ search for the property and identify the type of rental property
○ based on the type of property, ask the user to enter the updated details
○ update and store the information correctly ○ update the text file accordingly.
● When displaying the list of previously entered rental properties, you need to display for each property:
○ Rental ID
○ Rental type (Room or Whole)
○ Address
○ Weeklyprice
○ Furnished
○ Description
○ Couples allowed (when relevant)
○ Attached bathroom (when relevant)
○ Numberofrooms (when relevant)
○ Numberofbathrooms (when relevant)
○ Garagespace (when relevant)
○ Petsallowed (when relevant)
- Implementation requirements
The assignment requires you to use object-oriented concepts, please consider the following while implementing:
● You must create an object(s) (based on your design in “Designing your classes”) to store the details of your rental property. Simply saving the entered values into variables in your application will not give you any marks.
● Polymorphism in your code
○ You must use a variable of the Rental class to reference the object that will store the details of the rental property.
○ The object created will be dependent on the type of rental property selected. i.e. if the user selected “Room Rental”, then a RoomRental object should be created instead of a WholeRental object. ○ You will also use this reference variable when updating and displaying the rental property.
○ You will need to use a Data Structure (list of lists) of Rental objects to store all the rental properties.
● At least 1 rental property must be entered before users could select to edit or display the previously entered rental property details.
● When exiting the application, a confirmation is required to check whether the user really wants to exit.
● Yourcode must be commented sufficiently. Areas to note are: ○ Commentheaders at the top of each class that includes the name of the class, the purpose of the class, student name, student id ○ All methods should have a docstring that describe what the method is trying to do, input required and output produced ○ Instance variables: what they are to be used for ○ Decision structures: what will happen for each decision path ○ Loopstructure:
I did the code for the menus as I can, can’t seem to do the classing part.