
” 辅导ECE 175程序语言、 写作Programming编程ECE 175: Computer Programming for Engineering ApplicationsFinal Project: Word ScrambleDue Date: Monday December 7, 2020 at 4.00 pm, via D2L dropboxAll due date: Group sign up – Tuesday November 24, 2020 by 11.59 pmMid-project – Tuesday November 24, 2020 at 11.59 pmFinal project – Monday December 7, 2020 at 4.00 pmAdministrative details:1.1Group: You can work on this final project by yourself or you can work in a group of(maximum) two Students. If you choose to work as a group, use collaborative tools tofacilitate the project Development, such as google doc, github, zoom, etc.Sign up your team for the final project here: ECE 175 Final project Group sign upThe team/group must be signed-up before 11.59 pm on November 24, 2020. Sign upeven if you will work by yourself.No team/group can be formed after this date (unless it is approved by an instructor).1.2Intermediate Code and Design SubmissionTo keep track of your progress, an intermediate code submission is required. Thedeadline for the intermediate code submission on D2L is Tuesday November 24, 2020 at11.59 pm. Late submission policy: 20% deduction per day.Submit:1. A high-level design of your code. Use any format that makes sense to your team, e.g.,a flowchart with all your functions and how the game proceeds, pseudo-code, etc.2. An initial code implementation, with- a linked list of all words read from the text file (use WordSet2.txt whendeveloping the code. After working, test your code with WordSet5.txt)- a print_list function used to print the entire list.3. A skeleton of the remaining of the code containing all the function prototypes andcomments on the input/output of the functions and their intent.1.3 Final Code Submission: The project is due on Monday December 7, 2020 at 4.00 pm.Both team members must submit the code in the designated Dropbox on D2L.Late submission policy: 20% deduction per day.The last date of final project submission is by 4.00 PM on Wednesday December 9, 2020.After this date/time, the final project will NOT be accepted/graded.1.4Academic Integrity Policy: Each team is expected to submit its own code. You may askothers for advice and/or discuss the project in general. However, you/your group MUSTWRITE YOUR OWN CODE.If any part of the code submitted by different students or groups of students isidentical, ALL involved parties will receive zero credit on the entire project and one letterreduction in their final grade. This policy will be very aggressively enforced. ALLsubmitted code Will be checked with a plagiarism detection tool( https://theory.stanford.edu/~aiken/moss/).21.5 Suggestionsa) Spend time designing your code and use modular programming. Create all functionprototypes and describe what they do before developing your code. Create pseudocodeof your program flow.b) Determine test cases for your functions and your overall code to ensure properfunctionality.c) Try to reuse code from the lectures. The node addition code and node deletion functionare particularly useful.d) Write well-documented codeProject description Word ScrambleWord scramble is a word game where you are given a set of letters and you rearrange theletters to create original words. For example, giveni a n m c aoriginal 6-letter words that can be created are maniac, caimanoriginal 5-letter words are amain, amnia, amnic, anima, mania, manicoriginal 4-letter words are acai, amia, amin, cain, cami, main, mana, mica, minaThere are also original 3-letter words and 2-letter words that can be generated. However, inour game, we will use words starting from 4 letters and up.Project requirements: Write an interactive C program for Word Scramble with the followingrequirements:0 point for the final project score if linked list is NOT used in your Cprogram for This projectThe grading rubric that we will use to grade your project is on Pages 4-6 of this handout2.1 Start with using a rand ( ) function to generate a number between 0 9 in order to pick a textfile to use. There are 10 text files, called WordSet0, WordSet1, , WordSet9, given for your WordScramble game. Make sure that your program works for all 10 text files.2.2 Use the words given in the text file(s) to create a linked list of all original words. Use thefollowing structure for each nodetypedef struct node_s {char word[15];int point; //points assigned for each wordstruct node_s *next;} wordnode;Note: you cannot remove any existing members. You may modify the first two members or addmore members.2.3 Display a scrambled version of letters that can be used2.4 Display number of original words that have not been guessed32.5 Display at most 5 clues to help the players. One vowel should be displayed in each clue.Display the clue from the first word (node), the second word (node) and the last 3 words (nodes)in the linked list2.6 Display correctly guessed words and wrongly guessed words2.7 Display Total points that the players have gotten. The players earn points when they guesswords correctly.2.8 Display number of correct guesses and wrong guesses.2.9 Let a user guess one word.- Since our game starts from 4 letters and up, your program will continue asking if the playersenter a word that has fewer than 4 letters.- If the players guess correctly, your program MUST remove that node from the linked list(that you create in 2.2) and add the word into the correct guess list- If the players guess incorrectly, add the word into the wrong guess list- If the players guess the same word (correct or incorrect), your program will let a user knowand it will not be counted as a new guess.2.10 Ask whether the players want to continue (q/Q to quit)If the players want to continue, you will ask whether they want to scramble the letters(y/Y for yes). If yes, the letters should be scrambled. Then Repeat step 2.3 2.10If the players quit, print number of words that have not been guessed and all words thathave not been guessed.2.11 If the players guess all words correctly, display Congratulations and total points won.Optional Features for Extra Credit (EC)Note: Each optional feature must be correctly and fully functional in your code in order to get theextra credit for that part. No partial credit will be given for somewhat functioning feature(s). EC1 (3 points) Graphic: use graphic such as one in homework 8 to display scrambled letters. EC2 (2 points) When the player guesses a word, your program keeps askinga) if the player enters a word containing letters that are not used in the game andb) if the player enters a word containing fewer letters than 4 or more letters than maximumnumber of letters given for the game.For example, given i a n m c a, there are 6 letters. If the player enters name, yourprogram will continue asking for the next word since e is not is the set of letters which are i an m c a. If the Player enters mancaina, your program will continue asking since it contains 8letters which are more than 6 letters. EC3 (7 points) use a linked list to keep the list of correctly guessed words and another linkedlist to keep the list of wrongly guessed words.4Final project grading rubricAs stated in this handout, 0 point if the linked list is not used in your C program of the final projectCategory MaximumpointsExcellent(100%)Good(70%)Marginal(20%)Unacceptable(0%)Mid-project (see firstpage for requirementsand due date)10Text file 5 Successfully use rand( ) torandomly choose the text file tobe opened to read. Use fopen andfclose correctlyNo rand( ) used hardcodethe text file name. Use fopenand fclose correctlyNot available Noimplementationor not workingCreate a linked list ofwords from the textfile10 The linked list is successfullycreated. The list is correctlypopulated with words in the textfile and can be traversed. Allwords from the text file arepresent as nodes in the listThe linked list isimplemented butincomplete. Not all wordsare Present, or the listcannot be traversedSome code skeleton thatthe list is attempted butthe code is not compiledNoimplementationScrambled versionof letters4 The letters can be properlyscrambledThe letters are somewhatscrambledSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationDisplay number ofwords that have notbeen Guessed2 The number of have-not-beenguessedwords are correctlydetermined and displayed aftereach user (correct) guessThere is some miscount innumber of words or it iswrong Since the game startsSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationDisplay at most 5clues (first two andlast 3 nodes of thelinked list)10 The link can be traversed inorder to use the first two nodesand the last 3 nodes of the list asthe clues. One vowel in eachword is displayed. If the word inthe clue is removed due tocorrect guess, the next word(node) in the list can be properlyused as a clue. Properly displaywhen fewer than 5 clues leftSome functionalities aremissing or not working suchas using the first 5 nodes inthe list (instead of first twoand last 3), clues displayedbut no vowel (or first letteris displayed instead), notproperly working (codebreaks) if fewer than 5 cluesare leftSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementation5Display correctlyguessed words andincorrectly guessedwords5 The code can correctly displaythe correct-guessed words andthe wrong-guessed wordsSome Functionalities aremissing or not working suchas only correct or wrongguesses is displayedSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationFind and Display totalpoints3 The total points are determinedand displayed correctly.There are somemiscalculations, or the codecannot get the point fromeach nodeSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationDisplay number ofcorrect and wrongguess3 The number of correct andwrong guesses are correctlydetermined and displayed aftereach User guessThere are some miscountsin number of guessesSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationLet a user guess 4-letter words and up2 The code lets a user enter a wordand checks the length of thewords and continues asking untila user enters a word with at least4 lettersThe code lets a user enter aword with any lengthSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationRemoving the nodefrom the list, ifcorrectly guessed10 The node is properly removedfrom the list when the playersguess the word correctly. The listis still intact after a noderemoval. free() is usedSome functionalities aremissing or not working suchas the list is broken afterthe node is removed,free() is not usedSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationAdd a word into thecorrect or wrong guess(array(s) are used)3 The code can correctly add aword into the correct guess orthe wrong guessSome functionalities aremissing or not workingSome code skeleton thatAttempts to do this partbut unsuccessfulNoimplementationLet a user know thatthe word has alreadybeen guessed when itoccurs (not counting asa new guess)4 The code can determine that theword that a user just enters isalready in the correct or wrongguessSome functionalities aremissing or not workingSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationAsk whether a userwants to continue (q/Qto quit)2 The code successfully lets a userenter a letter and can quit orcontinueOnly lowercase q oruppercase Q is used to quitNot Available Noimplementationor not workingAsk whether a userwants to scramble theword (y/Y for yes)2 The code successfully lets a userenter a letter and can decide thatthe letters should be scrambledOnly lowercase y oruppercase Y is used for yesNot available Noimplementationor not working6When quit, printnumber of words andwords that have notbeen Guessed5 Correct number of words isprinted, and all have-not-beenguessedwords are correctlydisplayed (this show that the listis not broken)Some functionalities aremissing or not working suchas incorrect number ofhave-not-been-guessedwords is displayed or thecode breaks since the link isbroken and all have-notbeen-guessedwords cannotbe printed.Some code skeleton thatattempts to do this partbut unsuccessfulNoimplementationIf all words are guessedcorrectly, congrats andtotal points3 The code can successfully endthe game when a user correctlyguesses all words and print thecorrect total pointsSome functionalities aremissing or not working suchas the game does not endeven Though all words arecorrectly guessed or wrongtotal pointsSome code skeleton thatattempts to this part butunsuccessfulNoimplementationFree all the list(s)used before endingthe program2 It has C statements or a functionthat properly delete all nodes inthe list before the program ends.Some functionalities aremissing or not workingSome code skeleton thatattempts to do this partbut unsuccessfulNoimplementationProgram DesignCode modularity 5 The code is logically divided toseveral functions that implementimportant FunctionalityThe code is modular butfurther simplification couldhave been doneAll Statementsare written inmain functionCode documentation 2 Comments are used throughoutthe code. The input/output andgoal of every function isadequately described.The code is partiallydocumentedThe code is scarcelydocumentedNo commentwritten in thecodeCompilation 8 Code successfully compileswithout syntax errors. The codedoes not hang while inexecutionThe code successfullycompiles, but someconditions make it hangwhile running (-5 pts)NoimplementationTotal 100Extra credits Excellent (100%) No partial credit (all or nothing)Graphic 3 See Extra credit section of this handout for detailsUser inputs prevention 2 See Extra credit section of this handout for detailsLinked list for correctlyguessed words andwrongly guessed words7 See Extra credit section of this handout for details7Sample Code execution 1: Bold information entered by a user. Information after // is used toexplain how the game works.use WordSet2.txtLets play Word Scramble— — — — — —i d p u t n— — — — — —There are 10 words that you can guess5 clues to help you guess_ u _ _ _ __ _ _ u __ _ u __ u _ _u _ _ _Correct Guess Wrong GuessYou now have 0 pointswith 0 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): putType your guess (between 4 and 6 letters): dipType your guess (between 4 and 6 letters): itType your guess (between 4 and 6 letters): puntCongrats, Match foundContinue playing (Q/q to Quit)? yWant to scramble letters (Y/y for Yes)? Y— — — — — —n t p u d i //observe that the letters are not in the same order when the game starts— — — — — —There are 9 words that you can guess //observe that 9 (not 10) words since one word was correctly guessed5 clues to help you guess_ u _ _ _ __ _ _ u __ i _ __ _ _ i //this is changed from previous since punt which is the second node from the last node was correctly guessedu _ _ _Correct Guess Wrong Guesspunt //punt Shows up under Correct guess, No word under Wrong GuessYou now have 10 points //the player gets 10 points from correctly guess word puntwith 1 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): duiptSorry, Match not foundContinue playing (Q/q to Quit)? uWant to scramble letters (Y/y for Yes)? A— — — — — —n t p u d i— — — — — —There are 9 words that you can guess85 clues to help you guess_ u _ _ _ __ _ _ u __ i _ __ _ _ iu _ _ _Correct Guess Wrong Guesspunt duipt //punt shows up under Correct guess, duipt shows up under Wrong GuessYou now have 10 points //still 10 points since the last guess was wrongwith 1 correct guesses and 1 wrong guesses //one correct guess from punt, one wrong guess from duiptType your guess (between 4 and 6 letters): punditCongrats, Match foundContinue playing (Q/q to Quit)? tWant to scramble letters (Y/y for Yes)? y— — — — — —t n u i d p //observe that the letters are not in the same order as the last round— — — — — —There are 8 words that you can guess //observe that 8 words since two words were correctly guessed5 clues to help you guessi _ _ _ _ //observe that this clue changes from before since pundit used for the first clue was correctly guessed_ i _ __ i _ __ _ _ iu _ _ _Correct Guess Wrong Guesspunt duiptpunditYou now have 60 points //the player now gets 60 points from correctly guess words punt and punditwith 2 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): puntpunt is already correctly guessed //punt is already guessed (see Correct Guess)Continue Playing (Q/q to Quit)? gWant to scramble letters (Y/y for Yes)? H— — — — — —t n u i d p— — — — — —There are 8 words that you can guess5 clues to help you guessi _ _ _ __ i _ __ i _ __ _ _ iu _ _ _Correct Guess Wrong Guesspunt duiptpunditYou now have 60 points9with 2 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): tendSorry, Match not foundContinue playing (Q/q to Quit)? yWant to scramble letters (Y/y for Yes)? k— — — — — —t n u i d p— — — — — —There are 8 words that you can guess5 clues to help you guessi _ _ _ __ i _ __ i _ __ _ _ iu _ _ _Correct Guess Wrong Guesspunt duiptpundit tendYou now have 60 pointswith 2 correct guesses and 2 wrong guessesType your guess (between 4 and 6 letters): duiptduipt is already incorrectly guessed //duipt is already guessed (see Wrong Guess)Continue playing (Q/q to Quit)? uWant to scramble letters (Y/y for Yes)? n— — — — — —t n u i d p— — — — — —There are 8 words that you can guess5 clues to help you guessi _ _ _ __ i _ __ i _ __ _ _ iu _ _ _Type your guess (between 4 and 6 letters): duntCongrats, Match foundContinue playing (Q/q to Quit)? Q7 Words That you have not guessed //number of have-not-been-guessed words is displayedinput dint dipt duit pint ptui unit //the have-not-been-guessed words are displayedGood Bye10Sample code execution 2: Bold information entered by a user. Information after // is used to explain how thegame works.use WordSet5.txtLets play Word Scramble— — — — — — — — — — — —r o d o a c i s u n q t— — — — — — — — — — — —There are 948 words that you can guess //this is a linked list of 948 nodes5 clues to help you guess_ o _ _ _ _ _ _ _ _ _ __ _ _ _ _ o _ _ _u _ _ __ _ _ au _ _ _Correct Guess Wrong GuessYou now have 0 pointswith 0 correct guesses and 0 wrong guessesType your guess (between 4 and 12 letters): acrodontsCongrats, Match foundContinue Playing (Q/q to Quit)? rWant to scramble letters (Y/y for Yes)? Y— — — — — — — — — — — —n a c r d o s q o u i t— — — — — — — — — — — —There are 947 words that you can guess5 clues to help you guess_ o _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ u _ //observe that this clue changes since acrodonts (second node in the original list) was correctly guessedu _ _ __ _ _ au _ _ _Correct Guess Wrong GuessacrodontsYou now have 90 pointswith 1 correct guesses and 0 wrong guessesType your guess (between 4 and 12 letters): unitCongrats, Match foundContinue playing (Q/q to Quit)? YWant to scramble letters (Y/y for Yes)? Y— — — — — — — — — — — —u t o a r q c i s d n o— — — — — — — — — — — —There are 946 words that you can guess5 clues to help you guess_ o _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ u _11u _ _ __ _ _ au _ _ _Correct Guess Wrong GuessacrodontsunitYou now have 100 pointswith 2 correct guesses and 0 wrong guessesType your guess (between 4 and 12 letters): taorSorry, Match not foundContinue playing (Q/q to Quit)? Q946 Words that you have not guessed //I print only first 100 words but your program can print all of themconquistador Atrocious autocoids consortia courantos curations custodian durations inductors quadroonssonicator suctorian tandooris acrodont asconoid auctions auditors autocoid candours canorouscantoris cardoons carotids carotins cartoons cautions conduits contours coquinas coquitoscorantos cornutos cortinas couranto courants crostino croutons curation curtains diatronsdinosaur discount donators duration inductor intrados noctuids noctuoid odorants orationsostracod ostracon outscorn quadrics quadroon quantics quartics quintars rainouts rotundasructions sardonic squadron sudation tandoori tandoors tornadic tornados touracos unitardsacinous acquits actions aroints asquint astound atonics auction auditor candorscandour cantors Sardios cardons cardoon carious carotid carotin cartons cartooncations caution cistron citrons citrous conatus condors conduit conoids consortGood ByeSample code execution 3 (show the test case when the player guesses all wordscorrectly): Bold information entered by a user. Information after // is used to explain how thegame works.use WordSet4.txtLets play Word Scramble— — — — — —m n a a c i— — — — — —There are 17 words that you can guess5 clues to help you guess_ a _ _ _ __ _ _ _ a __ a _ __ _ _ a_ i _ _Correct Guess Wrong GuessYou now have 0 pointswith 0 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): caimanCongrats, Match foundContinue playing (Q/q to Quit)? rWant to scramble letters (Y/y for Yes)? Y12— — — — — —a c n i m a— — — — — —There are 16 words that you can guess5 clues to help you guess_ a _ _ _ __ _ _ i __ a _ __ _ _ a_ i _ _Correct Guess Wrong GuesscaimanYou now have 50 pointswith 1 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): manaCongrats, Match foundContinue playing (Q/q to Quit)? rWant to scramble letters (Y/y for Yes)? Y— — — — — —a n i m c a— — — — — —There are 15 words that you can guess5 clues to help you guess_ a _ _ _ __ _ _ i __ a _ __ _ _ a_ i _ _Correct Guess Wrong GuesscaimanmanaYou now have 60 pointswith 2 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): maniacCongrats, Match foundContinue playing (Q/q to Quit)? YWant to scramble letters (Y/y for Yes)? Y— — — — — —c m n a a i— — — — — —There are 14 words that you can guess5 clues to help you guessa _ _ _ _ //observe this clue changes since both maniac and caiman have been correctly guessed_ _ _ _ a_ a _ __ _ _ a_ i _ _13Correct Guess Wrong GuesscaimanmanamaniacYou now have 110 pointswith 3 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): minaCongrats, Match foundContinue playing (Q/q to Quit)?dWant to scramble letters (Y/y for Yes)?y— — — — — —c a n a i m— — —— — —There are 13 words that you can guess5 clues to help you guessa _ _ _ __ _ _ _ a_ a _ __ _ i __ i _ _Correct Guess Wrong GuesscaimanmanamaniacminaYou now have 120 pointswith 4 correct guesses and 0 wrong guessesType your guess (between 4 and 6 letters): namType your guess (between 4 and 6 letters): namaSorry, Match not foundContinue playing (Q/q to Quit)?kWant to scramble letters (Y/y for Yes)?Y— — — — — —a c m a i n— — — — — —There are 13 words that you can guess5 clues to help you guessa _ _ _ __ _ _ _ a_ a _ __ _ _ i_ a _ _Correct Guess Wrong Guesscaiman namamanamaniacminaYou now have 120 points14with 4 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): manamana is already correctly guessedContinue playing (Q/q to Quit)?uWant to scramble letters (Y/y for Yes)?Y— — — — — —c m i a n a— — — — — —There are 13 words that you can guess5 clues to help you guessa _ _ _ __ _ _ _ a_ a _ __ _ _ i_ a _ _Correct Guess Wrong Guesscaiman namamanamaniacminaYou now have 120 pointswith 4 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): micaCongrats, Match foundContinue playing (Q/q to Quit)?gWant to scramble letters (Y/y for Yes)?Y— — — — — —a i m c n a— — — — — —There are 12 words that you can guess5 clues to help you guessa _ _ _ __ _ _ _ a_ a _ __ _ _ i_ a __Correct Guess Wrong Guesscaiman namamanamaniacminamicaYou now have 130 pointswith 5 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): maniacmaniac is already correctly guessedContinue playing (Q/q to Quit)?uWant to scramble letters (Y/y for Yes)?t15— — — — — —a i m c n a— — — — — —There are 12 words that you can guess5 clues to help you guessa _ _ _ __ _ _ _ a_ a _ __ _ _ i_ a __Correct Guess Wrong Guesscaiman namamanamaniacminamicaYou now have 130 pointswith 5 correct guesses and 1 wrong guessesType your guess (between 4 and 6 letters): amainCongrats, Match foundContinue playing (Q/q to Quit)?yWant to scramble letters (Y/y for Yes)?Y— — — — — —c i n a a m— — — — — —There are 11 words that you can guess\r”
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。






