Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Hangman game in c++ using array

13/11/2021 Client: muhammad11 Deadline: 2 Day

Background:

Stepwise refinement is a low level design technique in which the programmer writes pseudo-code for what the program is supposed to do in steps, expanding non-obvious steps at each iteration of the process. Eventually, the stepwise refinement will be an almost step by step guideline to the implementation of the program.

Objective:

The main objective of this assignment is to assess students’ ability to apply the stepwise refinement process to develop a new algorithm and carry that through to the implementation of the program. Implementation must follow the top-down design approach, where the solution starts by describing the general functionality of a program. Next, more details are provided in successive steps to refine the implementation.

Problem Description:

You are to implement a variant of the Hangman game, where a player must find a hidden, knowing only the first letter and number of letters in the word. The player selects a letter. If the letter is part of the word, the hidden word is updated with all occurrences of the letter. All used letters must be displayed to the player.

In this variant, the player has 5 lives. Every time a letter is guess correctly the player gains a life. If a letter is guessed wrong, a life is removed. The game terminates if all lives are lost. If a player guesses a word correctly, another word is displayed, and game continues until the player chooses all words correctly or loses all lives. There is a total of 15 words which are read from a file.

Task:

Your task is to apply the technique of stepwise refinement to design an algorithm for the Hangman game.

You are provided with a function to read the words and store in a string array.

Hint:

A string’s individual characters can be accessed as if it was an array of characters.

string x = “hello”;

char y = x[1] //stores character ‘e’ in y

How to Write Step-Wise Refinement

Use a text editor (e.g., the Code::Blocks editor or Notepad) to write the first pseudo-code statement of the problem. Next, add more statements that support the implementation of that first pseudo-code statement. Each time you refine a step, copy and paste the current version of the program design to the end of the text file, then make the change within that pasted version. Stick to the instructor's convention of using a different number of *s to indicate the level of expansion applicable to each statement (see example below). When the design is complete, the text file will contain a complete record of the design process used to reach the final design. The text file you submit may be quite lengthy and should show the entire process. Do not remove anything and do not just submit the final iteration. Below is a partial example of stepwise refinement (Note it is only a partial example and has nothing to do with the program for this assignment.):

main.cpp

#include

#include

#include

#include

#include

using namespace std;

void ReadWords(string words[], int numWords);

int main()

{

int numWords = 15;

string words[numWords];

return 0;

}

void Play(string words[], int numWords){

}

void ReadWords(string words[], int numWords){

ifstream infile;

infile.open("words.txt");

if(!infile)

cout<<"Could not open file"<

else{

for(int i=0; i

infile>>words[i];

}

infile.close();

}

void PressKeyToContinue(){

string x;

cout<<"Press any key to continue:";

cin>>x;

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Fatimah Syeda
Online Assignment Help
Financial Analyst
Instant Assignments
Best Coursework Help
Top Rated Expert
Writer Writer Name Offer Chat
Fatimah Syeda

ONLINE

Fatimah Syeda

I find your project quite stimulating and related to my profession. I can surely contribute you with your project.

$38 Chat With Writer
Online Assignment Help

ONLINE

Online Assignment Help

I find your project quite stimulating and related to my profession. I can surely contribute you with your project.

$45 Chat With Writer
Financial Analyst

ONLINE

Financial Analyst

I have worked on wide variety of research papers including; Analytical research paper, Argumentative research paper, Interpretative research, experimental research etc.

$37 Chat With Writer
Instant Assignments

ONLINE

Instant Assignments

After reading your project details, I feel myself as the best option for you to fulfill this project with 100 percent perfection.

$22 Chat With Writer
Best Coursework Help

ONLINE

Best Coursework Help

I am a professional and experienced writer and I have written research reports, proposals, essays, thesis and dissertations on a variety of topics.

$39 Chat With Writer
Top Rated Expert

ONLINE

Top Rated Expert

I have read your project description carefully and you will get plagiarism free writing according to your requirements. Thank You

$49 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Youtube snl three wise guys - Nr361 powerpoint - Hubspot inbound marketing and web 2.0 pdf - Constellation of gemini crossword clue - Riordan manufacturing virtual organization - The toyota way fieldbook - Friedrich nietzsche morality as anti nature - Customer segmentation and clustering using sas enterprise miner pdf - Strategic controls and financial controls - Implementation and monitoring process - How to use endnote x7 in word - Fred hollows fndt reg rosebery aus - Atom economy practice questions - Dialux ies file import - A greenfield venture may be too slow to establish a sizable presence when - Red black tree python - Fixed wireless access definition - Information Technology - Health Organization Evaluation - Hhmi virus explorer worksheet answer key - Swot analysis of private school - Barbs alterations pekin il hours - Advantages and disadvantages of financial budget - Cirque du soleil 2006 - 2014 hsc ext 1 - Which transition word correctly links the two sentences - Rachel bartov sean douglas wedding - Enron who went to jail - For each of the following pairs which bond would you expect to pay a higher interest rate - Oceanview marine company 22 18 - Tris ethylenediamine chromium iii sulfate - Round robin scheduling program in c using linked list - Setting up a barometer - How many miles is 2.8 km - 93 little hobart street glass castle - Advertising Aimed at Children and Teens - Forum: DQ5: Drug Legalization - History of translation theory susan bassnett summary - Discussion Post with 2 References - Toyota ls2 ad158 203 manual - Describe dashlocker's growth potential - Week 6 - 5 pebble pl commack ny 11725 - Ip flow top talkers command reference - Farzana shakil gulshan price list - In the lais of marie de france, guigemar is a knight who shows no interest in what activity? - Culture and values 8th edition pdf - Pharmacy signposting record sheet - Port canaveral shuttle for cruise ships p3f - Information Technology - 7 gardiner road clayton - P2147 fuel injector group 'a' supply voltage circuit low - C code style guide - Zara international case study answers - Skillpath seminars leadership development and teambuilding - Ka of acetic acid - Moving coil meter movement - +91:?/#9414601882 lOvE prOblEm sOlutiOn pandit ji dElhi - Peaceful End of Life Nursing Theory by Cornelia Ruland and Shirley Moore. - Squares square roots cubes and cube roots pdf - What are the components of a healing hospital - Pico questions related to emergency nursing - What is the difference of arithmetic and geometric sequence - Senior network engineer resume doc - Leadership essay - Java generics test questions - Hendrickson equalizing beam bushing replacement - WK 5 Assignment - Saprona sushi west linn menu - Mercantile credit co v garrod - Python coding - Four basic metaparadigm concepts in nursing - Quotes from the scarlet letter about hester accepting her sin - 2010 iom report on the future of nursing in healthcare - Themes in the giver - What is 100 factorial - Adelaide uni cover sheet - Ch3oc ch2och3 3 nmr spectrum - It - Informative essay foundation of army leadership - Which fact is not used to prove that pqr is similar to str? - How to predict lotto numbers - Dysthymic mood with congruent affect - Scope and sequence australian curriculum - Bryan and petersen display homes warrnambool - Protein bar market share - Connect chemistry online homework answers - Replacing wired thermostat with hive - Heliplane aircraft 18a gyroplane - Molar mass of cl2 - Order 2057098: Read Instructions - Vodafone in egypt case study answers - 12 types of tenses with examples and formula pdf - Philosophy - Liberty by julia alvarez full story - Thomas v thomas 1842 - Stepmother from snow white - How does novikov describe the united states - Sonya wise outback truckers - Viscously damped free vibration