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

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫(xiě)COM6471、代做 java 語(yǔ)言編程

時(shí)間:2023-12-11  來(lái)源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯(cuò)



COM6**1 – Foundations of object-oriented programming Assignment 2023 – a Wordle simulator
This is the assignment for COM6**1 Foundations of Object Oriented Programming, and it is worth 40% of your final module mark. The deadline for submission is 15.00 on Friday 15 December.
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 seriously1. 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.
1 https://sites.google.com/sheffield.ac.uk/compgtstudenthandbook/home/your-study/referencing-unfair-means
   1

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
2

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 words2. 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 :
2 Available for download from https://www-cs-faculty.stanford.edu/~knuth/sgb.html
  3

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
4

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 identified by ‘X’ in the response to the previous guess. 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:
o Your submission must use WordleGame.java, and you should add your own code to
the template BaseGame.java.
o Your submission must also include the required classes UserGuesses.java and
ComputerGuesses.java
o Your 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.
5

● 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 COM6**1 (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 the sheffield 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 before the deadline of 15.00 on Friday 15 December.
Assessment
Your code will be assessed for functionality and style. A mark of zero will be awarded for programs that
6
 
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:
o Each class will have a header comment, typically specifying the program name, the author, and the date.
o Other comments will only be present where necessary to enable readability.
o The code is indented consistently throughout using four spaces and not tabs, so that the code in each method is easily identified.
o Variables 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).
o There are sufficient lines of code to meet the requirements, and no extra, unreachable, or unnecessary code or comments.
請(qǐng)加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:COMP5930M 代做、代寫(xiě) c++,java 程序語(yǔ)言
  • 下一篇:代做553.688 Computing for Applied 程序
  • 無(wú)相關(guān)信息
    合肥生活資訊

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

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    高清一区二区三区视频| 精品人妻一区二区三区四区在线| 日韩av在线一区二区三区| 国产精品一区=区| 久久综合五月天| 欧日韩免费视频| 久久久福利视频| 性欧美大战久久久久久久| 99免费在线视频观看| 久久99热精品这里久久精品| 蜜桃麻豆91| 国产精品海角社区在线观看| 免费国产在线精品一区二区三区| 日韩一区二区av| 日本人妻伦在线中文字幕| 国产精品91在线观看| 亚洲国产婷婷香蕉久久久久久99| av在线观看地址| 亚洲最大福利网| 99久久免费观看| 亚洲高清123| 久久免费视频观看| 日韩精品最新在线观看| 日韩在线免费av| 精品日本一区二区三区| 国产精品电影网| 国产一区一区三区| 精品国产乱码一区二区三区四区| 国产一区二区三区黄| 国产精品大陆在线观看| 国产日产欧美精品| 中文字幕一区二区三区精彩视频| 成人av播放| 一区二区三区不卡在线| 99久re热视频这里只有精品6| 亚洲一区亚洲二区| 91精品国产乱码久久久久久久久| 亚洲欧洲国产日韩精品| 久久久免费看| 日韩免费在线播放| 国产精品久久久久久久久久尿| 精品一区在线播放| 色在人av网站天堂精品| 99久久精品久久久久久ai换脸 | 中文字幕色一区二区| 免费一级特黄毛片| 一本一道久久久a久久久精品91| 91精品成人久久| 秋霞成人午夜鲁丝一区二区三区| 日韩亚洲国产中文字幕| 国自在线精品视频| 欧美激情a∨在线视频播放| 777午夜精品福利在线观看| 日韩激情免费视频| 国产精品日韩一区二区| 国产精品一区二区免费看| 日韩av免费看| 国产精品激情自拍| 国产精品一区二区久久国产| 懂色av粉嫩av蜜臀av| 色偷偷av一区二区三区| 黄色片网址在线观看| 一区二区免费在线视频| 久久久久久九九九九| 国产一区二区视频在线观看| 亚洲欧美在线网| 久久国产精品免费观看| 黄色大片中文字幕| 亚洲综合色av| 国产成人久久久| 国产欧美久久久久| 日本一区免费观看| 欧美片一区二区三区| 99久热re在线精品视频| 色乱码一区二区三区熟女| 国产精品久久久一区| 99国产在线视频| 欧美激情国产精品日韩| 一区二区三区国| 精品国产美女在线| 91麻豆天美传媒在线| 国内外免费激情视频| 日韩尤物视频| 欧美黄网免费在线观看| 久久久久久久久四区三区| 国产精品自拍偷拍视频| 欧美中在线观看| 亚洲精品中文字幕乱码三区不卡| 久久天天躁狠狠躁夜夜av| 99国产盗摄| 国模视频一区二区| 日本国产高清不卡| 亚洲在线免费观看| 国产精品美女在线| 久久久免费av| av一区二区三区免费观看| 蜜桃网站成人| 欧美日韩一道本| 日韩一级在线免费观看| 国产99在线|中文| 久久精品国产一区二区三区| 91精品免费| 国产精品伊人日日| 欧美日韩视频在线一区二区观看视频| 亚洲精品免费在线视频| 精品免费国产| 国产精品丝袜久久久久久消防器材| 久久影院理伦片| 国产色一区二区三区| 欧美精品成人网| 日韩av免费网站| 亚洲一区三区在线观看| 中文字幕人成一区| 欧美激情xxxxx| 蜜月aⅴ免费一区二区三区| 国产精品久久久对白| 久久久精品国产| 日韩在线观看高清| 91精品国产高清自在线看超| www.av一区视频| 丰满少妇久久久| 99热成人精品热久久66| 99在线视频首页| 99热在线播放| 99久久99| 91精品视频在线播放| 91九色蝌蚪成人| 97碰碰碰免费色视频| 官网99热精品| 99久久99| 久久综合九色综合网站| 国产高清不卡无码视频| 国产成人亚洲综合91精品| 69国产精品成人在线播放| 国产精品96久久久久久又黄又硬| 77777亚洲午夜久久多人| 久久网站免费视频| 久久福利一区二区| 久久er99热精品一区二区三区| 久久男人资源站| 久久久久久久久影视| 国产成人精品最新| 国产精品免费区二区三区观看| 国产精品久久一区| 欧美精品在线网站| 一区二区在线观| 亚州精品天堂中文字幕| 日韩中文字幕在线视频观看| 亚洲一区二区免费| 亚洲爆乳无码专区| 日本人妻伦在线中文字幕| 欧美日韩精品免费观看| 精品无人乱码一区二区三区的优势| 国产欧美在线一区| 成人国产精品av| 久久久久国产精品视频| 久久久国产影院| 久久97久久97精品免视看| 亚洲精品在线视频观看| 日本欧美一二三区| 欧美成人第一区| 国内精品在线一区| 成人免费福利视频| 久久国产午夜精品理论片最新版本| 久久精品国产综合精品| 国产精品免费一区| 亚洲中文字幕无码不卡电影| 少妇av一区二区三区无码| 欧美性在线视频| 国产剧情日韩欧美| 久久综合婷婷综合| 国产精品毛片a∨一区二区三区|国 | 91久久精品国产91久久| 久久99精品久久久久久三级 | 97人人干人人| 久久精品国产91精品亚洲| 欧美麻豆久久久久久中文| 在线观看污视频| 欧美一区国产一区| 成人a视频在线观看| 色999日韩欧美国产| 色综合久久精品亚洲国产| 日韩资源av在线| 国产日产精品一区二区三区四区| 久久av一区二区三区亚洲| 美女国内精品自产拍在线播放| 婷婷亚洲婷婷综合色香五月| 精品人妻人人做人人爽| 91久久伊人青青碰碰婷婷| 国产精品视频一区二区三区经| 中文字幕色一区二区| 欧美久久久久久久久久久久久| 99精品人妻少妇一区二区| 久久久国产视频| 无码人妻aⅴ一区二区三区日本| 国产自产在线视频| 久久精品五月婷婷| 一区二区高清视频| 蜜桃视频成人| 久久久久久久午夜|