homework5 - 15-100 HOMEWORK 5 - FALL 2007Answer the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-100 HOMEWORK 5 - FALL 2007Answer the following questions on paper and hand in at the start of class on the due date indicated. 1. A spinner is implemented with a Java class named Spinner with the following API: public Spinner() Creates a new spinner with the numbers 1 to 10 on it, initially pointing to 1.public void spin()Spins the spinner to some random value. public int getSpinValue()Returns the value currently being pointed to on the spinner.Write a Java code fragment that creates a spinner, and spins the spinner repeatedly until the number 7 is spun a total of three times. You should print out each number that is spun. 2. A "captcha" is a distorted string of characters that is displayed on the screen if an access to a chat room or a request for an email account is received. It is very hard for a computer program to read the text, but humans can read it easily. Captchas are designed to prevent automated programs from gaining access to chat rooms or new email accounts. (By the way, captchas were programs from gaining access to chat rooms or new email accounts....
View Full Document

This note was uploaded on 01/25/2010 for the course CS 15100 taught by Professor Tom during the Fall '07 term at Carnegie Mellon.

Page1 / 3

homework5 - 15-100 HOMEWORK 5 - FALL 2007Answer the...

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

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