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

合肥生活安徽新聞合肥交通合肥房產(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)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢(qián)_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢(qián)_專業(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類(lèi)仿真分析代做服務(wù)40個(gè)行業(yè)
    流體cfd仿真分析服務(wù) 7類(lèi)仿真分析代做服務(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)證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(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| 免费观看亚洲视频| 国产在线青青草| 国产精品黄页免费高清在线观看| 国内精品小视频在线观看| 国产精品久久亚洲7777| 国模精品视频一区二区| 精品久久久久久久久久中文字幕| 国产欧美在线看| 伊人网在线免费| www.日日操| 日本中文字幕久久看| 久久久久久久久亚洲| 日韩欧美视频一区二区三区四区| 日韩亚洲成人av在线| 激情伦成人综合小说| 欧美日本亚洲视频| 91精品国产自产在线老师啪| 日本免费成人网| 国产精品丝袜久久久久久高清 | www插插插无码免费视频网站| 亚洲专区国产精品| 91精品国产91久久久久久最新| 日本免费a视频| 国产精品欧美一区二区三区奶水| 国产亚洲一区二区三区在线播放| 在线观看欧美亚洲| 国产成人中文字幕| 蜜臀精品一区二区| 亚洲精品欧美日韩| 日韩在线小视频| 国产伦精品一区二区三区高清版 | 一区二区三区观看| 九九热久久66| 国产在线观看精品一区二区三区| 国产999在线观看| 国产成人精品免费视频| 国内成+人亚洲| 午夜久久资源| 国产精品二区在线| 国产精品1区2区在线观看| 欧美精品一区二区三区免费播放| 久久久久国色av免费观看性色| 久久国产精品久久精品国产| 国产日韩欧美在线看| 日本一区二区三区四区高清视频| 久热精品在线视频| 久久av免费一区| 国产欧美日韩亚洲精品| 欧美与黑人午夜性猛交久久久| 欧美精品电影在线| 俺去了亚洲欧美日韩| 不卡视频一区二区三区| 激情五月婷婷六月| 日本一区二区在线视频| 欧美激情视频在线免费观看 欧美视频免费一 | 性色av一区二区三区在线观看| 久久视频在线观看免费| 国产精品.com| 国产日韩久久| 欧美日韩系列| 日本在线播放不卡| 亚洲蜜桃av| 九九热精品视频| 国产成人啪精品视频免费网 | av不卡在线免费观看| 免费国产一区| 日本午夜在线亚洲.国产| 久久国产精品偷| 国产精品美女在线播放| 久久久久免费精品| 久久久亚洲福利精品午夜| 国产九色porny| 麻豆中文字幕在线观看| 人妻久久久一区二区三区| 午夜欧美大片免费观看| 中文字幕日韩一区二区三区 | 亚洲乱码一区二区三区三上悠亚| 精品国内亚洲在观看18黄| 久久免费视频网站| av免费观看网| 不卡中文字幕在线| www亚洲国产| 99国精产品一二二线| 国产日韩久久| 国产欧美一区二区三区在线| 国内自拍中文字幕| 黄色一区三区| 欧美日韩在线不卡视频| 欧美精品一区二区视频| 欧美国产视频一区| 麻豆传媒一区二区| 麻豆亚洲一区| 免费99视频| 国产综合在线视频| 国产一区红桃视频| 国产一区二区三区高清| 国产一区视频在线| 国产九色91| av动漫在线播放| 91高潮精品免费porn| 久久久一二三四| 久久国产一区| 久久九九有精品国产23| 国产精品久久网| 精品久久久久久一区| 精品自拍视频在线观看| 在线亚洲美日韩| 亚洲一区二区三区在线免费观看| 亚洲国产精品日韩| 日本一区二区三区四区在线观看 | av天堂永久资源网| 777精品视频| 国产成人亚洲综合91精品| 久久久久久久久久亚洲| 国产精品视频网| 欧美成人免费在线观看| 亚洲综合在线播放| 性欧美大战久久久久久久| 日韩美女免费线视频| 激情小说综合区| 成人免费福利在线| 久久精品国产精品国产精品污| 俺也去精品视频在线观看| 久久91精品国产91久久久| 亚洲精品久久区二区三区蜜桃臀 | 91久久国产自产拍夜夜嗨| 久久久av水蜜桃| 久青草国产97香蕉在线视频| 欧美精品激情在线观看| 无码日韩人妻精品久久蜜桃| 奇米成人av国产一区二区三区| 蜜桃传媒视频第一区入口在线看 | 亚洲一区三区在线观看| 日本不卡高字幕在线2019| 国内精品视频久久| 91久久久在线| 国产精品视频999| 中文字幕一区二区三区有限公司 | 亚洲www永久成人夜色| 欧美又大又粗又长| 国产狼人综合免费视频| 91精品国产九九九久久久亚洲| 日韩在线欧美在线国产在线| 毛片精品免费在线观看| 日本一区二区高清视频| 国产在线精品一区二区中文 | 日韩一级片播放| 国内成人精品视频| 91精品国产综合久久香蕉922| 久久久久久久一区二区三区| 色综合导航网站| 欧美一级片在线播放| 国产一区二区三区高清| 国产freexxxx性播放麻豆| 久久成人人人人精品欧| 视频一区在线免费观看| 精品欧美一区二区精品久久| 91av在线网站| 久久av在线看| 人偷久久久久久久偷女厕 | 免费精品视频一区| 国产精品中文字幕在线观看| 91传媒久久久| 啊v视频在线一区二区三区 | 国产精彩精品视频| 日韩一级黄色av| 日本久久精品视频| 欧美另类一区| 91成人国产在线观看| 免费不卡在线观看av| 日韩欧美在线电影| 91av免费观看91av精品在线| 欧美成人免费一级人片100| 日本一区二区免费高清视频| 国产精品一区二区三区毛片淫片| 北条麻妃久久精品| 欧美一区二区三区综合| 成人在线一区二区| 国产精品久久9| 日韩精品 欧美| 高清欧美精品xxxxx| 国产私拍一区| 国产成人精品午夜| 日本一本草久p| 久久久无码中文字幕久...| 国产99视频精品免费视频36| 精品亚洲第一| 国产精品免费入口| 欧洲午夜精品久久久| 久久人妻无码一区二区| 亚洲色精品三区二区一区| 国产欧美高清在线| 久久亚洲国产精品成人av秋霞| 欧美性受xxxx黑人猛交| 久久久久久久久久国产| 亚州成人av在线| 不卡一卡2卡3卡4卡精品在| 欧美激情亚洲精品| 国产一级不卡毛片|