hello there, i am not in a computer science major and i need help with this pape
ID: 3758481 • Letter: H
Question
hello there,
i am not in a computer science major and i need help with this paper please.
"Reverse" Vocabulary! As the material in this course become more and more abstract, the concepts become harder to grasp quickly. Instead of trying to guess the difficult concepts, we want you to provide us with the terms or concepts you don't think you understand yet, and provide your current definition or understanding of the term or concept to clear any misconceptions or affirm your knowledge. Your answers can be either specific vocabulary terms or more general ideas. We'll try to address some of these concepts and/or terms in this and future exercises. Designing Assignment #4 Hangman: As a group, answer the following questions. Understanding the Problem - Problem Analysis Do you understand how to play hangman? Provide an example play for winning and losing!!! Do you know what it means to ignore case in the message? How are you going to do this? Do you understand all your inputs and outputs for this program? Do you understand how to use just strings in this program? How might you use two strings to help with this? What C++ built-in string functions will you use? Refer to the documentation: http://www.cplusplus.com/reference/string/string/?kw=string Design - Give as much detail as possible based on how you answered the questions above. List the functions will you need, e.g. get_message(), determine_winner(), etc. What is the description, the pre-conditions, post-conditions, and return values of your functions? How will these functions interact with each other? Which functions will call which functions? What will the pseudo-code/algorithm look like for each of these functions? Testing - Develop the test plan for your Assignment #4 Hangman What will bad input look like? What will good input look like? What are the expected results from the bad input? Good input?Explanation / Answer
Solution :
First of all see the code so that you can get all your answers.
CODE :
- To play hangman, just run the following code and enter the inputs to play the game.
For example :
Player 1 enter word : a
Player 2 enter word : a
Hang:
Player 1 enter word : r
Player 2 enter word : r
Wins!
1-Again 2-No : 2
In example, if player 1 and 2 have the same word matching then wins the game.
- Ignore case in message means just ignore the message which is displayed on screen.
- After running the code you can easily understand inputs and outputs.
- In program string is used for lower case and upper case. And it is also used for user word.
To give detailed answer :
- check() , game() and tolowercase() .
- return values are winning or losing of game.
- Functions interact each other by the input word check() calls the game ().
- code already given above.
To test the code :
- Bad input like different word inputted by player ang good input like same words entered.
- Bad input results in losing the game and good input result in winning the game.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.