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

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

代寫COMP1721、代做Java程序語言

時間:2024-05-05  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



COMP1721 Object-Oriented Programming
Coursework 2
1 Introduction
Your task is to implement a simulation of the card game Baccarat—specifically, the simpler ‘punto banco’
variant of the game. To assist you, we have provided three Java classes: Card ,CardCollection and
CardException. These should form the basis of your solution.
Please note: an absolute requirement of this assignment is that you should not alter the definitions of
the Card, CardCollection andCardExceptionclasses in any way.
2 Preparation
1. Start by learning the rules of the game! Consult the Wikipedia page on Baccarat, which has a very
good summary. Note that you only need to read the sections headed ‘Punto banco’ and ‘Tableau
of drawing rules’.
2. Download the Zip archivecwk2files.zip from Minerva.
3. Unzip the Zip archive. You can do this from the command line in Linux, macOS and WSL 2 with
unzip cwk2files.zip. This will give you a subdirectory named cwk2, containing all the files you
need. Then remove the Zip archive, to ensure that you don’t accidentally submit it as your
solution!
4. Study the files in cwk2. In particular, examine the file README.md, as this provides guidance on how
to run the tests on which your mark will be partly based.
3 Basic Solution
For the basic solution, you must implement these classes:
• BaccaratCard, to represent a single playing card in Baccarat
• BaccaratHand, to represent a hand of cards in Baccarat
• Shoe, to represent the ‘shoe’ from which cards are dealt in Baccarat
You will also need to implement a small program in Baccarat.java that uses the classes.
The files for all of these classes can be found in src/main/java. Your solution MUST be implemented
in these files, in this specific location!
Figure 1 shows the relationships that should exist between the three main classes, and the methods they must
support. Relationships with the other provided classes are not shown.
Before writing any code, think carefully about the best way to reuse the Card and CardCollection
classes that we have provided to you.
Figure 1: Classes needed for Baccarat simulation.
As in Coursework 1, we have provided tests that will help you check whether you have implemented the
classes correctly. Some of the code needed to pass the tests is in the classes we have provided, but you will
1
need to also write stubs for some of the methods in Figure 1 in order for the tests to compile and run—see
the instructions for Coursework 1 if you need a reminder of how to do this.
As in Coursework 1, the tests are run using Gradle:
./gradlew test
Omit the ./ prefix if running in a Windows command shell, or use .\gradlew.bat to invoke Gradle
if running in Windows Powershell. If using IntelliJ, you should also be able to run the tests and other
coursework-related tasks via that IDE’s Gradle tool window.
The following sections provide further details of the requirements for each of the three classes.
3.1 BaccaratCard
These are the minimum requirements for the tests to pass.
• It should be possible to create a BaccaratCard object by specifying a rank and a suit, where the rank
is an instance of the enum Card.Rank and the suit is an instance of the enum Card.Suit .
• It should be possible to query rank and suit via the getRank() and getSuit() methods.
• Calling toString() on a BaccaratCard object should return a two-character string in which the first
character is the rank (A, 2, 3. . .9, T, J ,Q, K) and the second character is the Unicode symbol for the
card’s suit:♣ (\u2663), q (\u2666), r ( \u2665), or ♠ (\u2660).
• It should be possible to compare BaccaratCard objects in two ways, using the equals() and
compareTo() methods. These methods should have the expected behaviour for Java classes, as
discussed in the lectures. They should use rank and suit to perform their comparisons.
• The value() method of BaccaratCard should return the points value of the card in the game of
Baccarat. (See the Wikipedia article for details of scoring.)
Remember that we have provided a Card class to help you with implementation. Some of the requirements above are satisfied by code in that class. Think about the best way of reusing this code.
3.2 BaccaratHand
These are the minimum requirements for the tests to pass.
• A BaccaratHand should be able to store BaccaratCard objects, but it should start out as empty.
• It should be possible to add a BaccaratCardobject to a BaccaratHand by calling the add() method.
• Calling size() on a BaccaratHand should return the number of cards in the hand.
• Calling toString() on a BaccaratHand should return a string containing two-character representations of each card, separated from each other by a space. For example, a hand containing the Ace of
Clubs, Four of Diamonds and Jack of Spades should yield “A♣4q J♠”.
• The value() method of BaccaratHand should return the points value of a hand in the game of
Baccarat. (See the Wikipedia article for details of scoring.)
• The isNatural() method of BaccaratHand should return true if the hand has two cards and a points
value of 8 or 9, false otherwise.
Remember that we have provided a CardCollection class to help you with implementation. Some of
the requirements listed above are satisfied by code in that class. Think about the best way of reusing
this code.
3.3 Shoe
These are the minimum requirements for the tests to pass.
• Shoe must have a constructor in which the number of decks of cards is specified as a parameter. This
can have values of 6 or 8; any other value should result in a CardException being thrown.
• The constructor of Shoe should ensure that a shoe stores the specified number of complete decks of
BaccaratCard objects. A deck of cards is the full set of 52 cards, ordered first by suit and then by
rank. The constructor should not reorder the cards in any way.
2
• Calling size() on a Shoe should return the number of cards in the shoe.
• The shuffle() method of Shoe should reorder the cards in the shoe randomly. Java’s Collections
utility class, from the java.util package, will help you implement this easily. See the documentation
of this class for more details.
• The deal() method of Shoe should remove the first stored card and return it to the caller. Attempting
to deal from an empty shoe should trigger a CardException.
Remember that we have provided aCardCollection class to help you with implementation. Some of
the requirements above are satisfied by code in that class. Think about the best way of reusing this
code.
3.4 Main Program
The final part of the Basic solution is to implement a small program in Baccarat.java that uses the three
classes discussed earlier. This program should
• Create a shoe containing 6 full decks of cards, and shuffle it
• Create hands for the banker and a single player
• Deal a card to player then banker, then repeat this so each hand has two cards
• Display the contents and value of each hand
• Inform the user if the player or banker has a Natural
You can run the program via Gradle, with
./gradlew run
Figure 2 gives an example of the output that the program should generate.
Figure 2: Sample output for the Basic solution.
4 Full Solution
For the Full solution, replace the program in Baccarat.java with a more complete simulation of the game.
Your simulation should follow a simplified version of the ‘punto banco’ rules outlined in the Wikipedia
article. In this version, there is no betting and you should not ‘burn’ any cards from the shoe.
In this more complete simulation, the program will need to play multiple rounds, indicating the result
(Banker win, Player win or Tie) after each round. See the subsections below for further details.
Note: marks for the Full solution will be awarded based on how much of the required behaviour you
are able to implement correctly, and also on how well designed your solution is. A fully object-oriented
implementation in which different aspects of the task are broken out into separate methods will score more
marks than an unstructured implementation where everything is contained within the main method.
4.1 Interactive Mode
If the Baccarat program is run with a single command line argument whose value is either "-i" or
"--interactive" , then it should operate in interactive mode. In this mode, the program should continue
playing the game provided that there are at least six cards remaining in the shoe and the user has indicated
a wish to continue. The program should check this with the user at the end of each round. If the user’s
response does not begin with either 'y' or 'Y' then the game should end.
At the end of the game, the program should display counts of the number of rounds played, the number of
player wins, the number of banker wins and the number of tied rounds. After displaying this information,
the program should terminate.
3
A sample of the expected program output can be seen in Figure 3.Here, the user indicated that they wanted
to finished after playing ten rounds.
Figure 3: Sample output for Full solution (interactive mode).
To test interactive mode using Gradle, do
./gradlew interact
4.2 Non-Interactive Mode
If theBaccarat program is run without command line arguments, it should operate without user interaction,
playing rounds of the game repeatedly until there are fewer than 6 cards remaining in the shoe. At this point,
the program should display the same ‘end of game’ statistics as it does in interactive mode. The program
should then terminate.
Non-interactive mode should be the behaviour seen when running the program with
./gradlew run
5 Submission
Use Gradle to generate a Zip archive containing all the files that need to be submitted:
./gradlew submission
This produces a Zip archive named cwk2.zip. Submit this file to Minerva, via the appropriate link in the
‘Submit My Work’ folder.
The deadline for submissions is 2 pm on 2 May 2024. The standard university penalty of 5% of available
marks per day will apply to late work, unless an extension has been arranged due to genuine extenuating
circumstances.
Note that all submissions will be subject to automated plagiarism checking.
4
6 Marking
20 Tests for main classes (BaccaratCard ,BaccaratHand ,Shoe )
10 Code structure and style for main classes
5 Basic Baccarat program functionality, if Full solution not attempted
15 Full Baccarat program functionality (replaces Basic)
10 Full Baccarat program structure and style
60
Note: there are either 5 marks or 15 marks available for correct functioning of the program that uses the
classes, depending on whether you’ve attempted the Basic solution or the Full solution.You are also assessed
on program structure and style if you attempt the Full solution, but not if you attempt the Basic solution (as
the amount of code required in this case is very small).
Thus the maximum mark that can be achieved for the Basic solution is 36.You can achieve up to 60 marks
if you attempt the Full solution.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機打開當前頁
  • 上一篇:赴菲律賓旅游簽證續簽代辦 旅游簽續簽材料
  • 下一篇:代做FINM8007、Java/Python程序設計代寫
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業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在线免费观看
    91精品视频在线免费观看| 国模视频一区二区| 国产精品青青草| 国产成人精彩在线视频九色| www精品久久| 91免费黄视频| 国产精品a久久久久久| 久久一区免费| 久久久久久久久久伊人| 久久精品xxx| 日韩视频永久免费观看| 国产精品美女免费视频| 国产精品免费入口| 欧美区二区三区| 亚洲在线欧美| 日韩 欧美 高清| 欧美乱大交xxxxx潮喷l头像| 国内精品免费午夜毛片| 国产啪精品视频| 91精品在线一区| 日韩中文字在线| 久久久噜噜噜久久久| 色婷婷av一区二区三区久久| 国产精品视频导航| 久久成人人人人精品欧| 欧美激情伊人电影| 视频一区不卡| 免费观看精品视频| av一区二区三区在线观看| 久久综合精品一区| 久久视频中文字幕| 在线观看免费91| 日本久久中文字幕| 国产中文欧美精品| 7777免费精品视频| 国产精品视频久久久久| 欧美老少配视频| 视频一区二区三区在线观看| 欧美日韩精品一区| 成人一区二区av| 久久精品小视频| 亚洲欧洲精品一区| 欧美精品一区二区三区久久 | 国产成人精品久久久| 国产精品久久精品视| 亚洲乱码一区二区三区三上悠亚| 日本人成精品视频在线| 国产在线观看一区二区三区| 国产精品1区2区在线观看| 视频一区视频二区国产精品| 欧美日本亚洲视频| 欧洲精品在线一区| 91九色国产ts另类人妖| 国产精品国产三级国产aⅴ浪潮| 亚洲精品欧美极品| 国产一区二区三区四区五区加勒比| 91美女片黄在线观| 国产精品久久久久免费a∨ | 少妇精69xxtheporn| 一区二区成人国产精品| 日韩亚洲在线视频| www.日本少妇| 久久亚洲精品成人| 欧美在线一区二区三区四区| 99精品视频在线看| 精品国产一区三区| 欧美中文字幕在线观看| 91精品国产综合久久男男| 不用播放器成人网| 欧美日本韩国国产| 久久久久久久久久国产精品| 日韩专区第三页| 97碰碰碰免费色视频| 久久综合五月天| 欧美这里只有精品| 成人羞羞国产免费网站| 国产精品国模在线| 欧美日韩免费观看一区| 久久久久久久9| 日本a级片在线播放| 91精品久久久久久久久久久久久久 | 国产精品无码专区av在线播放| 美女视频久久黄| 精品视频一区二区在线| 精品国产欧美成人夜夜嗨| 日韩在线第三页| 久久免费福利视频| 无码人妻h动漫| 国产日韩精品在线| 国产精品国产精品国产专区蜜臀ah| 青青青国产在线观看| 久热国产精品视频一区二区三区| 亚洲国产精品女人| 91九色丨porny丨国产jk| 亚洲一区二区三区精品视频| 国产精品夜色7777狼人| 中文字幕在线亚洲三区| 成人3d动漫一区二区三区| 亚洲一区二区不卡视频| 99久热re在线精品996热视频| 亚洲砖区区免费| 91久久偷偷做嫩草影院| 无码免费一区二区三区免费播放| 国产天堂在线播放| 国产aⅴ精品一区二区三区黄 | 午夜精品美女自拍福到在线| 久久久免费精品| 日本高清视频精品| 国产成人精品一区| 国产综合av在线| 宅男av一区二区三区| 99免费视频观看| 日本精品一区二区三区高清 久久 日本精品一区二区三区视频 | 日韩专区在线播放| 国产中文字幕日韩| 亚洲一区二区三区免费看| 久久综合婷婷综合| 欧美亚洲午夜视频在线观看| 国产精品夫妻激情| 97精品久久久中文字幕免费| 视频一区二区三| 国产精品三级网站| www亚洲国产| 欧洲成人免费视频| 国产999在线| 91久久久久久国产精品| 欧洲日本亚洲国产区| 精品国产无码在线| 久久久视频精品| 激情小说综合网| 亚洲一区二区在| 久久精品国产视频| 成人综合国产精品| 欧美伊久线香蕉线新在线| 久久99国产精品自在自在app| 久久琪琪电影院| 国产亚洲欧美一区二区| 亚洲爆乳无码专区| 国产精品久久久亚洲| 91美女片黄在线观| 欧美综合在线播放| 亚洲综合中文字幕在线观看| 久久久久久久久久久久久久一区| 国产男人精品视频| 欧日韩一区二区三区| 亚洲精品日产aⅴ| 欧美成在线观看| 日韩在线欧美在线| 97精品国产91久久久久久| 欧美日韩高清免费| 午夜啪啪免费视频| 精品免费国产| 久久久精品影院| 久久免费观看视频| 国产伦视频一区二区三区| 欧美一级片免费观看| 欧美理论片在线观看| 日日噜噜噜夜夜爽亚洲精品| 97久久伊人激情网| 国产在线观看欧美| 欧美精品一区在线| 日韩和欧美的一区二区| 午夜免费电影一区在线观看| 色综合五月天导航| 国产精品久久久久久久乖乖| 久久亚洲午夜电影| av无码精品一区二区三区| 国内精品视频免费| 欧美亚洲丝袜| 日韩精品久久一区| 在线精品日韩| 久久国产天堂福利天堂| 国产精品日韩精品| 日韩在线www| www.欧美免费| 九色综合婷婷综合| 国产mv久久久| 国产高清免费在线| 久久久免费电影| 久久久福利视频| 久久资源亚洲| 久久人91精品久久久久久不卡| 91久久久久久久久久| 99一区二区三区| 99久re热视频精品98| 国产中文日韩欧美| 国产色视频一区| 国产精品影院在线观看| 国产乱子伦农村叉叉叉| 国产免费一区二区视频| 国产美女精品视频免费观看| 国产欧美日韩免费看aⅴ视频| 国产日韩换脸av一区在线观看| 国产一区二区网| 国产乱人伦真实精品视频| 国产女人18毛片| 97色在线观看免费视频| 久久久免费精品| 精品国产一区二区三区久久久 | 国产成人精品免费看在线播放|