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 WX:codinghelp
- Ins群发脚本助手,Instagram一键群发工具,让你打造营销新格局!
- Instagram自动登录,ins群发工具/ig营销助手/ins引流神器/群发采集
- Instagram采集指定地区用户,ins接粉软件,ig打粉软件
- WhatsApp协议号如何购买,ws协议号批量出售/ws劫持号/ws频道号推荐
- 聚焦两会丨加快推进医疗健康数字化建设 神州医疗以尖端技术赋能医院高质量发展
- Instagram营销软件 - ins采集软件/ig采集助手/ins群发助手/ig群发引流
- 选择合适的监控观测平台,为业务出海合规建设减负
- Ins引流利器,Instagram高效营销软件,助你轻松推广品牌!
- CS 455代做、Java编程语言代写
- Instagram群发营销利器,ins私信引流新利器,ig最强引流软件
- “画游千里江山”亮相2024北京台春晚龙行北京会场
- 代写CourseManager编程、代做java程序语言
- 代做Battleship、代写Java编程设计
- 世界地球日:远光软件以科技守护美好,以行动践行低碳
- TG自动群发软件,电报营销群发助手,Telegram采集拉群工具
- Instagram群发消息工具,Ins模拟器群发软件,助你快速营销!
- 群发大数据时代WhatsApp群发云控让您的推广更具针对性
- 低封控软件推荐!Instagram自动私信营销助手,Ins引流轻松搞定!
- instagram自动打粉软件/ins如何一键爆粉/ig群发营销助手
- 便捷Line代群发,助您迅速提升用户互动!
- Ins采集工具+私信群发神器,Instagram引流推广双管齐下!
- Instagram最强群发工具,Ins快速引粉营销教学
- 竹间智能创始人简仁贤,详谈认知智能技术的智能化应用
- Ins打粉工具火热推荐,Instagram营销软件助你成为行业领先!
- instagram群发利器,精准采集用户,助你爆粉引流!
- 忆联带你读懂闪存原理与颗粒类型
- CHINC2024丨神州医疗重磅发布大模型及一体机,引领医疗AI行业高质量发展
- EEE-6512 代写、代做 java/c++编程语言
- 释放AI算力无限可能,英特尔协同合作伙伴加速行业智能化升级!
- 求臻医学MRD产品斩获2023年度肿瘤标志物年度十大创新技术产品奖
推荐
- 疫情期间 这个品牌实现了疯狂扩张 记得第一次喝瑞幸,还是2017年底去北京出差的 科技
- 老杨第一次再度抓握住一瓶水,他由此产生了新的憧憬 瘫痪十四年后,老杨第一次再度抓握住一瓶水,他 科技
- 智慧驱动 共创未来| 东芝硬盘创新数据存储技术 为期三天的第五届中国(昆明)南亚社会公共安 科技
- 全力打造中国“创业之都”名片,第十届中国创业者大会将在郑州召开 北京创业科创科技中心主办的第十届中国创业 科技
- 苹果罕见大降价,华为的压力给到了? 1、苹果官网罕见大降价冲上热搜。原因是苹 科技
- 升级的脉脉,正在以招聘业务铺开商业化版图 长久以来,求职信息流不对称、单向的信息传递 科技
- 创意驱动增长,Adobe护城河够深吗? Adobe通过其Creative Cloud订阅捆绑包具有 科技
- 丰田章男称未来依然需要内燃机 已经启动电动机新项目 尽管电动车在全球范围内持续崛起,但丰田章男 科技
- B站更新决策机构名单:共有 29 名掌权管理者,包括陈睿、徐逸、李旎、樊欣等人 1 月 15 日消息,据界面新闻,B站上周发布内部 科技
- 如何经营一家好企业,需要具备什么要素特点 我们大多数人刚开始创办一家企业都遇到经营 科技