Question

the goal is to create a c++ programs with small functions where the main delegates series...

the goal is to create a c++ programs with small functions where the main delegates series of functions where the real work takes place. In this programming assignment, you are not allowed to use global variables. Avoid using break (unless working with a switch statement). Limit your functions to no more than 30 statements of code (not including comments or blank lines). Never use a “return” in the middle of a loop! Program Assignment: When I went to Paris over Spring break, I was really proud to have learned how to count to a hundred before leaving. It is fun to learn basics about other languages. I tried out some apps to help learn french, but I found them really hard to use or just to elementary. I just wanted to learn how to count and nothing else. With this program, you will create a game to help the user learn how to count to ten in french. The game will begin by displaying the entire word for a number (Un). The player has to guess what number it is (One).

1. Every time the player gets it correct, they get a point

2. After 5 points, they are ready to advance to the next level

3. The player should also have an option to quit rather than progressing

In the next level, one letter is left out of the word and the player has to provide the missing letter (D_x for 10). The player has to guess the missing letter.

1. Every time the player gets it correct, they get a point

2. After 5 points, they are ready to advance to the next level

3. The player should also have an option to quit rather than progressing

In the third and final level, 2-to-3 letters are left out of the word (if the word is longer than 2 letters…there must always be at least one letter displayed)

4. The player wins when they get 5 points at this level

5. The player can quit early if they want.

You will want to use the random number generator when determining which character to leave blank for level 2 and 3 of the game.

1. Include the cstdlib and ctime libraries

2. Seed the random number generator at the beginning of your program: srand(time(0));

3. Use the random number generator get receive a random number: number = rand();

4. The mod operation (%) is great to limit the value returned from the random number generator, such as limiting the number to a range of 1-length of a word. variable = some_number % maximum; The % gives you the remainder (which is what is left over after an integer division).

Things you should know...as part of your C++ program:

1. You can assume that the name of a number is no longer than 20 characters.

2. After each input operation, make sure to use cin.ignore to remove the delimiters!

3. Make sure to prompt the user for any input requested. Make sure it is clear from your prompts what the user is expected to do.

4. Use the cstring library with strlen to determine the length of the question and response entered.

5. The use of strlen should not be in the conditional expression. Consider using it prior to a loop and storing the results of strlen in a variable!!

6. Use the subscript operator [] to match letters, using a loop (recommend for loops)

7. You may not use any global variables in this program!

8. You may not use the string class – instead use arrays of characters with cstrings

9. Make sure to use C++’s I/O (iostream library) for your input and output.

10. FUNCTIONS are required for this assignment

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
the goal is to create a c++ programs with small functions where the main delegates series...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • C++ Hangman (game) In this project, you are required to implement a program that can play...

    C++ Hangman (game) In this project, you are required to implement a program that can play the hangman game with the user. The hangman game is described in https://en.wikipedia.org/wiki/Hangman_(game) . Your program should support the following functionality: - Randomly select a word from a dictionary -- this dictionary should be stored in an ASCII text file (the format is up to you). The program then provides the information about the number of letters in this word for the user to...

  • Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program...

    Please help with this Intro to programming in C assignment! Intro to Programming in C-Large Program 3 - Hangman Game Assignment purpose: User defined functions, character arrays, c style string member functions Write an interactive program that will allow a user to play the game of Hangman. You will need to: e You will use four character arrays: o one for the word to be guessed (solution) o one for the word in progress (starword) o one for all of...

  • Create a new program, WordGuessingGame. Using a while loop, create a game for the user. The...

    Create a new program, WordGuessingGame. Using a while loop, create a game for the user. The game requires the user to guess a secret word. The game does not end until the user guesses the word. After they win the game, they are prompted to choose to play again. The secret word that user must guess is "valentine". It is a case-sensitive analysis With each guess... If the guess does not have an equal number of characters, tell the user...

  • I have to use java programs using netbeans. this course is introduction to java programming so...

    I have to use java programs using netbeans. this course is introduction to java programming so i have to write it in a simple way using till chapter 6 (arrays) you can use (loops , methods , arrays) You will implement a menu-based system for Hangman Game. Hangman is a popular game that allows one player to choose a word and another player to guess it one letter at a time. Implement your system to perform the following tasks: Design...

  • This is for C programming: You will be given files in the following format: n word1...

    This is for C programming: You will be given files in the following format: n word1 word2 word3 word4 The first line of the file will be a single integer value n. The integer n will denote the number of words contained within the file. Use this number to initialize an array. Each word will then appear on the next n lines. You can assume that no word is longer than 30 characters. The game will use these words as...

  • For a C program hangman game: Create the function int play_game [play_game ( Game *g )]...

    For a C program hangman game: Create the function int play_game [play_game ( Game *g )] for a C program hangman game. (The existing code for other functions and the program is below, along with what the function needs to do) (Also the link to program files (hangman.h and library file) is below the existing code section. You can use that to check if the code works) What int play_game needs to do mostly involves calling other functions you've already...

  • Create the game hangman using c code: Program description In the game of hangman, one player...

    Create the game hangman using c code: Program description In the game of hangman, one player picks a word, and the other player has to try to guess what the word is by selecting one letter at a time. If they select a correct letter, all occurrences of the letter are shown. If no letter shows up, they use up one of their turns. The player is allowed to use no more than 10 incorrect turns to guess what the...

  • Need help with this C program? I cannot get it to compile. I have to use...

    Need help with this C program? I cannot get it to compile. I have to use Microsoft Studio compiler for my course. It's a word game style program and I can't figure out where the issue is. \* Program *\ // Michael Paul Laessig, 07 / 17 / 2019. /*COP2220 Second Large Program (LargeProg2.c).*/ #define _CRT_SECURE_NO_DEPRECATE //Include the following libraries in the preprocessor directives: stdio.h, string.h, ctype.h #include <stdio.h> /*printf, scanf definitions*/ #include <string.h> /*stings definitions*/ #include <ctype.h> /*toupper, tolower...

  • #include<stdio.h> #include<stdlib.h> #include <time.h> int main() { /* first you have to let the computer generate...

    #include<stdio.h> #include<stdlib.h> #include <time.h> int main() { /* first you have to let the computer generate a random number. Then it has to declare how many tries the user has for the game loop. we then need the player to enter their guess. After every guess we have to give an output of how many numbers they have in the right location and how many they have the right number. The player will keep guessing until their 10 tries are...

  • JAVA Project Please have the code written in JAVA This is a game I am trying...

    JAVA Project Please have the code written in JAVA This is a game I am trying to develop. Please let me know if its possible and what the base code is. Prompt User “Hello! Welcome to the game.” Prompt User “To begin the game, please enter a letter” Random word generator, will set the String to a new word After the user inputs a letter, the computer will enter a loop Once in the loop the computer will test each...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT