CS 31 Projects 3 Specs & Solution

CS 31 Projects 3 Specs & Solution - Programming...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Programming Assignment 3 Scram, Spam! Time due: 9:00 PM Thursday, October 27 Before you ask questions about this specification, see if your question has already been addressed by the Project 3 FAQ . And read the FAQ before you turn in this project, to be sure you didn't misinterpret anything. Introduction Luxembourg Online (LOL), a small internet service provider, has been receiving complaints from customers claiming that they're receiving dozens of spam email messages clogging their inbox each day. Consequently, LOL has contracted with the SmallSoft Corporation to design and build a spam detection system. Of course, since SmallSoft gets all of its labor by exploiting UCLA undergraduate students, you'll be doing all of the programming. Given one or more email messages, your program will have to classify each one as either spam or legitimate. LOL wants you to build a point-based anti-spam system. Your program is to look for certain suspicious features in the email, such as frequent use of exclamation points (!), use of words like FREE , or excessive use of uppercase letters. Each time such a suspicious feature is found, you increase a score that indicates how suspicious an email is. If an email's score exceeds 100 points, then it is classified as spam; otherwise, it is deemed legitimate. The detailed rules for scoring a message are in the Spam Rules section below. Sample Transcript Here is a sample transcript of the program, with boldface text representing the user's input. Enter the subject line of the email: MAKE MONEY FAST XTFWAQQQ Enter the body of the email. Press Enter on an empty line to finish. THIS IS YOUR CHANCE TO MAKE lots of moolah! CLICK ON www.lotsofmoolah.com FOR MORE INFORMATION! ← the user just hit the enter key on this line This email is classified as spam, because its spam score is 115. Would you like to classify another email (y or n)? Quit Please enter y or n. Would you like to classify another email (y or n)? Y
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Please enter y or n. Would you like to classify another email (y or n)? y Enter the subject line of the email: hi mom Enter the body of the email. Press Enter on an empty line to finish. Hi mom, I hope you're doing OK. My CS class is great. The instructor is GREAT! I love you! ← the user just hit the enter key on this line This email is classified as legitimate, because its spam score is 0. Would you like to classify another email (y or n)? n Number of spam messages: 1 Number of legitimate messages: 1 Input and Output Specification The first line that your program must print out is exactly this (with one space after the colon): Enter the subject line of the email: Your program must then read the subject line the user types in. (It is not an error if the subject line is the empty string.) After that, your program must print out exactly this line: Enter the body of the email. Press Enter on an empty line to finish.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern