Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Billing of Cable Company program in JAVA that calculates a customers bill for a local cable company. There are two types of customers:

Write a Billing of Cable Company program in JAVA that calculates a customers bill for a local cable company. There are two types of customers: residential and business. There are two rates for calculating a cable bill: one for residential customers and one for business customers.

For residential customers, the following rates apply:

Bill processing fee: Rs. 500 Basic service fee: Rs. 350 Premium channels: Rs. 250 per channel.

For business customers, the following rates apply: Bill processing fee: Rs. 1000 Basic service fee: Rs. 750 for first 10 connections, Rs. 200 for each additional connection Premium channels: Rs. 550 per channel for any number of connections The program should ask the user for an account number (an integer) and a customer code. Assume that R or r stands for a residential customer, and B or b stands for a business customer.

Input: The customers account number, customer code, number of premium channels to which the user subscribes, and, in the case of business customers, number of basic service connections.

Output: Customers account number and the billing amount

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions