SOLVE

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 1
Reputation: saidrjdh has a little shameless behaviour in the past 
Solved Threads: 0
saidrjdh saidrjdh is offline Offline
Newbie Poster

SOLVE

 
-1
  #1
Oct 26th, 2008
PLEASE SOLVE TO ME THIS PROGRAM
Oman Telecommunications (OmanTel) company would like to create a simple application to compute charges
for different phone calls and generate a summary report. You have been assigned to develop the application
using C++ programming language. OmanTel charges its customers using the distance between two phones (the
difference between source and destination phone numbers), call rate period (peak or off peak) and the call
durations in minutes according to the following table.
Call charge Criteria Call Charges in Omani Rials
Call Rate Period
Distance Type
(difference between the source
and destination phone numbers)
Off Peak
Peak
Short Distance
(The difference is less than 10000) 0.015 for each minute 0.020 for each minute
Medium Distance
(The difference is 10000 and 100000 ) 0.050 + 0.025 for each minute 0.100 + 0.030 for each minute
Long Distance
(The difference is more than 100000) 0.200 + 0.040 for each minute 0.400 + 0.050 for each minute
The program should read source phone number (8 digit number), destination phone number (8 digit
number), rate period (single letter O, o, P or p), and time duration in minutes (as positive integer number). It
computes and displays the call charge on the screen. The program accepts input for phone calls until a phone
number for source or destination phone with a value of zero is entered.
The program should ask the operator (an OmanTel employee) to enter his/her name (as a single word) and
display the name in the summary report. Also, it should display an appropriate error message if an incorrect
input is entered. For example, if source or destination phone number is not 8-digit number, rate period is invalid
(any letter other than O, o, P, or p).
The program should display a report at the end, which includes the number of phone calls, number of offpeak
calls, number of peak calls, total charges for all calls in Omani Rials, and the average charge per call.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,923
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 276
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: SOLVE

 
0
  #2
Oct 26th, 2008
I suggest you draw a flow-chart of the things you have to do, distill the variables and actions(functions) from it and start programming. Run your program, if you encounter errors, come back and w'll help you further.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC