首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
program代做、Java程序设计代写
项目预算:
开发周期:
发布时间:
要求地区:
Overview
This assignment is divided into two parts, A and B. The assignment requires you to develop a simple game called Bulls & Cows. There are six compulsory tasks in this part of the assignment to complete.
Before starting the assignment, read through and gain an understanding of the requirements.
You may use any concepts taught in this course as well as any predefined classes from Java 11 to complete this assignment.
Criteria
Your assignment will be marked based on the correctness of your program and your programming style. Here are some questions to consider for the programming style:
•Is the code well-structured?
•Is the code self-explanatory?
•Can you understand the code easily?
•Are all variables properly defined with meaningful and clear code?
•Is there any commented out code?
Marks will be deducted if your code has a bad programming style.
No marks will be awarded in the following situations:
•If the markers cannot compile your code.
•If you only have one class, excluding the provided Keyboard class, for this part of the assignment.
•If there is no use of inheritance for this part of the assignment.
•If you use any external libraries that require the import of jar files.
•If you did not complete Task One of Part B.
Assignment Details
This part of the assignment is a continuation from Part A. Before starting the following tasks, please copy the source folder (src) of Part A to this project's source folder (src) and make sure everything is working as expected.
Task One: Design and Feedback (10 marks)
In this part of the assignment, we would like you to extend the bulls and cows game to allow the player to play against different levels of the computer. We would also like to customise the game so that the player can guess six-digit codes.
Using either pen & paper or the diagramming tool of your choice, prepare a UML class diagram which shows all the classes and important methods of your Bulls & Cows implementation, along with the appropriate relationships showing how these classes fit together, from Part A.
Prepare another UML class diagram which shows the updated design of your game based on the extensions described in this part of the assignment as well as any improvements you plan to make.
You will then show the two class diagrams to one of the teaching staff before 03 May, describing the changes you will be making for Part B. You must choose one of the available appointment slots on Canvas for this part. Before consulting with the teaching staff, you need to add the two class diagrams (as a PNG or JPEG) to the top level of your repository (i.e. where the README is). Failure to demonstrate your designs to the teaching staff will result in a mark of zero for Part B.
Note: It is OK if your final implementation doesn't match your design 100% for Part B. You will document this process in the later task. You will also include all the feedback received as part of your reflection.
Task Two: Refactoring (0 marks)
A good practice in software development is to refactor your code whenever you find the opportunity to do so. Refactoring is about re-writing the code to improve the design, structure and algorithm while the functionality of the software as well as the expected behaviours and outcomes remain the same. You can consider the list of things to avoid based on Assignment 1 feedback.
Before extending your implementation from Part A, you may refactor your code so that you can implement the following tasks more easily. Whenever you refactor, you should make sure all the tasks from Part A still work as expected. Don't forget to document all the changes you have made in your reflection.
Task Three: Medium AI (5 marks)
Modify your code so that when the player chooses to play against the Computer, they will be asked to select either an easy or medium AI opponent to play against.
If the player chooses to play against an easy AI, the game should proceed in exactly the same manner as in Part A. However, if a medium AI is selected, the AI should keep track of guesses it has already made. The AI will not make the same guess twice.
Task Four: Hard AI (10 marks)
Modify your code so that the player can additionally choose to play against a hard AI opponent. When a hard AI is selected, the computer should be much more intelligent when guessing, rather than just choosing at random. To receive full marks, you must use the following strategy.
Strategy for Hard AI
This strategy involves keeping a list of all possible guesses, and then intelligently pruning that list based on the result of each guess made by the AI. In this strategy, the first guess by the computer will be chosen randomly. After this guess, all subsequent guesses will be carefully planned. The computer keeps a track of precisely which codes remain consistent with all the information it has received so far. The computer will only choose a guess that has a chance of being the correct one.
For example, let’s assume the computer’s first guess scored 1 bull and 1 cow. Then the only codes that still have a chance to be the correct one, are those which match up 1 bull and 1 cow with the first guess. All other codes should be eliminated. The computer will go through its list of all possible codes and test each against its first guess. If a code matches 1 bull and 1 cow with the first guess, then it will remember that the code is still a possible candidate for the opponent's secret code. If a code does not match 1 bull and 1 cow with the first guess, the code will be eliminated. After this is completed, the computer randomly chooses any of the possible candidates for the second guess.
If the computer’s second guess scored 2 bulls and 1 cow, the computer checks all the remaining candidates to see which codes match up 2 bulls and 1 cow with the second guess. Those codes that do not match are eliminated. In this manner, each guess is consistent with all the information obtained up until that point in the game.
To illustrate the process, consider the scenario shown in the following figure, in which a simpler version of the game is being played. In this demonstration, secret codes are only two digits in length, and may only contain the characters 1 through 4. The player has chosen "2 1" as their secret code, which the AI is trying to guess. Using this process of elimination, the AI is able to quickly guess the player’s code.
Task Five: Playing with Six-Digit Code (15 marks)
Modify your code so that when the player chooses to play the 'Single Player' mode, they can select either four-digit or six-digit code as the type of code to break.
If the player chooses four-digit code, then the game should proceed in exactly the same manner as in Part A. If the player chooses six-digit code, the following will occur:
The game will import a simple file named hexadecimals.txt. This file contains a list of six-digit codes for the computer. This file is provided to you in the repo.
If the game cannot find the file, then you should prompt the player with an appropriate error message and return to the beginning of the game.
Otherwise, the game will read the file and randomly choose a code as the secret code for the player to guess.
Note that the secret code that the computer chooses should be valid. A valid code is where the code is exactly six unique characters. The allowed characters for the code are numbers, 0 - 9, and letters, a - f. After the file is imported, the game should then proceed in a similar manner as in Part A. The game will verify that the player has entered a valid guess. The prompt for player input, results for each guess and the final outcome should be displayed appropriately on the console.
You do not need to ask the player to save the results to a file at the end of the game.
Note: It is important that, when modifying your code, the rest of your code should not break! Everything else should continue working as normal. You should also aim to reuse as many existing methods and classes from previous tasks as possible.
Task Six: Reflection (20 marks)
Now that you have completed the tasks, it's time to reflect upon your design and implementation.
In a pdf file named reflection.pdf, write two to four paragraphs reflecting on your learning as well as your design and implementation for this assignment. Here are some questions that might help you to reflect on your learning:
•What have you learned by doing this assignment?
•How well did you think this assignment went?
•What lectures / labs did you find helpful for this assignment?
•If you have time to extend this assignment, what would you do?
Your report must also explain the following:
•What changes did you make from Part A to Part B?
•Comparing the initial design you created for Part A with your final implementation, how different are they? Why did you change your design?
•Which part(s) of your design (final class diagram) and/or implementation is good?
What makes them good?
If you do not think your design / implementation is good, explain what and how you could improve.
Please also specify the class(es), method(s) and/or line number(s)
Please use the IEEE conference template for the reflection, using A4 page format, 10pt font for the body, and conference style. Make sure you add the class diagrams and your reflection in the top level of your repository (i.e. where the README is). You do not need to have an abstract or sections such as introduction and conclusions.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做 program、代写 c++设计程...
2024-12-23
comp2012j 代写、代做 java 设...
2024-12-23
代做 data 编程、代写 python/...
2024-12-23
代做en.553.413-613 applied s...
2024-12-23
代做steady-state analvsis代做...
2024-12-23
代写photo essay of a deciduo...
2024-12-23
代写gpa analyzer调试c/c++语言
2024-12-23
代做comp 330 (fall 2024): as...
2024-12-23
代写pstat 160a fall 2024 - a...
2024-12-23
代做pstat 160a: stochastic p...
2024-12-23
代做7ssgn110 environmental d...
2024-12-23
代做compsci 4039 programming...
2024-12-23
代做lab exercise 8: dictiona...
2024-12-23
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!