Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

T-Mobile LTE 2:58 PM 75%- + Dua Project 2.pdf General Requirements for project 2 . Rewrite the program from projoct I using at least four

image text in transcribed
image text in transcribed
T-Mobile LTE 2:58 PM 75%- + Dua Project 2.pdf General Requirements for project 2 . Rewrite the program from projoct I using at least four programmer-definod functions other than the main function All functions (escept the main function) will be defined as follows o The function prototype appears before the main o Comment describing what the functson does appers directly under function pelotype o Formal variable names are not used in any prototype o The functions definition appears a after the main The first function's mame is introduction, which will peint (show on the screcn) Welcome to the Letter Guessing Game You will enter the number of games you want toplay(s-4 games) You have schances to guess each letter Let'sbegin The seoond function's name is getNumberOiiame, which asks the user about the number of games to be played and returns the value. This function will validate the user input to make sure it is in the dsired ran(-4) inclusive, if the valu is out of range the user is notifiod and askod again . How many games do you want toplay (4)3 The third function's name is compareTwoCharacters, which receives two parameters of type character (eg the character to be guessed in that game and the character typed by the user). This functioes rcturn 0 if the two characters are the same, returns 2 if the first parameter comes aher the second parameter, otherwise it returns -2 The fourth function's name is playOncGame, which receives one parameter of type character (the character to be guessed in that game). This function returns true if the user won otherwise will return false. This function will handle all tasks to play one game (ask the wser to mtcr their guess, provide up to 5 chances l, guess, provide a hin", the-ser, etc). This fanction gomg to call the third function (Le. compare TwoCharacters) to decide if the user has guessed the cormect answer or to peovide a hint to the user .Make sure to follow the instructions carefully including wsing the esact function names with the exact leter cases (upper and lower case letters). Your programs are poing to be tedod using a unified main function that is developed foe that purpose. lf the unified main function does not compile tdhis indicales inconsistencies in meeting the above requirements and will result in a ero grade

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions