subject

Write the following program: Use struct data type to store information about a neighborhood. Every house in the neighborhood is characterized by the following information: 1) Street name (string up to 20 characters); 2) the number of the house as used in the address (integer); 3) Listed price (float); and 4) the number of months since the house was purchased by the current owner (integer). The information about the individual houses is read from an input file. Store the information about all houses in an array, and then display the content of the array. Order the houses in the decreasing order of their listed prices, and then display the houses in this order. A house is more likely to be sold if it has a lower listed price and also a higher number of years since it was purchased by the current owner. The formula describing the likelihood of a house to be sold is the following: Likelihood = 0.5 x 1/ Listed price (in tens of thousands) + 0.5 x number of months since purchase. Order the houses in decreasing order of their likelihood of being sold by the current owner. Assume that a buyer has $Y dollars for purchasing houses in the neighborhood. Devise an algorithm, so that the buyer focuses on purchasing the houses that are most likely to be sold, and which he can buy with the $Y dollars that he has. Your program should list the identified houses. Note: Extra credit is given if dynamic data structures are used.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Which best describes the role or restriction enzymes in the analysis of edna a. to break dna into fragments that vary in size so they can be sorted and analyzed b. to amplify small amounts of dna and generate large amounts of dna for analysis c. to purify samples of dna obtained from the environment so they can be analyzed d. to sort different sizes of dna fragments into a banding pattern that can be analyzed
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
What is one potential problem associated with an organization purchasing new technology early in its lifecycle
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
You know the right answer?
Write the following program: Use struct data type to store information about a neighborhood. Every h...
Questions
question
Mathematics, 05.04.2020 02:23
question
Chemistry, 05.04.2020 02:23
question
Mathematics, 05.04.2020 02:23
question
Biology, 05.04.2020 02:24
Questions on the website: 13722363