Hi every body I need to constract a code from this problem

This question is based on Unit 2.
A motor insurance company has surveyed a sample of its clients. The information
on each returned questionnaire includes the following:
o whether the client has had a claim in the last twelve months;
o the age of the client (in whole years at last birthday).
(Each returned questionnaire is referred to as a `return' for short.)
A program is required to analyse this information. A keyboard operator is to input
the data by responding to the following screen prompts.
Has the client claimed in the last 12 months?
Enter Y (for Yes), N (for No) or S (to stop processing):
and
Age of client?
5
When all data has been entered, the program is to output three numbers. These
are the total number of returns analysed, the number who have made a claim, and
the number who have made a claim and are under 25. Typical output might be as
follows.
Number of returns analysed = 685
Number of claimants = 131
Number of claimants who are under 25 = 79
The program is to be based on the following top-level design.
1 initialise variables
2 loop while there are more returns to be processed
3 process next return
4 loopend
5 write out results


Step 3 will involve reading in the data from the next return - a character value in response to
the first prompt and an integer value in response to the second prompt - and updating counts
accordingly. Note that the client's age is requested for all returns, not just for those where a
claim has been made.
As it is not known in advance how many returns there are going to be, the loop will
have to be controlled by operator input. To indicate the end of input, the sentinel value `S' is
to be entered in response to the first of the screen prompts.

I had attached a librarey so you can add it to the code.


I'm realy in trouble so please help me. :cry:

regards,

sunlight

Recommended Answers

All 3 Replies

How Can You Expect That From Forums...I am Sure That Library(Whatever You Are Attaching) Is Not Yours.

Anyways Read The Rules

I'm a novice programmer and even I can imagine in my head what this would look like. Bottom line dont be lazy and have us do your homework for you. Its novice programmers like you who give others (me) who actualy try a bad name.

Read the first 3 chapters of any Beginner C++ book to find your answers.

Post your source instead of just the header file. The header file won't help too much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.