<span>The calculatePrice() method can be written in C. It will use and return doubles (which allows for decimals). It will calculate the house price of $100K + $20K per bedroom and $30K per bathroom. Next it will take that price and append the sales percentage and return that value.
double calculatePrice(decimal numBedrooms, decimal numBathrooms, decimal salesPercentage)
{
decimal housePrice = 100000 + (20000 * numBedrooms) + (30000 * numBathrooms);
return housePrice + (housePrice * salesPercentage);
}</span>
Answer:
Collaborative filtering
Explanation:
This is one out of five on the Recommender system apart from most popular items, Association and Market Basket based Analysis, Content-based analysis, self and hybrid analysis where we use both content-based and collaborative based approach together. And the Recommender system is a very important topic in Data science. For this question, remember that Collaborative filtering focuses on user and various other user's choices which are mathematically alike to concerned users, and which we find with the study of a large data set. Thus, we can predict from our above study that what are going to be likes of concerned users, and at the item level, whether that item will be liked by the concerned user or not. And this is prediction, and we use this approach in Machine learning these days. For this question, and as mentioned in question the requirements, answer is Collaborative filtering.