Question

In: Computer Science

Using C++ There are number of cable company in southern California which offer number of services...

Using C++

There are number of cable company in southern California which offer number of services

for customers. This company have 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 $4.50
  • Basic service fee $20.50
  • Premium channels $7.50 per channel

For business customers the following rates apply:

  • Bill processing fee $15.0
  • Basic service fee $75.0 for the first 10 connections, $5.00 for additional connections.
  • Premium channels: $ 50.00 per channel for any number of connections.

Input:

The customer’s account number,

Customer code

Number of premium channels

And in case of business customers, number of basic service connections

What to deliver (output) Customers’ account number and the billing amount

Run your program for the given data:

Enter customer code: R or r (Residential) or B or b (Business) B

Enter number of service connections 16

Enter number of premium channels 8

Display total billing amount:

Run for residential customers:

R

Test your program for 12 premium channels.

flow chart, pseudo code are required for every projects and activities.

Solutions

Expert Solution

If you have any doubts, please give me comment...

#include<iostream>

#include<string>

using namespace std;

int main(){

    int account_number;

    int no_channels;

    string customer_code;

    char cust_type;

    cout<<"Enter Customer account number: ";

    cin>>account_number;

    cout<<"Enter Customer Code: ";

    cin>>customer_code;

    cout<<"Enter customer code: R or r (Residential) or B or b (Business): ";

    cin>>cust_type;

    double bill = 0;

    if(cust_type=='r' || cust_type=='R'){

        cout<<"Enter number of premium channels: ";

        cin>>no_channels;

        bill = 4.50;

        bill += 20.50;

        bill += no_channels*7.50;

    }

    else{

        int no_connections;

        cout<<"Enter number of service connections: ";

        cin>>no_connections;

        cout<<"Enter number of premium channels: ";

        cin>>no_channels;

        bill = 15.00;

        if(no_connections<=10)

            bill += 75.00;

        else

            bill += 75.00 + ((no_connections-10)*5.00);

        bill += no_channels*50.00;

    }

    cout<<"The bill is: $"<<bill<<endl;

    return 0;

}


Related Solutions

In southern California, a growing number of persons pursuing a teaching credential are choosing paid internships...
In southern California, a growing number of persons pursuing a teaching credential are choosing paid internships over traditional student teaching programs. A group of ten candidates for three teaching positions consisted of seven paid interns and three traditional student teachers. Assume that all tencandidates are equally qualified for the three positions, and that x represents the number of paid interns who are hired. (a) Does x have a binomial distribution or a hypergeometric distribution? Support your answer. (Round your answer...
(a) The Marino Company in Ventura County, southern California sells swimming pool equipment. The sales for...
(a) The Marino Company in Ventura County, southern California sells swimming pool equipment. The sales for swimming pool motors in southern California over the last 12 months is given in Table Q4(a). Forecast the demand from March to December of the current year using the following forecasting models. Use excel for the tabulation. (i) Three-month simple moving average; (ii)Three-month weighted moving average. Use 0.7, 0.2, and 0.1 for the weights, with 0.7 for the most recent period, and 0.1 for...
use c++ Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number...
use c++ Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages. Use class Package as the base class of the hierarchy, then include classes TwoDayPackage and OvernightPackage that derive from Package. Base-class Package should include data members representing the name, address, city, state and ZIP code for both the sender and the recipient of the package,...
The island fox, Urocyon littoralis, is endemic to the Channel Islands, which are located off the coast of southern California.
The island fox, Urocyon littoralis, is endemic to the Channel Islands, which are located off the coast of southern California. Six of the eight Channel Islands support fox populations, and each of these islands is home to a distinct subspecies, as shown in the table below.   Island Subspecies Northern Channel Islands Santa Cruz U. l. santacruzae Santa Rosa U. l. santarosae San Miguel U. l. littoralis Southern Channel Islands San Nicolas U. l. dickeyi San Clemente U. l. clementae Santa...
After The Cable Guys, a local TV cable company in Backwater, KS increased the monthly subscription price for its services from $20 to $30, the number of subscribers dropped from 2200 to 1800.
  After The Cable Guys, a local TV cable company in Backwater, KS increased the monthly subscription price for its services from $20 to $30, the number of subscribers dropped from 2200 to 1800.   a. Is demand for cable TV in Backwater elastic or inelastic in the specified price range? Explain how you arrived at this answer.   b. Based on the information provided above, which of the following equations provides the best linear approximation for demand for cable...
Using loop statements, write a C++ program which takes the number of items that a shopper...
Using loop statements, write a C++ program which takes the number of items that a shopper wants to buy, and then takes the price of each item, and at the end tells the shopper how much she must pay. This is a sample of the output: How many items do you have in your basket? 3 Enter the price in dollar? 10.25 Enter the price in dollar? 20.75 Enter the price in dollar? 67.5 You must pay 98.5 $ today.
There are still conventional banks which offer Islamic banking products and services through ‘Islamic window’ in...
There are still conventional banks which offer Islamic banking products and services through ‘Islamic window’ in many countries by using the existing facilities and resources so as to minimize the operating costs. Although separate accounting procedures are used to differentiate the two banking systems, there could be many issues faced by these banks in offering both banking systems. Discuss THREE (3) possible issues that may arise from such leveraging which may impact on the bank’s marketing strategies and suggest possible...
Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each...
Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages. Use class Package as the base class of the hierarchy, then include classes TwoDayPackage and OvernightPackage that derive from Package. Base class Package should include data members representing the name, address, city, state and ZIP code for both the sender and the recipient of the package, in addition to data...
The Southern Division of Barstol Company makes and sells a single product, which is a part...
The Southern Division of Barstol Company makes and sells a single product, which is a part used in manufacturing trucks. The annual production capacity is 29,000 units and the variable cost of each unit is $24. Presently the Southern Division sells 26,000 units per year to outside customers at $35 per unit. The Northern Division of Barstol Company would like to buy 15,000 units a year from Southern to use in its production. There would be no savings in variable...
The Southern Division of Barstol Company makes and sells a single product, which is a part...
The Southern Division of Barstol Company makes and sells a single product, which is a part used in manufacturing trucks. The annual production capacity is 29,000 units and the variable cost of each unit is $24. Presently the Southern Division sells 26,000 units per year to outside customers at $35 per unit. The Northern Division of Barstol Company would like to buy 15,000 units a year from Southern to use in its production. There would be no savings in variable...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT