CableCompanyBilling

CableCompanyBilling - /Cable Company Billing i import java.util public class CableCompanyBilling cfw static Scanner console = new

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

View Full Document Right Arrow Icon
//Cable Company Billing / import java.util.*; i public class CableCompanyBilling { static Scanner console = new Scanner(System.in); //Named constants - residential customers static final double R_BILL_PROC_FEE = 4.50; static final double R_BASIC_SERV_COST = 20.50; static final double R_COST_PREM_CHANNEL = 7.50; //Named constants - business customers static final double B_BILL_PROC_FEE = 15.00; static final double B_BASIC_SERV_COST = 75.00; static final double B_BASIC_CONN_COST = 5.00; static final double B_COST_PREM_CHANNEL = 50.00; public static void main(String[] args) { //Variable declaration int accountNumber; char customerType; int noOfPremChannels; int noOfBasicServConn; double amountDue; System.out.println("This program computes a cable bill."); System.out.print("Enter the account number: "); //Step 1 accountNumber = console.nextInt(); //Step 2 System.out.println(); System.out.print("Enter the customer type: " + "R or r (Residential), " + "B or b(Business): "); //Step 3 customerType = console.next().charAt(0);
Background image of page 1

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

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

This note was uploaded on 06/17/2011 for the course COMP 2301 taught by Professor Staff during the Spring '10 term at Kennesaw.

Page1 / 2

CableCompanyBilling - /Cable Company Billing i import java.util public class CableCompanyBilling cfw static Scanner console = new

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