Question: C++ PROGRAM You are thinking about moving to a new apartment. But there are so many choices. There are different locations, sizes, and rents. Some
C++ PROGRAM
You are thinking about moving to a new apartment. But there are so many choices. There are different locations, sizes, and rents. Some allow pets. Some are furnished. Some have dishwashers. Some have views while others are close to work and/or school. Taking all of these into consideration is important. Your job for program is build a program to help keep track of information that is important to you about apartment hunting. Here might be some of the information we want to keep:
a.Apartment complex name b.Size of the apartment(square feet) c.Number of bedrooms (0, 1, 2, etc.) d.Rent ($950) e.Pets allowed (yes, no) f.Dishwasher (yes, no) g.Distance from work/school h.Other amenities that are important
The large part of this assignment is the use of structs and arrays of structs. Therefore, your program will need to READ the information from the user, and store it in an array of structs; the array of structures should be large enough to hold information about 10 apartments.
IMPORTANT: A large piece of this assignment is to use external data files so that the information isnt lost at the end of the program. With external data files, the information that you store in the files must be written in such a way that it is easy to read it back in. Your file should use the: as the delimiter between each of the above fields. Name it apartment.txt
Your program will need to ask the user for their selection of what they want to do. Give them a choice of at least the following(Perform the above over and over until the user wants to quit): 1.Load from a file a. Read in an existing list of information and store it into your array of structures 2.Add a new apartment to the list a.Read in information from the user for something to add to the list. 3. Search for a matching apartment type to display all apartments that have the desired feature that you are most interested (as the programmer you will pick if this is square feet, pets allowed, or distance to work/school). 4.Display the entire apartment list 5.Quit and store the information back to an external data file
Make sure to keep all files(.cpp and .txt)in your current working directory on Linux as the grader will not be able to replicate your directory structure. And, include the data file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
