
Concept explainers
In java and UML diagram, Please show output and comment code out
Source file:
Each public class must be contained in a separate Java source file. Only one source file will have a
main() method and this source will be named BlackjackGameSimulator.java. Other source/class names
are up to you following the guidelines specified so far in the course. The format of the Java source
must meet the general Java coding style guidelines discussed so far during the course. Pay special
attention to naming guidelines, use of appropriate variable names and types, variable scope (public,
private, protected, etc.), indentation, and comments. Classes and methods should be commented with
JavaDoc-style comments (see below). Please use course office hours or contact the instructor directly if
there are any coding style questions. JavaDocs: Sources should be commented using JavaDoc-style
comments for classes and methods. Each class should have a short comment on what it represents and
use the @author annotation. Methods should have a short (usually 1 short sentence) description of what
the results are of calling it. Parameters and returns should be documented with the @param and
@return annotations respectively with a short comment on each. JavaDocs must be generated against
every project Java source file. They should be generated with a - private option (to document all
protection-level classes) and a –d [dir] option to place the resulting files in a javadocs directory/folder
at the same level as your source files. See the JavaDocs demonstration for more details.
Program Specification:
This project involves writing a program to simulate a blackjack card game. You will use a simple
console-based user interface to implement this game.
A simple blackjack card game consists of a player and a dealer. A player is provided with a sum of
money with which to play. A player can place a bet between $0 and the amount of money the player
has. A player is dealt cards, called a hand. Each card in the hand has a point value. The objective of the
game is to get as close to 21 points as possible without exceeding 21 points. A player that goes over is
out of the game. The dealer deals cards to itself and a player. The dealer must play by slightly different
rules than a player, and the dealer does not place bets. A game proceeds as follows: A player is dealt
two cards face up. If the point total is exactly 21 the player wins immediately. If the total is not 21, the
dealer is dealt two cards, one face up and one face down. A player then determines whether to ask the
dealer for another card (called a “hit”) or to “stay” with his/her current hand. A player may ask for
several “hits.” When a player decides to “stay” the dealer begins to play. If the dealer has 21 it
immediately wins the game. Otherwise, the dealer must take “hits” until the total points in its hand is
17 or over, at which point the dealer must “stay.” If the dealer goes over 21 while taking “hits” the
game is over and the player wins. If the dealer’s points total exactly 21, the dealer wins immediately.
When the dealer and player have finished playing their hands, the one with the highest point total is the
winner. Play is repeated until the player decides to quit or runs out of money to bet.
You must use an object-oriented solution for implementing this game.
What alternative design approaches were considered and why were they rejected?

Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images

- or this assignment, you will select either the Cat or the Dog Java class from the UML diagram. Open the Virtual Lab (Apporto) by clicking on the link in the Virtual Lab Access module. Then open your Eclipse IDE and create a new class. Use the Eclipse IDE Tutorial if you need help with creating a class in Eclipse. Before you begin, review the following UML Class Diagram, paying special attention to the attributes and behaviors of each class. As a note, though the diagram illustrates an inheritance relationship between the classes, the class you choose to implement does not have to inherit from the Pet class for the purposes of this assignment. You will learn more about implementing inheritance in later modules. Next, you will implement either the Cat or Dog Java class. Your class must meet all of the specifications from the UML Class diagram. Be sure to include the following in your Cat or Dog class: All attributes (variables) with appropriate data types. Note that the types are…arrow_forwardfinal big report project for java. 1.Problem Description Student information management system is used to input, display student information records. The GUI interface for inputing ia designed as follows : The top part are the student imformation used to input student information,and the bottom part are four buttonns, each button meaning : (2) Total : add java score and C++ score ,and display the result; (3) Save: save student record into file named student.dat; (4) Clear : set all fields on GUI to empty string; (5) Close : close the winarrow_forwardIn C++ Create a new project named lab8_1. You will be implementing two classes: A Book class, and a Bookshelf class. The Bookshelf has a Book object (actually 3 of them). You will be able to choose what Book to place in each Bookshelf. Here are their UML diagrams Book class UML Book - author : string- title : string- id : int- count : static int + Book()+ Book(string, string)+ setAuthor(string) : void+ setTitle(string) : void+ print() : void+ setID() : void And the Bookshelf class UML Bookshelf - book1 : Book- book2 : Book- book3 : Book + Bookshelf()+ Bookshelf(Book, Book, Book)+ setBook1(Book) : void+ setBook2(Book) : void+ setBook3(Book) : void+ print() : void Some additional information: The Book class also has two constructors, which again offer the option of declaring a Book object with an author and title, or using the default constructor to set the author and title later, via the setters . The Book class will have a static member variable…arrow_forward
- 4. Identify the benefits of using both Accessor and Mutator in Java. PS: Please answer it correctly and less confusing.arrow_forwardConduct a research on the CLASS in Java utilize the CLASS syntax. CLASS sample code in java, demonstrating how toarrow_forwardJava Question - Instructions are in the attached pictures. The picture titled "Screenshot..." are the instructions for building the specific code, while the "Final Output" picture shows what the output of the code should look like. Please make sure no errors show up in the Java compiler. Thank you.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





