99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

代寫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程序設計代寫
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                亚洲精品一二三四区| 日韩一区二区电影在线| 一区二区日韩电影| 欧美mv日韩mv亚洲| 日韩av不卡在线观看| 日本久久一区二区三区| 色综合久久综合中文综合网| 久久精品欧美日韩| 国产乱理伦片在线观看夜一区| 欧美区在线观看| 亚洲国产一区二区三区| 国产成人夜色高潮福利影视| 久久久久久久久伊人| 国产一区日韩二区欧美三区| 精品久久久久久最新网址| 国内外成人在线视频| 在线免费亚洲电影| 亚洲精品免费看| 欧美日韩成人综合天天影院 | 欧美日韩一区二区三区四区| 偷拍自拍另类欧美| 99在线精品一区二区三区| 亚洲品质自拍视频网站| 国产二区国产一区在线观看| 欧美国产1区2区| 一本大道久久a久久综合| 亚洲电影在线播放| 精品久久久三级丝袜| 中文一区二区完整视频在线观看| 床上的激情91.| 亚洲五码中文字幕| 日韩欧美中文字幕一区| 丁香一区二区三区| 一区二区三区日韩精品视频| 日韩一区二区三区电影 | 亚洲一区在线观看视频| 日韩欧美久久久| av电影在线不卡| 久久久久久久一区| 成人av资源下载| 三级一区在线视频先锋 | 国产一区二区女| 亚洲精品中文在线影院| 欧美一区二区播放| 成人午夜免费电影| 日产精品久久久久久久性色| 国产精品午夜春色av| 91精品国产福利在线观看| 97久久精品人人爽人人爽蜜臀| 日韩黄色在线观看| 亚洲女厕所小便bbb| 91精品福利视频| 国产成人午夜高潮毛片| 日韩精品每日更新| 亚洲欧美偷拍另类a∨色屁股| 精品av综合导航| 在线播放中文字幕一区| 在线观看视频91| 97久久久精品综合88久久| 国产一区啦啦啦在线观看| 天天色 色综合| 亚洲综合色噜噜狠狠| 亚洲女人****多毛耸耸8| 国产女主播一区| 精品国产乱码91久久久久久网站| 欧美亚洲动漫制服丝袜| 99re这里只有精品首页| 午夜av电影一区| 亚洲mv大片欧洲mv大片精品| 亚洲国产日产av| 亚洲国产视频在线| 亚洲成人一区在线| 日韩精品欧美成人高清一区二区| 亚洲高清免费在线| 午夜久久久影院| 午夜av电影一区| 日韩精彩视频在线观看| 日本成人在线看| 美女诱惑一区二区| 精品一区二区影视| 婷婷亚洲久悠悠色悠在线播放 | 51久久夜色精品国产麻豆| 麻豆免费看一区二区三区| 免费看日韩精品| 久久精品国产精品亚洲红杏| 日本免费新一区视频| 婷婷激情综合网| 国产一区二区导航在线播放| 亚洲成人av福利| 奇米影视7777精品一区二区| 亚洲精品伦理在线| 有坂深雪av一区二区精品| 亚洲va欧美va人人爽| 亚洲r级在线视频| 国产一区二区三区免费在线观看 | 伊人婷婷欧美激情| 日韩伦理av电影| 亚洲色图视频免费播放| 日韩国产高清影视| 色婷婷av一区二区三区gif| 欧美精品一区二区三区蜜桃视频| 一区二区成人在线| 99久久免费视频.com| 日韩精品一区在线观看| 亚洲国产一区二区三区| 91色|porny| 中文字幕字幕中文在线中不卡视频| 91福利精品视频| 日韩一区二区三区av| 一个色综合网站| av不卡在线观看| 国产精品色一区二区三区| 激情都市一区二区| 欧美一级片在线观看| 亚洲高清免费在线| 91偷拍与自偷拍精品| 日本一区二区三区四区在线视频| 激情偷乱视频一区二区三区| 欧美精品第1页| 五月婷婷激情综合网| 色噜噜夜夜夜综合网| 亚洲欧美国产毛片在线| 成人av在线网| 国产精品美日韩| 成人激情黄色小说| 国产精品二区一区二区aⅴ污介绍| 国产一区二区三区高清播放| 精品日韩av一区二区| 韩国在线一区二区| 国产亚洲午夜高清国产拍精品| 国产一区三区三区| 久久精品视频一区二区| 国产精品一区二区久激情瑜伽| 日韩欧美国产一二三区| 久久成人免费电影| 国产日韩欧美激情| 色综合久久综合网| 亚洲激情在线播放| 欧美精品v国产精品v日韩精品| 日本三级韩国三级欧美三级| 久久综合国产精品| 粉嫩av一区二区三区在线播放 | 亚洲一二三级电影| 日韩一区国产二区欧美三区| 久久99国内精品| 国产精品久久久久婷婷| 91黄色在线观看| 欧美aaaaa成人免费观看视频| 久久天堂av综合合色蜜桃网| 91免费版在线看| 日韩国产欧美在线观看| 国产欧美综合色| 欧美三片在线视频观看| 九九九精品视频| 亚洲人一二三区| 日韩欧美国产一区二区三区| 成人av电影免费观看| 天天做天天摸天天爽国产一区| 久久精品综合网| 欧美日韩不卡视频| 成人免费黄色在线| 免费观看一级欧美片| 亚洲日穴在线视频| 精品国产乱子伦一区| 欧美自拍偷拍一区| 国产成人av在线影院| 五月天亚洲婷婷| 亚洲靠逼com| 久久久噜噜噜久久人人看| 欧美日韩国产中文| fc2成人免费人成在线观看播放| 日韩中文字幕一区二区三区| 最新热久久免费视频| 久久婷婷综合激情| 日韩欧美一区二区免费| 欧美日韩一级二级| 91久久人澡人人添人人爽欧美| 国产黄色91视频| 激情综合网激情| 日本视频免费一区| 性做久久久久久久免费看| 亚洲免费大片在线观看| 国产拍欧美日韩视频二区| 精品捆绑美女sm三区| 日韩一区二区免费电影| 欧美日韩成人综合| 精品视频一区二区三区免费| 91麻豆免费视频| 91碰在线视频| 99riav久久精品riav| 丁香网亚洲国际| 国产成人在线看| 国产成人午夜视频| 国产98色在线|日韩| 国产麻豆精品久久一二三| 久久91精品久久久久久秒播| 蜜桃视频一区二区三区| 日本亚洲三级在线| 婷婷成人激情在线网| 日精品一区二区|