For this lab you will implement the (slightly modified) roommate decision tree you see here (from CollegeHumor). Notice that I crossed out one of the paths. Click on the image to see the full resolution version.
Your program will ask the user these questions in the specified order and will then tell the user what kind of roommate he is. Below are some example interactions.
I will tell you what kind of roommate you are. Do you have a job? (YES or NO) yes Are you in a relationship? (YES or NO) yes Does you bf/gf have a roommate? (YES or NO) yes You are The Lover I will tell you what kind of roommate you are. Do you have a job? (YES or NO) no Do your parents love you? (YES or NO) no You are The Freeloader I will tell you what kind of roommate you are. Do you have a job? (YES or NO) yes Are you in a relationship? (YES or NO) no Oh geez, did you get dumped again? (YES or NO) yes You are The Derelict
As always, you will turn in your lab in the dropbox.cse.sc.edu, Lab 5.
No comments:
Post a Comment