| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
<H3 style="MARGIN: auto 0in" align=left>PLEASE help me with this program assignment. I do not understand even how to begin!</H3><H3 style="MARGIN: auto 0in" align=left>The Very Small Bank wants information on how long its customers are waiting for service at drive-in windows. Employees have collected information, which your program will read from a text file. The data consists of the time the customer arrived in hours, minutes and seconds, the time the customer was actually served, and the ID number of the teller. The first digit of the teller ID indicates which branch of the bank was visited, and the next 2 digits identify the teller. The bank is open from 9 AM to 5 PM. You can assume that a customer is always served on the same day he arrives (if not, the bank would go out of business in about a week!). </H3>
Learning Objectives
Input You must download the required data file from the course Blackboard site. The required file is named bankwaits.txt. (SAVED INFO TO PAGE 3 BELOW) This file contains exactly 47 lines, each containing these items starting in the columns indicated: Column 1: teller ID (a 3-digit integer) Column 10: arrival time (as a 6-digit integer; see below) Column 25: service time (same format as arrival time) All times are given based on a 24-hour clock, with no colons. For example, 1:02:01 PM is represented in the data file as 130201. You that there are exactly 47 lines in the input file, and that all data is present, valid, and correctly formatted Processing Your program must read in all input data, then use it to calculate each wait time in seconds (an integer), the mean wait time (a real), the standard deviation of the wait times (real), the shortest and longest wait times (integers), and the range of the wait times (integer). Note all wait time data is to be processed in seconds. The bank also wants you to assign "Frustration Levels" to wait times as follows, where "mean" is the mean wait time, "wait" is the wait time under consideration, and "SD" is the standard deviation: Wait Time Frustration Level --------- ----------------- wait <= (mean - SD) Amazed (mean - SD) < wait < mean Pleased mean <= wait < (mean + SD) Calm (mean + SD) <= wait < (mean + 2*SD) Irritated (mean + 2*SD) <= wait Berserk Compute the statistics using these formulas: mean = (sum of all values) divided by (number of values) standard deviation = the square root of: (sum of the squares of the differences between each value and the mean) divided by (number of values - 1) range = difference between maximum value and minimum value Output The input data, echoprinted in tabular format The following values, all properly labeled
Number of Customers 5 10 15 ----|----|----|---- Amazed *********** Pleased **** Calm **************** etc.... where each asterisk represents a customer in the category for that row Use Of Data Structures You must use parallel one-dimensional arrays as the major data structure on this project. Also, use enumerated types where appropriate. Data File: bankwaits.txt 707 141251 141659321 090537 090748319 101502 102929222 105702 110000305 114202 115111512 130100 130302407 130100 130619211 134245 134951413 125959 130458419 165952 171012501 164932 165437872 120718 121452872 145441 150000803 090547 091148101 105213 105645136 145757 145959982 120202 120833619 140946 141431913 093031 093745654 093000 093630217 091537 092745101 090000 090005247 105702 110601172 150030 150400247 153017 153422631 115502 115801737 112807 113208602 120708 121625902 114517 115102602 165959 170859803 145441 145451631 134233 134734111 102117 102747803 151515 151559102 112049 112552114 094500 095000345 160102 160544333 102030 102502757 141252 141932101 090000 090417727 151822 152305515 122048 122417502 090102 090400767 163037 163511603 121011 123035851 165700 170902545 165502 170001 |
|
#2
|
||||
|
||||
|
I charge $150 an hour for doing homework. As I'm not a whiz at C++, I'd give you a discount, though -- $125 an hour, 10-hour minimum.
__________________
Please don't PM me asking for solutions outside the scope of a thread. Keeping all responses in a thread stands to help others who come along later, which is after all what this forum's all about. |
|
#3
|
|||
|
|||
|
I'll do it for $120/hour. :-)
bobert |
|
#4
|
|||
|
|||
|
How many hours?
Quote:
Wow! How many hours will it take? PLEASE contact me back asap. email is didaduda@gtcom.net |
|
#5
|
|||
|
|||
|
How many hours? How long does it take to write a C++ program? Please respond asap. THanks,
|
|
#6
|
|||
|
|||
|
Quote:
Last edited by yanivn : March 28th, 2004 at 09:44 PM. Reason: oopsi |
|
#7
|
|||
|
|||
|
tyr this website; www.glenmccl.com/005.htm, it has basics for the code for mean and standard deviation if youre still stuck
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Need help writing this C++ program PLEASE |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|