Kotlinlearncs.online LogoJava
Return to List

Homework: Advertising Conditional

Created By: learncs.online Staff
/ Version: 2021.8.0

By combining data from a marketing platform with the results from personality tests that users have completed, we know that people with at least 500 friends are likely to be extroverts, and people with less than 500 friends are likely to be introverts. Based on analysis of user-uploaded photos using computer-vision algorithms, we also know that people who are extroverts are more likely to have many photos of dogs, and introverts are more likely to have many 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 an already initialized int variable friendsCount, if a user has more than 500 friends, print the message "Adopt a Dog Today!" and otherwise print "Buy Cat Food At 20% Off".

If you'd like to find out more about targeted advertising, you may find these articles interesting:

Related Lessons

Stuck? You may find these lessons helpful: