Question: Lab 3 Print Check the Control Structures-Selection II slide in Week 4. Implement the Cable Company Billing example presented in pages 15 through 28. 0%

 Lab 3 Print Check the Control Structures-Selection II slide in Week
4. Implement the Cable Company Billing example presented in pages 15 through
28. 0% 0 of 2 topics complete Lab 3 2 Assignment Due
February 17 at 12:30 AM Ends Feb 21, 2020 12:30 AM Compile
and execute the program making sure that all syntax and logic errors
are removed. Name the CPP file LastNameFirstInitial.cpp. For example, I would name
my file LeeD.cpp. Upload a file for this assignment. Explain your program
appropriately using comments (/* */, //) inside the CPP file. Programming Example:
Cable Company Billing This programming example calculates a customer's bill for a
local cable company There are two types of customers: - Residential -
Business Two rates for calculating a cable bill: - One for residential
customers - One for business customers 15 /28 A https://myleoonline.tamuc.edu/d21/le/content/46175/viewContent/540426/Viewfour 46175 Programming
Example: Rates For residential customer: - Bill processing fee: $4.50 - Basic
service fee: $20.50 - Premium channel: $7.50 per channel For business customer:
- Bill processing fee: $15.00 - Basic service fee: $75.00 for first

Lab 3 Print Check the Control Structures-Selection II slide in Week 4. Implement the Cable Company Billing example presented in pages 15 through 28. 0% 0 of 2 topics complete Lab 3 2 Assignment Due February 17 at 12:30 AM Ends Feb 21, 2020 12:30 AM Compile and execute the program making sure that all syntax and logic errors are removed. Name the CPP file LastNameFirstInitial.cpp. For example, I would name my file LeeD.cpp. Upload a file for this assignment. Explain your program appropriately using comments (/* */, //) inside the CPP file. Programming Example: Cable Company Billing This programming example calculates a customer's bill for a local cable company There are two types of customers: - Residential - Business Two rates for calculating a cable bill: - One for residential customers - One for business customers 15 /28 A https://myleoonline.tamuc.edu/d21/le/content/46175/viewContent/540426/Viewfour 46175 Programming Example: Rates For residential customer: - Bill processing fee: $4.50 - Basic service fee: $20.50 - Premium channel: $7.50 per channel For business customer: - Bill processing fee: $15.00 - Basic service fee: $75.00 for first 10 connections and $5.00 for each additional connection Premium channel cost: $50.00 per channel for any number of connections - + OM t 16 28 Programming Example: Requirements Ask user for account number and customer code Assume R or r stands for residential customer and B or b stands for business customer + 17 1287 ViewContent/540426/View?u=46175 Programming Example: Input and Output Input: - Customer account number - Customer code - Number of premium channels - For business customers, number of basic service connections Output: - Customer's account number - Billing amount View as 1828 0 Programming Example: Program Analysis Purpose: calculate and print billing amount Calculating billing amount requires: - Customer for whom the billing amount is calculated (residential or business) Number of premium channels to which the customer subscribes For a business customer, we need: - Number of basic service connections - + 0 19128 Programming Example: Program Analysis (continued) Data needed to calculate the bill, such as bill processing fees and the cost of a premium channel, are known quantities The program should print the billing amount to two decimal places - cout View as T + D + 20 128 Programming Example: Algorithm Design Set precision to two decimal places Prompt user for account number and customer type If customer type is R or r - Prompt user for number of premium channels Compute and print the bill If customer type is B or b - Prompt user for number of basic service connections and number of premium channels - Compute and print the bill 21 /28 Programming Example: Variables and Named Constants in account Number: variable to store the customer's account number char customerType: Variable to store the customer code sint numo PremChannels: variable to store the number HoE premium channels to which the 7 customer subscribes int numofBasicservConn: variable to store the number of basic service connections to which the customer subscribes double amount Due; /variable to store the billing amount Named constant residential customers const double RES BILL PROC_FEES = 4.50; const double RES BASIC SERV_COST - 20.50; const double RES_COST PREM_CHANNEL = 7.50; Namad constants business customers const double BUS BILL PROC_FEES - 15.00; const double BUS BASIC SERV_COST = 75.00; const double BUS BASIC CONN COST - 5.00; const double BUS COST PREM CHANNEL - 50.00; KA 22 | 28 1011 JUINCUM 540426/View?ou 46175 Programming Example: Formulas Billing for residential customers: amount Due = RES BILL PROC FEES + RES_BASIC_SERV_COST + numofPremChannels * RES COST PREM CHANNEL; Il View 23128 J m enu 4b175viewContent/540426/View?u=46175 Programming Example: Formulas (continued) Billing for business customers: if (numofBasicServConn

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!