NEED HELP IN C++ PROGRAMMING QUESTION

Status
Not open for further replies.

microelectronics

Member level 1
Joined
Aug 6, 2009
Messages
39
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
johor
Visit site
Activity points
1,657
c++ question

hello edaboard users.pls help me out.i'm a new member.
i got this problem of writting a C++ program . help me out pls.
this are the question :

Title : Motor Accidents Statistics

The number of accidents occurred in a year has been recorded in a test file accident.dat in the format as follows :

CHCFTFTHMHMFOHOF........etc

Where C,T,M and O represents the type of vehicles viz.
C-car , T-taxi , M-motorcycle , O-others

And H and F represents the types of roads viz.

H-highway
F-federal road

In order to have a better understanding of the cause of accidents,you are required to write a program to analyze the data and produce two statistical reports ( by vehicle type and by road type) on the accidents. Your program should include the following functions :

- a function to initialize counters
- a function to read the accident data
- a function to analyze the accident data
- two functions to print respective reports

you are encourage to use local variables,input and output parameters for the functions.Use of global variables is not encouraged.


**
thats all..PLS help out..pls..
haha..thx!!
 

c++ programing quesions

nobody is going to do your homework for you, but if you have a go at it and post specific problems that you have you'll get help.

My best advice is to sit down with a pen and paper and try and work out the data flow and structure/functions your program requires. If you get that right, then the coding should be pretty easy.

your are going to have to use functions to open and read files and the strings they contain.

Have a look through a list of commands and try and figure out how to get them to do what you need them to.
 

c++ programming quesions

Also keep in mind to select suitable media for handling those files to keep the implementation under control.
Raoof Khan
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…