Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ ## menu How personalized should the ad be? (1-3) ## scenario 1 Do you own a dog? Meat's the need of dogs like yours!

C++

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

## menu "How personalized should the ad be? (1-3)"

## scenario 1 "Do you own a dog?" "Meat's the need of dogs like yours!" "Dirty mouth? Clean it up with new Orbit Raspberry Mint."

## scenario 2 "How many Facebook friends do you have?" "Don't like cleaning up after your dog? Call Doody Free to sign up for backyard cleanup or dog walking service." "Who doesn't need another cat? Adopt a shelter pet right meow."

## scenario 3 "What is your zip code?" "What is your age?" "You are surrounded by professional athletes. Up your exercise game in the privacy of your home with a Peloton bike." "Looking for dinner that won't break the bank? Tacos. Come grab a $3 at Centro Latin Kitchen." "Feeling Uninspired? The Boulder Flatirons are calling. Come hike to inspiring views, delicious food, and enjoy the hospitality of Boulder, CO.";

## invalid option "Invalid option."

Question 6(15pt): Personalized ad You have graduated from CU Boulder, and now have a job to create a personalized ad program to serve a person on a social media platform. The program prompts the user for information and then text that describes ads based on their inputs. There are three scenarios for the program. The program asks the users which scenario they want to do. Then, depending on the choices, the program asks information and show an ad. Please make sure to print "Invalid option." if they choose other than three scenarios. Extra Credit: If you use a switch statement for this question, we will give you 5 pt extra credit. Scenario 1: For advertisers using the lowest tier of personalization on this social media platform, there is limited data about users available we only know whether a user self-reported that they own dog. For scenario 1, the program asks the user to enter if they own a dog. If they own a dog, then the program prints: "Meat's the need of dogs like yours!" Otherwise, the program prints: Dirty mouth? Clean it up with new Orbit Raspberry Mint." The users will be more likely to type "yes" or "no", but some of them might not. We consider "yes" and "Yes" as "yes". If the users type other than "yes" or "Yes", then the program considers them as a "no". Expected output for Scenario 1 (bold is user input): How personalized should the ad be? (1-3) Do you own a dog? yes Meat's the need of dogs like yours ! Scenario 2: Combining data from a marketing platform with the results from personality tests, we know that people with at least 500 Facebook friends are likely to be extroverts, and people with less than 500 friends are likely to be introverts. By using computer-vision, we also know extroverts post more dog photos, and introverts tend to post more photos of cats. Market research has shown that dog people are highly likely to be positively influenced by advertisements for any product that includes dogs, and similar for cat people and cats. For Scenario 2, the program asks the user how many Facebook friends they have. If the number of Facebook friends is greater than or equal to 500, the program prints: Don't like cleaning up after your dog? Call Doody Free to sign up for backyard cleanup or dog walking service." If the number of Facebook friends is less than 500, it prints: "Who doesn't need another cat? Adopt a shelter pet right meow." Expected output for Scenario 2 (bold is user input): How personalized should the ad be? (1-3) How many Facebook friends do you have? 450 Who doesn't need another cat? Adopt a shelter pet right meow. Scenario 3: Based on ad clicks and third-party data shared through purchases on a "marketplace" platform, we have data about likely income averages for every zip code in the country. We also know based on self-reported age how incomes vary based on life stage (e.g., college students have less disposable income no matter where they live). Advertisers strategically advertise to people who are more likely to be able to afford their product. For Scenario 3, the program asks the users to enter their zip code and age. Then, it prints the ad. If the zipcode is in Boulder (i.e. between and including 80301 and 80310) and the user is at least 25, print ad text for an expensive product. "You are surrounded by professional athletes. Up your exercise game in the privacy of your home with a Peloton bike. If the zipcode is in Boulder and the user is younger than 25, print ad text for an inexpensive product Looking for dinner that won't break the bank? Tacos. Come grab a $3 at Centro Latin Kitchen." Otherwise, print ad text encouraging the user to visit Boulder. "Feeling Uninspired? The Boulder Flatirons are calling. Come hike to inspiring views, delicious food, and enjoy the hospitality of Boulder, Co." hospitality of Boulder, CO. Expected output for Scenario 3 (bold is user input): How personalized should the ad be? (1-3) What is your zip code? 80302 What is your age? 22 Looking for dinner that won't break the bank? Tacos. Come grab a $3 at Centro Latin Kitchen. Invalid Scenario: If the user chooses a scenario that is not between 1 and 3, print "Invalid option." Expected output for an invalid scenario (bold is user input): How personalized should the ad be? (1-3) Invalid option. The file should be named as personalizedAd.cpp. Don't forget to head over to the code runner on Moodle and paste your solution in the answer box

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions