Guessing Game... Please Help!!

Fullført Lagt ut Oct 31, 2002 Betales ved levering
Fullført Betales ved levering

I have to write a guessing game. I think its a little differant then the others I saw. Consist of two bags: One for holding the numbers and the other for holding a score for each correct guess. The first bag can't not have neg. numbers. I hope you can help me out.. If you have any questions please email me... thanks It has to be tested so that if the user puts a -number in it will accept it but won't get any points for it..... I have all the details below... thanks again

## Deliverables

Write a class called IntBag. Your IntBag uses an int-array and the capacity of the array is 100. An extra integer should be used to be able to track the current position of array cells.

The member functions are following:

IntBag(); //a constructor

bool enter(int); //insert an integer to the bag

bool search(int); //search the bag for a target integer

int sumup( ); // sum-up the integers

2. By using your IntBag class, write a number guessing game. Your game needs to follow the instructions below.

Rules:

[url removed, login to view] game starts with 2 bags.

[url removed, login to view] bag should not contain any negative number.

[url removed, login to view] the user a choice to stop the program at any time.

Steps to follow

1. Fill-up the first bag with the ascending order of integers(1- to whatever)

2. Ask the user to guess/enter an integer. Do not use or attempt to use a while loop to eliminate the user&'s input that is not in the acceptable range (ie if the user enter -100 as a guessed number, accept it as is. Do not tell the user that the number is out of range).

3. Check your first bag to see if the target number (the user's input) is there. If it's there, store 5 in the second array ( the position/location doesn&'t matter but would be nice because they could guess the same number and get points for it, they should only get a point for that one and then it can&'t be given another for the same guess. So the position is kinda important but doesn&'t have to be there.) If its not there, store 0 in the second array, again the position doesn&'t matter but would be nice.

4. Repeat the procedures until the second array is completely filled or the user decides to stop the program. If it does stop then it should print out all the point in the second bag and then sum up their score.

5. Sum-up all the scores and then print out the result

Must have:

IntBag.h //Header file

[url removed, login to view] //Implement file

[url removed, login to view] // Main file

## Platform

I'm using XP and 2000. I will be compiling it on Microsoft visual C++ 6.0.

C-programmering PHP

Prosjekt-ID: #2880738

Om prosjektet

4 bud Eksternt prosjekt Aktiv Nov 4, 2002

Tildelt til:

softdreamsvw

See private message.

$7 USD på 14 dager
(55 omtaler)
7.1

4 frilansere byr i gjennomsnitt $15 for denne jobben

idleswell

See private message.

$15.3 USD på 14 dager
(174 Omtaler)
5.9
foodaddy

See private message.

$9.35 USD på 14 dager
(6 Omtaler)
1.1
shashitiwari

See private message.

$29.75 USD på 14 dager
(0 Omtaler)
0.0