Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 131,635 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,650 people online right now. Registration is fast and FREE... Join Now!




Programming Project- HELP before FRIDAY 05/09/08

 
Reply to this topicStart new topic

Programming Project- HELP before FRIDAY 05/09/08, Customer File

casper0087
post 7 May, 2008 - 04:11 PM
Post #1


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 2

An Internet service provider has three different subscription
packages for its customers:

Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.

Package B: For $14.95 per month 20. hours of access are provided. Additional hours are $1.00 per hour.

Package C: For $19.95 per month unlimited access is provided.

Table of the months, days, and hours for each month.

Month Days Hours
January 31 744
February 28 672
29 696 (Leap Year)
March 31 744
April 30 720
May 31 744
June 30 720
July 31 744
August 31 744
September 30 720
October 31 744
November 30 720
December 31 744

REQUIREMENTS:

1. Read customer data from "CustomerFile.txt".
This is a sequential text file with space separated fields.
File Format: CustomerId integer (nnn)
Package char
Hours Used float
BillingDate char (mmddyyyy)

2. Read data into an array of records for processing.

3. Validate data before processing.
An invalid record should not be processed and type of
error should be indicated in a message field.

4. Compute customer's monthly charge for package selected.

5. Compute maximum savings and indicate which package
could have been selected for best savings.

6. Write billing data to "CustomerBill.txt".
This is a sequential text file with space separated fields.
File Format: CustomerId integer
Package char
Hours Used float
BillingDate char (mmddyyyy)
Charge float
Savings float
Message char(20)


CustomerFile
101 A 7 07262003
102 a 10 07262003
103 a 11 07262003
104 a 12.5 07262003
105 a 13 07262003
106 a 15 07262003
107 a 18 07262003
108 a 20 07262003
109 a 22 07262003
110 a 25 07262003
111 a 30 07262003
201 B 7 07262003
202 b 10 07262003
203 b 11 07262003
204 b 12.5 07262003
205 b 13 07262003
206 b 15 07262003
207 b 18 07262003
208 b 20 07262003
209 b 22 07262003
210 b 25 07262003
211 b 30 07262003
301 C 7 07262003
302 c 10 07262003
303 c 11 07262003
304 c 12.5 07262003
305 c 13 07262003
306 c 15 07262003
307 c 18 07262003
308 c 20 07262003
309 c 22 07262003
310 c 25 07262003
311 c 30 07262003
404 d 32 07162003
405 c 32 07161989
406 c 32 07162021
407 c 32 7162021
408 c 32 11162O12
409 c 32 00312003
410 c 32 13312003
411 c 32 04002003
412 c 32 04312003
413 c 32 03322003
414 c 32 02292003
415 c 32 02302000
416 b 721 06302003
417 b 745 07312003
418 b 673 02282003
419 b 697 02292004


Attached File(s)
Attached File  ProgrammingProject_S01.doc ( 37.5k ) Number of downloads: 14
Attached File  CustomerFile.txt ( 1.06k ) Number of downloads: 10
User is offlineProfile CardPM

Go to the top of the page


girasquid
post 7 May, 2008 - 04:50 PM
Post #2


Barbarbar

Group Icon
Joined: 3 Oct, 2006
Posts: 1,255



Thanked 14 times

Dream Kudos: 650
My Contributions


Okay - if you don't have some code you've written yourself that you're having a problem with, you might be better off posting this on something like rentacoder.com.
User is offlineProfile CardPM

Go to the top of the page

casper0087
post 7 May, 2008 - 04:59 PM
Post #3


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 2

Thanks for ur advice this is the first time i come on this website but ima post my code and see.. thanks
User is offlineProfile CardPM

Go to the top of the page

KYA
post 7 May, 2008 - 05:12 PM
Post #4


#include <nerd.h>

Group Icon
Joined: 14 Sep, 2007
Posts: 4,157



Thanked 48 times

Dream Kudos: 1150
My Contributions


Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/20/08 05:51AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month