I need a coder
Budget: $10 – $30 USD
41.3 Project 1 - Option 3: Real-Estate Management System
In this assignment we will create a Real-estate management system The program will read from a text file called properties.txt which holds information about the real-estate property held owned by the user.
The inputs are structured as follows
The first line contains the address of the property
The second line will contain the price the property charges per night
The third line will contain a number representing number tenants that booked the property
The dates goes as follow: start month, start day, end month, end day
The properties are separated by an empty line
The program will ask the user to enter a property:
Enter the address of the property you want to book or exit to exit:
After which a menu will be displayed where the user can choose to see a month or book a range of dates
Enter an option:
1. Show the calendar of the property on a given month
2. Book a period of time for a given property
q. Quit
Entering 1 prompts the user the Enter the month to be displayed
Enter the month number:
1
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
Entering 2 prompts the user to Enter a starting month, starting day, an end month and an end day and output booked!
Enter the start month and day: 1 3
Enter the end month and day: 1 5
Booked!
Exceptions
If an address does not exist output Address not found
If a month is out of range output Invalid month number
If a day is out of range output Invalid day number
If an invalid option was entered output Invalid option
If a date range has dates that are booked in it output Date range has dates that are already booked!
The program will generate a yearly.txt file which contains displays only the monthly revenue for the properties of months that actually earned money as well as the total earned that year.
Each month would display a calendar view
For each day in the month:
If the property was booked on that day then it should be marked B for booked.
If it is booked on a weekend it should be marked D (weekends are double priced).
Otherwise it should be marked * for vacant.
For inputs:
Argus Street 12311
q
exit
properties.txt
Address: Argus Street 12311
January: 161.80
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
December: 80.90
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * B
Total: $242.70
Address: Valentine Lane 21422
February: 2656.72
* B B B B B *
* B B B B B *
* B B B B B *
* B B B B B *
* B B
Total: $2656.72
Address: Agnus Dr. 12311
March: 399.96
* * * * * * *
* * * * * * D
* * * * * * D
* * * * * * *
* * *
April: 199.98
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
Total: $599.94
Address: Cullen Rd 6790
Total: $0.00
NOTE: for simplicity each month will have 31 days, also this is pre-tax
HINT: The number of days between two dates equals: Days in a month * (Difference in months) + (Difference in days). Also, please use the find() functions of the string class to compare two strings, especially if one is loaded from the ASCII text file while the other is through user input. Please take a look at the example shown in zyBooks 3.16 (especially Figure 3.16.2) to see how to use find() function for the comparison of two strings.
In this assignment we will create a Real-estate management system The program will read from a text file called properties.txt which holds information about the real-estate property held owned by the user.
The inputs are structured as follows
The first line contains the address of the property
The second line will contain the price the property charges per night
The third line will contain a number representing number tenants that booked the property
The dates goes as follow: start month, start day, end month, end day
The properties are separated by an empty line
The program will ask the user to enter a property:
Enter the address of the property you want to book or exit to exit:
After which a menu will be displayed where the user can choose to see a month or book a range of dates
Enter an option:
1. Show the calendar of the property on a given month
2. Book a period of time for a given property
q. Quit
Entering 1 prompts the user the Enter the month to be displayed
Enter the month number:
1
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
Entering 2 prompts the user to Enter a starting month, starting day, an end month and an end day and output booked!
Enter the start month and day: 1 3
Enter the end month and day: 1 5
Booked!
Exceptions
If an address does not exist output Address not found
If a month is out of range output Invalid month number
If a day is out of range output Invalid day number
If an invalid option was entered output Invalid option
If a date range has dates that are booked in it output Date range has dates that are already booked!
The program will generate a yearly.txt file which contains displays only the monthly revenue for the properties of months that actually earned money as well as the total earned that year.
Each month would display a calendar view
For each day in the month:
If the property was booked on that day then it should be marked B for booked.
If it is booked on a weekend it should be marked D (weekends are double priced).
Otherwise it should be marked * for vacant.
For inputs:
Argus Street 12311
q
exit
properties.txt
Address: Argus Street 12311
January: 161.80
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
December: 80.90
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * B
Total: $242.70
Address: Valentine Lane 21422
February: 2656.72
* B B B B B *
* B B B B B *
* B B B B B *
* B B B B B *
* B B
Total: $2656.72
Address: Agnus Dr. 12311
March: 399.96
* * * * * * *
* * * * * * D
* * * * * * D
* * * * * * *
* * *
April: 199.98
D * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * *
Total: $599.94
Address: Cullen Rd 6790
Total: $0.00
NOTE: for simplicity each month will have 31 days, also this is pre-tax
HINT: The number of days between two dates equals: Days in a month * (Difference in months) + (Difference in days). Also, please use the find() functions of the string class to compare two strings, especially if one is loaded from the ASCII text file while the other is through user input. Please take a look at the example shown in zyBooks 3.16 (especially Figure 3.16.2) to see how to use find() function for the comparison of two strings.