91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区

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

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

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



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.

 

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:CS 412代做、代寫(xiě)Python設(shè)計(jì)程序
  • 下一篇:F27SB代寫(xiě)、c++,Java程序代做
  • 無(wú)相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評(píng)軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)/客戶要求/設(shè)計(jì)優(yōu)化
    有限元分析 CAE仿真分析服務(wù)-企業(yè)/產(chǎn)品研發(fā)
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計(jì)優(yōu)化
    出評(píng) 開(kāi)團(tuán)工具
    出評(píng) 開(kāi)團(tuán)工具
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    挖掘機(jī)濾芯提升發(fā)動(dòng)機(jī)性能
    海信羅馬假日洗衣機(jī)亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機(jī)亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士4號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
    合肥機(jī)場(chǎng)巴士3號(hào)線
  • 短信驗(yàn)證碼 目錄網(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

    91精品国产91久久久久久_国产精品二区一区二区aⅴ污介绍_一本久久a久久精品vr综合_亚洲视频一区二区三区
    欧美一级欧美三级在线观看| 91精品欧美综合在线观看最新| 久久久美女毛片| 久久国产精品72免费观看| 国产精品久久久久久久久久妞妞| 国产精品视频观看| www.av亚洲| 欧美成人激情免费网| 激情成人午夜视频| 欧美视频一区二| 热久久久久久久| 久久人人97超碰人人澡爱香蕉 | 久久精品人人做| voyeur盗摄精品| 欧美大白屁股肥臀xxxxxx| 国产精品综合网| 欧美男人的天堂一二区| 经典三级视频一区| 欧美性一区二区| 精品亚洲欧美一区| 欧美美女bb生活片| 国产一区视频导航| 欧美日韩一区高清| 国内精品伊人久久久久av一坑 | 亚洲永久免费| 午夜欧美在线一二页| 久久精品综合一区| 日韩综合小视频| 欧美在线观看一二区| 激情文学综合丁香| 欧美一级电影网站| 99久久久免费精品国产一区二区 | 久久综合丝袜日本网| 99久久综合色| 国产精品天天摸av网| 亚洲国产二区| 亚洲国产精品一区二区久久恐怖片| 免费在线成人av| 久久精品国产秦先生| 欧美日本精品一区二区三区| 国产白丝网站精品污在线入口| 久久综合久久综合亚洲| 午夜国产精品视频| 亚洲精品菠萝久久久久久久| 久久婷婷久久| 国产精品一二一区| 久久精品人人做人人爽97| 亚洲黄色成人| 日本大胆欧美人术艺术动态| 91精品国产综合久久久久久| 93久久精品日日躁夜夜躁欧美| 国产精品传媒在线| 久久久天天操| 成人激情文学综合网| 狠狠色丁香婷综合久久| 欧美三级在线播放| 色综合色综合色综合色综合色综合| 中文字幕亚洲区| 在线视频你懂得一区二区三区| 国产成人aaa| 亚洲欧美日韩中文字幕一区二区三区| 日本道色综合久久| 99久久精品免费| 亚洲福利电影网| 日韩一区二区视频| 亚洲成人中文| 激情丁香综合五月| 国产精品久久久久永久免费观看| 久久精品国产清高在天天线| 成人国产视频在线观看| 亚洲精品乱码久久久久久日本蜜臀| 欧美午夜精品久久久久久孕妇| 欧美一区免费视频| 日本不卡一二三| 日本一区二区电影| 一本久道中文字幕精品亚洲嫩| 99久久99久久免费精品蜜臀| 五月天亚洲婷婷| 国产亚洲一区二区三区四区| 91久久一区二区| 国产综合激情| 国产黄色成人av| 亚洲一区二区三区四区的| 日韩欧美一级二级三级久久久| 国产日韩精品久久| 国产一区999| 亚洲一级不卡视频| www久久精品| 色欧美88888久久久久久影院| 欧美激情国产日韩| 九九国产精品视频| 亚洲日本免费电影| www国产精品av| 欧美日韩你懂得| 亚洲高清网站| 成人福利视频在线| 蜜臀91精品一区二区三区| 国产精品每日更新在线播放网址 | 日韩一区二区视频| 99热免费精品| 你懂的一区二区| 国产一区日韩二区欧美三区| 亚洲成av人片在线| 国产日产欧美一区二区视频| 欧美人与z0zoxxxx视频| 一本色道久久综合一区 | 精品一区二区三区免费毛片爱| 一区二区三区加勒比av| 国产天堂亚洲国产碰碰| 91精品黄色片免费大全| 色88888久久久久久影院野外 | 黑人一区二区三区四区五区| 不卡视频免费播放| 国产综合久久久久影院| 日韩精品一二三四| 亚洲另类在线一区| 国产精品传媒视频| 国产日韩影视精品| 精品国产免费一区二区三区香蕉| 欧美三电影在线| 在线看一区二区| 一本色道久久综合精品竹菊| 国产偷自视频区视频一区二区| 黄色精品免费| 很黄很黄激情成人| 欧美精选一区| 午夜精品婷婷| 欧美激情一区| 欧美午夜精彩| 欧美jizzhd精品欧美巨大免费| 成人av综合一区| 成人午夜免费av| 风流少妇一区二区| 国产a视频精品免费观看| 国产一区二区在线免费观看| 国产一区三区三区| 国产乱人伦偷精品视频不卡| 国产精品一级二级三级| 国产乱对白刺激视频不卡| 国产剧情一区二区三区| 国产欧美日韩在线播放| 欧美日韩在线高清| 91免费在线播放| 91尤物视频在线观看| thepron国产精品| 99久久99久久久精品齐齐| 欧美影视一区| 欧美 日韩 国产 一区| 日本久久一区二区| 91成人免费电影| 欧美日本在线视频| 欧美日韩国产免费一区二区| 欧洲一区二区三区在线| 欧美亚洲综合另类| 在线一区二区三区四区| 色偷偷成人一区二区三区91 | 日韩精品视频网站| 亚洲综合免费观看高清完整版 | 日韩三区在线观看| 国产午夜精品美女毛片视频| 国产精品久久久久久久久图文区 | 亚洲男人的天堂网| 国产精品美女久久久久aⅴ国产馆| 亚洲欧美成aⅴ人在线观看| 亚洲一区二区三区自拍| 国产一区再线| 久久国产精品久久精品国产| 欧美性做爰猛烈叫床潮| 日韩三级中文字幕| 中文字幕国产精品一区二区| 亚洲一二三四在线| 激情文学综合丁香| 欧美成人一区二区在线| 国产亚洲精品bv在线观看| 日本韩国欧美在线| 精品国产一区二区三区忘忧草| 欧美激情一区二区三区蜜桃视频| 最新国产成人在线观看| 午夜精品成人在线| 黑人精品欧美一区二区蜜桃 | 黄色成人在线网站| 性色av一区二区怡红| 69堂精品视频| 欧美成人高清电影在线| 亚洲欧美激情在线| 久久草av在线| 粉嫩13p一区二区三区| 国产一区二区三区四区老人| 免费在线亚洲欧美| 日韩欧美电影在线| 亚洲精品大片www| 国产成人在线视频网址| 99国产精品久久久久久久 | 国产精品538一区二区在线| 欧美色欧美亚洲另类七区| 国产午夜精品一区二区三区欧美| 欧美自拍偷拍一区| 欧美精品一区二区精品网| 综合色天天鬼久久鬼色| 日本在线不卡视频一二三区|