Calculate and print the bill for cellular telephone company

Assignment Help Computer Engineering
Reference no: EM132208470

Question :

Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium.

Its rates vary, depending on the type of service. The rates are computed as follows:

Regular service:

For $10.00: the first 50 minutes are free. Charges for over 50 minutes are $0.20 per minute.

Premium service:

For $25.00:

a. For calls made from 6:00 a.m. to 6:00 p.m., the first 75 minutes are free; charges for more than 75 minutes are $0.10 per minute.

b. For calls made from 6:00 p.m. to 6:00 a.m., the first 100 minutes are free; charges for more than 100 minutes are $0.05 per minute.

Your program should prompt the user to enter a service code (char), and the number of minutes the service was used (int). A service code of ‘r' or ‘R' means regular service; a service code of ‘p' or ‘P' means premium service. Treat any other character as an error.

Your program should output the type of service, and the total cost. For the premium service, the customer may be using the service during the day and the night.

Therefore, to calculate the bill, you must ask the user to input the number of minutes the service was used during the day and the number of minutes the service was used during the night.

Note:- (Using C++)

Reference no: EM132208470

Questions Cloud

Convert the 16-bit bcd variable in memory locations : Write a program called UNPACK to convert the 16-bit BCD variable in memory locations 0x0150 and 0x0151 to four ASCII characters.
What is equilibrium weekly leisure time and weekly income : What is his equilibrium weekly leisure time and weekly income? What percentage of his total time does he work? If the government taxes his wage only at 20%.
Write a main function that inputs three points from the user : Write a class called Triangle. A triangle consists of 3 points. The Triangle class should have one default constructor and another constructor that initialises.
What does your reply say about the trade-off : Is it possible for a more equal income distribution today to lead to higher GDP per capita in the future? How? What does your reply say about the trade-off.
Calculate and print the bill for cellular telephone company : Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium.
Accept one string argument and returns the reverse : A recursive function called printReverse that accepts one string argument and returns the reverse of that string.
Simulate the rolling of a pair of dice 1000 times : Write a program that calls a method RollDie that simulates the rolling of a pair of dice 1000 times. Use an array of size 11 to keep track of the rolls.
Write a program that calculate taxi fare at a rate : Write a program that calculate taxi fare at a rate of $1.5 per mile. Your program should interact with the user in this manner.
Write a program that should calculate and report the sum : Write a program that should calculate and report the sum of all the integers between and including two integers.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd