Write a computer program that will help a shopper find a home based on one criterion of their choosing:The user can choose from maximum distance, maximum price, minimum number of bedrooms, or minimum...




Write a computer program that will help a shopper find a home based on one criterion of their choosing:




The user can choose from maximum distance, maximum price, minimum number of bedrooms, or minimum number of bathrooms. The program should then display every house that matches that criterion.




Requirements:







  • Use at least one value returning function



  • No global variables can be used except for constants



  • Must read from a file and store the data in arrays






Sample Data (houses.txt) "This data needs to be incorporated into the program. The user selects only 1 criteria, and the address of the houses that are applicable, need to be printed to show the user what houses he/she could buy. The addresses are below:




number street dist price bed bath
1 Main 50 200000 3 2
5 4th 70 220000 3 1.5
100 Orange 5 250000 2 2
75 MLK 120 300000 4 1
901 Main 75 190000 2 1
35 3rd 20 180000 1 1
37 3rd 20 179000 1 1
5 Main 60 180000 3 2
200 Apple 300 150000 5 3
300 Privet 500 120000 3 3




Sample output (for new, simpler version):




Choose a criterion to find your dream home:
1: maximum distance
2: maximum price
3: minimum number of bedrooms
4: minimum number of bathrooms
5: Exit program.
Enter the category (1-5):1
Enter the maximum desired distance: 20








Address: 100 Orange Distance: 5
$250000
Bedrooms: 2 Bathrooms: 2




Address: 35 3rd Distance: 20
$180000
Bedrooms: 1 Bathrooms: 1




Address: 37 3rd Distance: 20
$179000
Bedrooms: 1 Bathrooms: 1











Nov 27, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here