This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 15-100 PROGRAM 2 - FALL 2007Due: Monday, September 17 by 11:59PM using electronic hand-in When a visitor enters the Pittsburgh Museum, they have to sign in at a computer terminal to print out an entry ticket. You are hired by Pittsburgh Museum to write the program to generate the ticket. The ticket will contain the visitor's name in all uppercase letters, a ticket number, and an expiration date for the ticket. A sample ticket is shown on the next page. Assignment Write a simple Java program in a project named Program2that contains one class named TicketGeneratorthat reads in the name of the visitor from the keyboard and then outputs a valid ticket for the museum. DO NOT USE THE ifOR switchSTATEMENTS IN YOUR SOLUTION. Program Requirements Your TicketGeneratorclass must have static methods as described below. 1. Write a static method named DisplayFirstNumthat prints out a random three digit number that does not start with a 0....
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.
- Fall '07