CS 31 Projects 3 Specs & Solution

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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. Your program must then read the message body lines the user types in. The message
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/06/2012 for the course CS 31 taught by Professor Melkanoff during the Fall '00 term at UCLA.

Page1 / 18

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

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online