Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with my Gussing game(letter guss) program remark :Using arrays the first page with the number (page 3) is the program i need

image text in transcribed

image text in transcribed

image text in transcribed

please help me with my Gussing game(letter guss) program remark :Using arrays

the first page with the number (page 3) is the program i need help with so please help me with it

the next 2 page are only notes for exception handleing and other note to help with making a good code i think

(in C programming language and Unix )

please help

thanks:)

Guessing Game The user will be given a main menu of the following . Subscribe . Sign in .Exit The details are the following: .Subscribe: First, the player has to create an account for himself. He will be prompted to enter a login name (Exactly 5 alphabets) and a password (more than 4 numeric digits). The login name should not have been used by another player Login: The player has to sign in by entering his login and his password. If the password is wrong, he will be given two more password trials. If the player failed to recall the passwor the program gives a proper message and returns to the main menu. Also, the game may login with the login "admin" and his password. Based on the login the appropriate submenu will be given. Show score Guess a word . Logout The details are the following: Show score: A list of total counts of wins, loses, and draws of the player Guess a word: It consists of two rounds: o Round 1: The player will be asked to guess a word of 3 letters. He will be given three trials for three letters. Then he inputs the word. If the word was correct, he won the round. Round 2: The player will pick a word of three letters for his opponent. Similarly, the opponent will be given three trials. If the opponent guessed word correctly, he won the round At the end: The score will be a: . . . o o Win: for the player who won both rounds. Loss: for the player who lost both rounds. Draw: When the player wins in either rounds. Logout: It displays the player new total score for this login. If he made a higher wins than the previous login he should get a proper congratulation message. Finally, logs the player out to the main menu. Admin Menu: . Activate player . Show score statistics . Logout The details are the following: . Activate user: A list of newly subscribed users will be displayed, and the admin chooses which one to activate. Show score statisties: A list will be displayed of all players' logins and their scores. Logout: The admin logs out to the main menu. 3 Page Good Documentation Comments should not describe what the code does, but why; what the code does should be s evident. Put Comments in the following cases . Each file: elf a Put your group names and IDs o Put a comment describing the purpose of the file and how it fits in to the larger project . Each function: Describe the purpose of the function (in a sentence or two), the function's arguments an return value, any error cases that are relevant to the caller, any pertinent side effects, arn any assumptions that the function makes. Large blocks of code: Put a comment at the top to help the reader know what to expect as they're reading it Tricky bits of code: Describe what it does with a comment. In particular, pointer arithmetic is something that often deserves a clarifying comment. Good Use of Whitespace Proper use of whitespace can greatly increase the readability of code. Every time you open a block of code (a function, "if" statement, "for" or "while" loop, etc.), you should indent one additional level You are free to use your own indent style, but you must be consistent Good Variable Names The variable and function names should generally make it clear what you are doing. Variable names should be descriptive of the value stored in them. Local variables whose purpose is self-evident (e.g loop counters or array indices) can be single letters. Parameters can be one (well-chosen) word Global variables should probably be two or more words Multiple-word variables should be formatted consistently, both within and across variables. For example, "hashtable_array_size" or "hashtableArraySize" are both okay, but "hashtable arraySize" is not. And if you were to use hashtable_array_size" in one place, using "hashtableArray" somewhere else would not be okay Line Length While there are many different standards for line length, we require that your lines be no longer than 80 characters, so we can easily view and print your code Magic Numbers Magic numbers are numbers in your code that have more meaning than simply their own values. For example, if you are reading data into a buffer by doing "fgets(stdin, buf, 256)" 256 is a "magic number because it represents the length of your buffer. On the other hand, if you were counting by even numbers by doing "for (int i-o;

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

Step: 3

blur-text-image

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

4. Give partial credit for partially correct answers.

Answered: 1 week ago