国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫COM6471 a Wordle simulator  編程

時間:2023-12-26  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



 Foundations of object-oriented programming 
Assignment 2023 – a Wordle simulator  
 
This is the assignment for COM6**1 Foundations of Object Oriented Programming, 
The aim of this assignment is to test your ability to: 
●Write an object oriented program in Java that makes use of several different classes. 
●Write classes from a basic specification, which is vague in some details. 
Ensure that you read the entire assignment specification carefully before you begin. This is a challenging assignment, and you will need to allow some time to design your solution before you begin writing any code. 
Introduction 
This assignment requires you to build a Java program to simulate the popular game Wordle (see https://www.nytimes.com/games/wordle/index.html for details). In this game a 5-letter English word is chosen from a list, and the player must guess the word in six attempts or less. Following each guess, the player is told which characters in the guess are present in the chosen word, and which of these characters are in the right location. The player uses this information to deduce the chosen word. 
 
In this assignment, you will write a Java program to simulate Wordle that will run in one of two modes: 
1.Computer selects a word at random from a list that is stored in a text file, and the user has six attempts to guess the chosen word. 
2.User selects a word from a list that is stored in a text file, and the computer has six attempts to guess the chosen word. 
 
I have provided two Java classes, and your submission must use these classes, as well as others that are specified below. 
 
Unfair means 
We take the use of unfair means very seriously[]. This is an individual assignment. You must work on it alone and hand in your own code. You must not share code with other students, or submit work done by another student, or anyone else. 
You must not post this assignment to any website to seek assistance, and you must not use code downloaded from anywhere except the two classes I have made available on Blackboard. All submissions will be run through specialised software that detects similarity among Java programs, as well as similarity to online resources, and action will be taken in cases where unfair means are suspected. 
 
Task and requirements 
 
Overview 
The aim of this assignment is to write a Java program to simulate Wordle. Your code must include at least four classes: 
●WordleGame.java – This class is provided for you to download from Blackboard. You must use this code, and it should not be modified in any way. 
●BaseGame.java – An outline for this class is provided for you to download from Blackboard. You will need to populate the class with instance fields and methods. 
●UserGuesses.java and ComputerGuesses.java – These classes should extend BaseGame.java, and each should provide a run() method that provides a concrete implementation of the abstract run() method in BaseGame.java. 
Your program should compile with javac WordleGame.java, with java version 17 and should run when the user types java WordleGame. When it runs, your program will generate the following dialogue: 
 
A new game has been created 
Please select either (1) User guesses or (2) Computer guesses : 
 
User guesses game 
A game where the user guesses should then proceed as follows: 
 
Please select either (1) User guesses or (2) Computer guesses : 1 
Constructing a new game with user guesses 
The computer has selected a word, and you have 6 attempts to guess it. 
The computer will respond with: 
+ to denote a correct character in the right location. 
* to denote a correct character. 
X to denote an incorrect character. 
 
Attempt 1 of 6 
Available letters : abcdefghijklmnopqrstuvwxyz Please enter a word, 5 characters long : idler 
Checking -idler- is valid 
Word -idler- contains a-z only 
Word -idler- is valid 
Your guess : idler Response   : XX+*X 
 
Attempt 2 of 6 
Available letters : abc_efgh_jklmnopq_stuvwxyz 
Please enter a word, 5 characters long : uncle 
Checking -uncle- is valid 
Word -uncle- contains a-z only Word -uncle- is valid 
Your guess : uncle Response   : *XX*+ 
 
Attempt 3 of 6 
Available letters : ab efgh_jklm_opq_stuvwxyz  
Please enter a word, 5 characters long : 
 
And so on, until all 6 attempts have been used.
 
The first stage is for the computer to select a word, at random, from a list of 5-letter words that are read in from a text file. This text file must be stored in the same folder as the Java source code. You can use EasyReader to read the list. 
I have provided two text files for you to use. Each file has an integer on the first line, which gives the total number of words in the file. The file called FiveLetterWords.txt contains a list of 26 words, and is intended for you to use as you develop your code. Since the number of words is small, you will be able to check that your code is working correctly. 
 
The second file is called sgb-words.txt, and is a list of 5757 commonly used 5-letter words[ Available for download from https://www-cs-faculty.stanford.edu/~knuth/sgb.html  ]. Once you believe that your code is working correctly, your code should read in the words from this file instead. 
 
The final version your program that you submit should upload and store the words from sgb- words.txt, which must be located in the same folder as the Java code. Do not prefix the filename with a path such as C:\MyJava\Assignment. 
 
Each time the user enters a word, your program should check that it is a 5-letter word, and that it contains only alphabetic characters and hasn’t been tried before. If the word is too long, the user should try again: 
 
Please enter a word, 5 characters long : 24gerg 
Checking -24gerg- is valid 
Word -24gerg- is not the right length 
Word is not valid – try again 
Please enter a word, 5 characters long : 
 
In a similar way, if the word contains any incorrect characters, the user should try again: 
 
Please enter a word, 5 characters long : 12345 
Checking -12345- is valid 
Word -12345- contains incorrect characters, use a-z only 
Word is not valid - try again 
Please enter a word, 5 characters long : 
 
 
 
Similarly, if the word has been tried in previous attempt, your program should be able to tell in which attempt the word has been used (3/6 attempt below means the word never has been used in the third attempt) and ask the user should try a new word: 
 
Please enter a word, 5 characters long : never 
Checking -never- is valid 
Word -never- used in the 3/6 attempt, try another word 
Word is not valid - try again 
Please enter a word, 5 characters long : 
 
Following each attempt, your program should compare the selected word and the guessed word, and then produce a response that is composed of the three characters ‘+’, ‘*’, and ‘X’ indicating that the corresponding letters are in the correct location, present in the word, and not present in the word respectively. Your program should also be able to tell the repetition of letter(s) in the word. For example, if the correct answer is ‘never’, a response of ‘****X’ should be obtained for the guess ‘every’. This indicates there are two ‘e’s in the correct word. If the correct answer is ‘value’,  a response of ‘**XXX’ should be obtained for the guess ‘every’. This indicates only one ‘e’ in the correct word. A list of available letters should then be updated, replacing those letters that are not in the word with the underscore character ‘_’.  
 
At the end of the game, the user should be presented with a message that either congratulates the user for solving the puzzle, or explains that the maximum number of attempts has been exceeded and gives the correct answer: 
 
Attempt 6 of 6 
Available letters : ab_d_fghijk_m_opqrstuvwxyz Please enter a word, 5 characters long : uncle 
Checking -uncle- is valid 
Word -uncle- contains a-z only 
Word -uncle- is valid 
 
Your guess : uncle Response   : *XXXX 
You have not managed to guess the word this time. 
The correct answer was : fruit 
 
Computer guesses game 
If the user selects a game where the computer guesses, then the game should proceed as follows. 
 
Please select either (1) User guesses or (2) Computer guesses : 2   
Constructing a new game with Computer guesses 
Select a word by choosing a number between 0 and 25 : 6 
Attempt 1 of 6 
Guess is : kicks 
XXXXX 
 
Attempt 2 of 6 
Correct word : great, previous guess : kicks 
Total number of possible words is : 8 
Selecting a random word number : 5/8 
Guess is : tough 
*XX*X 
 
Attempt 3 of 6 
Correct word : great, previous guess : tough 
Total number of possible words is : 3 
Selecting a random word number : 3/3 
Guess is : never 
X*XX* 
 
Attempt 4 of 6 
Correct word : great, previous guess : never 
Total number of possible words is : 1 
Selecting a random word number : 1/1 
Guess is : great 
+++++ 
 
If the answer is guessed correctly within 6 attempts, the remaining attempts will be skipped. If the correct answer has not been reached, your program should continue until all 6 attempts have been used. 
 
First, the user should choose a word by selecting a number between zero and the number of words in the word list. In this example the word is chosen from the 26 words in the text file 
FiveLetterWords.txt, but your final submission should use the file sgb-words.txt so the word will be chosen from the 5757 words in this file. 
 
The computer should then guess a random word from the complete list for the first attempt only. For each subsequent attempt, the computer should construct a new list of words that do not contain characters that are identified by ‘X’ and not identified by ‘*’ or ‘+’, in the response to the previous guess. If you have followed the previous guideline to construct a new list of words that do not contain characters identified by ‘X’ without considering the ‘*’ and ‘+’ in the response to the previous guess, you will not lose any mark. You should decide on a suitable way to store each new list of words. A word will then be selected randomly from this list in the subsequent guess. 
 
General requirements and implementation notes 
●Your submission must conform to the specification below: 
oYour submission must use WordleGame.java, and you should add your own code to the template BaseGame.java. 
oYour submission must also include the required classes UserGuesses.java and 
ComputerGuesses.java 
oYour code must operate exactly as shown in the examples above. 
●Where there is no exact specification for the way the code should operate, you are free to choose a suitable approach. 
●You may ask questions about these requirements, but we cannot provide help with your 
assignment code, and will not check your code before submission. 
●Your code must compile from the command line, and should not be assigned to a package. 
●You can use any of the classes provided in the Java 17 API (https://docs.oracle.com/en/java/javase/17/docs/api/index.html)

●Although you are free to use more advanced Java features not covered in (e.g. the java Collections classes), it is not necessary to use them. 
●You must not use any other third party Java API or code library except for this package, and the classes provided. 
●Your code must read in a word list from the file sgb-words.txt, which must be stored in the same folder as the Java source code. 
You should write your code using a code editor. You should compile and run your code in the Command window prompt (Windows PC) or a terminal window (Mac or Linux), which is independent from the code editor.  Using an integrated development environment such as Eclipse or IntelliJ is not recommended because these tools are beyond the scope of this module. Using these tools will result in code that may not meet the general requirements listed above. 
 
Getting started 
As a first step you should write skeleton code for the UserGuesses and ComputerGuesses classes, which contains a constructor and a run() method, and uses System.out.println() to display where the focus of control is. 
The next step is to consider how each of the classes in the program relates to the other classes. This is best done on a sheet of paper. You should identify what each class needs to know, and what each class needs to do in order to deliver the requirements. 
You should also investigate if there are common behaviours and information that can be abstracted, and should consider if any additional classes are needed. You may decide that some variables can be defined as constants. Based on your analysis, you will be able to identify the instance fields and methods for each class. 
Code each class incrementally and use a test harness – either a separate test class with a main method, or a main method embedded in the class. 
Each time you make changes to the class, compile and test it. If it fails to compile, or runs incorrectly, then go back over your most recent changes and isolate the problem. 
 
Submission and deliverables 
Before you upload your code, check that it compiles on the command line using java. It is a good idea to check that it compiles and runs on one of the University computers. Check that your code is not part of a package. Do not submit archives (e.g. zip files) or .class files. 
 
Your code should then be submitted as a java files and uploaded to Blackboard using the upload tool 
Assessment 
Your code will be assessed for functionality and style. A mark of zero will be awarded for programs that do not compile; it is therefore important that you check that your code compiles on a University computer with Java 17 before you submit it, in case there are any issues with the configuration of your own computer. In particular, you should check that your code and comments do not contain any Chinese characters. 
Marks will be allocated as follows. 
Half of the marks (20/40) will be awarded for functionality and half (20/40) for design, testing, and style. There are many different ways to code the solution to this assignment. There is no single “correct” solution, and I fully expect a range of implementations to be submitted. However, some solutions are better than others because they are more concise, and more readable. 
Functionality will be assessed as follows: 
●Code compiles. If your code does not compile because it is incomplete or contains an error then you will be awarded a mark of zero. 
●The game is played correctly by the user : Computer selects random word from list stored in sgb-words.txt, user supplies up to 6 guesses, computer correctly identifies each character and returns the result (5 marks). 
●The game is played correctly by the computer : User selects random word from list stored in sgb-words.txt, computer generates an initial random guess, and then correctly generates a reduced list of words based on comparison between the random guess and the chosen word, computer then selects a word from this reduced list (10 marks). ● User input is validated correctly at each stage (5 marks).  
Design, testing and style will be assessed as follows: 
●Design. Each class in the design has clear responsibilities and collaborations with other classes, has an appropriate set of methods and instance fields, suitable access modifiers are used to preserve encapsulation, and abstraction is used to enable concise coding (5 marks). 
●Testing. Evidence of code used to test the behaviour of each class. This could be either a test harness for each class, or a separate test class (5 marks). 
●Style. Code is written with good style (10 marks). Code written in good style will have the following characteristics: 
oEach class will have a header comment, typically specifying the program name, the author, and the date. 
oOther comments will only be present where necessary to enable readability. 
oThe code is indented consistently throughout using four spaces and not tabs, so that the code in each method is easily identified. 
oVariables and methods have meaningful names (except for loop variables, which can be a single letter, e.g. for (int j = 0; j <= max; j++) ). Variables and methods should be in camelCase (e.g. gameType). 
oThere are sufficient lines of code to meet the requirements, and no extra, unreachable, or unnecessary code or comments. o See https://software.ac.uk/resources/guides/writing-readable-source-code for further details on how to write good quality readable code. 
 
 
請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:拼多多哪家莆田鞋店鋪好?推薦10個良心商家店鋪
  • 下一篇:代寫CSCU9B3、代做Python,Java編程
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美做暖暖视频| 国产精品一区二区久久久久| 欧美日韩一区二区视频在线观看| 亚州欧美日韩中文视频| 欧美日本亚洲视频| 国产亚洲黄色片| 亚洲免费av网| 一区二区三区四区欧美日韩| 亚洲a级在线播放观看| 欧美极品一区| 久久精品久久久久| 日韩美女在线观看| 久久国产精品99久久久久久丝袜| 亚洲精品乱码久久久久久蜜桃91| 日本午夜精品一区二区三区| 91久久久久久国产精品| 欧美精品激情在线观看| 国产主播在线看| 国产精品久在线观看| 欧美成人蜜桃| 国产精品国色综合久久| 黄黄视频在线观看| 国产精品视频导航| 人妻内射一区二区在线视频| 丝袜一区二区三区| 精品人妻人人做人人爽| 国产精品女主播视频| 一本色道久久综合亚洲精品婷婷| 日韩在线资源网| 欧洲精品在线播放| 国产精品偷伦免费视频观看的| 激情网站五月天| 欧美精品免费在线观看| 成人在线小视频| 亚洲a在线观看| 久久久久久久久综合| 欧美亚洲午夜视频在线观看| 久久精品电影一区二区| 欧美亚洲第一页| 国产精品第8页| www婷婷av久久久影片| 日韩一区不卡| 日韩视频永久免费观看| 国产又黄又爽免费视频| 一级日韩一区在线观看| 久久艹中文字幕| 精品一区二区三区无码视频| 在线视频不卡一区二区| 国产精品777| 热久久视久久精品18亚洲精品| 国产精品我不卡| 国产精品一区二区电影| 日本精品视频在线观看| 久久精品福利视频| 国产精品一区二区免费| 日本免费在线精品| 久久亚洲精品成人| 国产精品96久久久久久| 欧美亚洲国产精品| 欧美精品一区在线发布| 国产精品九九九| 91免费在线视频| 欧美尤物巨大精品爽| 免费不卡欧美自拍视频| 久久国产精品久久久久| 久久精品国产96久久久香蕉| 精品国产乱码久久久久久88av | 成人国产在线看| 高清欧美精品xxxxx| 操人视频在线观看欧美| 黄色av网址在线播放| 成人久久一区二区| 国产成人精品福利一区二区三区| 国产欧美一区二区三区视频| 81精品国产乱码久久久久久| 欧美精品在欧美一区二区| 久久久久久12| 日韩视频亚洲视频| 97精品国产97久久久久久粉红 | 成人久久一区二区| 欧美日韩精品一区| 亚洲欧美日韩不卡| 久久电影一区二区| 久久精品99久久| 91免费人成网站在线观看18| 国产一区二区在线免费| 日韩精品福利片午夜免费观看| 亚洲视频精品一区| 国产精品国产三级国产aⅴ9色 | 日韩免费在线播放| 国产精品69久久| 蜜臀精品一区二区| 日本在线视频www色| 欧美激情第1页| 国产精品免费看久久久无码| 日韩视频在线观看免费| 久久精品女人的天堂av| 不卡一区二区三区视频| 久久久免费av| 国产精品影院在线观看| 亚洲欧美日韩精品在线| 97人人爽人人喊人人模波多| 欧美一区二区视频17c| 国产成人久久久| 分分操这里只有精品| 天天爽天天狠久久久| 国产成人精品免费久久久久 | 日韩尤物视频| 国产精品免费观看久久| 久久这里只有精品18| 99视频日韩| 国产精品一区二区三区在线播放| 蜜桃传媒视频第一区入口在线看 | 国产精品一 二 三| 国产中文字幕91| 国内精品久久国产| 欧美日韩精品中文字幕一区二区| 日韩欧美一区二| 日韩少妇中文字幕| 日韩精品福利片午夜免费观看| 性欧美大战久久久久久久| 亚洲精品中文综合第一页| 亚洲一区二三| 午夜老司机精品| 无码内射中文字幕岛国片| 亚洲成人第一| 无码人妻aⅴ一区二区三区日本| 亚洲精品乱码久久久久久自慰| 亚洲v日韩v综合v精品v| chinese少妇国语对白| 欧美一区二区中文字幕| 国产精品中文字幕在线| 精品国产美女在线| 国产成人短视频| 日韩精品一区二区三区外面| 亚洲影院色在线观看免费| 一区二区冒白浆视频| 亚洲中文字幕无码不卡电影 | 欧美日韩视频免费在线观看| 黄色a级在线观看| 国产色一区二区三区| 国产一区二区三区黄| 分分操这里只有精品| 国产精品9999久久久久仙踪林| 91成人免费观看网站| 久久久噜噜噜久久| 久久久国产精品一区| 国产精品久久久久久久久久久久久 | 成人免费aaa| 国产精品91久久久久久| 日韩在线免费视频| 国产精品黄页免费高清在线观看 | 欧美激情视频网站| 亚洲一区三区电影在线观看| 日韩av免费看| 欧美在线视频免费| 国模吧无码一区二区三区| 国产精品自拍小视频| 国产经典久久久| 国产精品入口福利| 一区二区日本伦理| 日韩国产小视频| 国产在线精品一区二区三区》| 99国产在线| 精品国产网站地址| 一区二区三区四区不卡| 日韩av免费看| 国产在线精品自拍| 国产成人一区二| 精品国产乱码久久久久久丨区2区| 日韩一区不卡| 国内揄拍国内精品少妇国语| 高清欧美性猛交| 日韩中文在线视频| 亚洲一二三区在线| 欧洲成人免费视频| 国产精品一区而去| 国产成人无码a区在线观看视频| 久99久在线视频| 日韩欧美在线电影| 国产精品永久入口久久久| 久久人人爽人人爽人人av| 久久久精品在线视频| 久久的精品视频| 日本精品一区二区三区四区 | 国产精品一区二区免费| 国产不卡视频在线| 久99九色视频在线观看| 欧美一级片免费播放| 国产日产欧美精品| 色噜噜狠狠狠综合曰曰曰| 亚洲熟妇无码另类久久久| 黄色免费高清视频| 国产成人97精品免费看片| 久久成人av网站| 欧美自拍视频在线| 久久久女女女女999久久| 欧美人与性动交a欧美精品| 欧美一区在线直播| 国产高清在线一区二区|