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 3 - FALL 2007Due: Monday, September 24 by 11:59PM using electronic hand-in Write a Java program that contains a one class named CableTVCalculator. This class will contain a Java program that computes the charge for a cable bill. Your main method will ask the user for the following input data: •the type of cable service (basic, family, or optimum) and •if the type of service is not basic, the number of premium channels received, and •if the type of service is optimum, the number of pay-per-view movies purchased. You may assume that all input numerical data is of the proper form and will not contain negative values. Depending on the input data value(s), the program will calculate and display the amount of the cable bill for the user. Cable fees are calculated according to the following rules: ClassificationRateBasic cable$25.00Family cable$40.00 + $5.49 for each premium channel receivedOptimum cable$60.00 + $4.24 for each premium channel received + $3.99 per pay-per-view movie for up to the first 4 movies purchased + $3.09 per pay-per-view movie for any additional movies purchased beyond the first 4 (if any)....
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