Your main function will still prompt the user

Assignment Help C/C++ Programming
Reference no: EM13166246

Write a complete C++ program that reworks your Cellular Bill calculation program from Chapter 4. Give your source file a meaningful name, such as CellBillFun.cpp.

Your new cell bill program must use 3 functions with parameters, as follows:

1.      function calcRegBill - accepts one integer argument for the number of minutes used. Determines and returns the total amount due.

2.      function calcPremBill - accepts two integer arguments, for the number of day minutes and number of night minutes used. Determines and returns the total amount due.

3.      function printBill - accepts 4 arguments: a string account number, a character service code, an integer total number of minutes used, and an amount due. Note that this is a generic print bill function, which prints either a regular or premium bill, using the following format:

Account Number:    XXXXXXX

Service Type:           Regular (or Premium, depending on the character received)

Total Minutes:         XXXX

Amount Due:           $XXX.XX

Your main function will still prompt the user for the account number and service code. Based on the service code, main will ask for the correct number of minutes, then call your functions above as needed to finish the job. In addition you must :

  • Correct any logic/calculation errors you had in your previous cellular bill program.
  • Incorporate a loop in your program to run the bill as many times as needed. You may do this either by a sentinel controlled loop, or with a counter controlled loop.Make sure all of your control structures are properly indented.
  • Run your program with the same test cases as the first Cellular Bill submission.
  • Your output can be directed to the console window.

In all of your programs, you must remember the following:

  • Include documentation at the beginning of your program.
  • Include your first and last name as the first line of all of your program outputs.
  • Use appropriate, meaningful identifier names for all variables in your program.
  • Declare constant variables for any "numeric constants" in your code.
  • Organize your code into logical sections that follow a general input, process, output structure.

Reference no: EM13166246

Questions Cloud

Matlab program which will determine your vehicle fuel usage : Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this progr..
Explain what is the root mean square speed : If He(g) has an average kinetic energy of 4610 J/mol under certain conditions, what is the root mean square speed
Democratic-authoritarian-communist and capitalist : What major governmental changes do you see occurring in Mexico, Brazil, and Argentina, for instance? Were they democratic, authoritarian, communist, capitalist?
State equation of state to calculate the pressure : Use the van der Waals equation of state to calculate the pressure of 4.00 mol of NH3 at 455 K in a 5.90-L vessel.
Your main function will still prompt the user : Your main function will still prompt the user for the account number and service code. Based on the service code, main will ask for the correct number of minutes, then call your functions above as needed to finish the job. In addition you must.
What is the mass of a cube of lead : The mass of a cube of iron is 379 g. Iron has a density of 7.87 g/cm3. What is the mass of a cube of lead that has the same dimensions?
Find a number alpha mod 8745437489 : show that 7 is a primitive root mod 8745437489. Find a number alpha mod 8745437489 that is not a primitive root
Traditional brick and mortar education : What is the difference between a traditional brick and mortar education and a distance education?
Calculate the amount of heat liberated : Calculate the amount of heat liberated (in kJ) from 417 g of mercury when it cools from 64.0°C to 12.0°C.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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