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, 22.06.2019 09:00
What is one way in which tablets differ from laptops and notebooks? tablets are designed for touch-based interaction. tablets are designed to be used as desktops. tablets are designed for input via a keyboard and mouse. tablets are designed to be larger than laptops.
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 22.06.2019 22:50
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
question
Computers and Technology, 23.06.2019 06:10
The head restraint should be adjusted so that it reaches a.the top of your ears b.the base of your skull c.the top of the head
Answers: 1
You know the right answer?
Write the following program: Use struct data type to store information about a neighborhood. Every h...
Questions
question
Mathematics, 10.11.2020 18:30
question
English, 10.11.2020 18:30
question
Social Studies, 10.11.2020 18:30
question
English, 10.11.2020 18:30
Questions on the website: 13722367