o Simulate a deck of playing cards o Shuffle the deck o Deal 5 cards into the hand o Turn over the first card o The user must guess whether the next card.

Slides:



Advertisements
Similar presentations
MIXED BAG CHOSE TEAMS AND ONE CAPTAIN CHOSE TEAMS AND ONE CAPTAIN LOOK AT THE CATEGORY LOOK AT THE CATEGORY CHOSE THE TOP 5 ANSWERS CHOSE THE TOP 5 ANSWERS.
Advertisements

CHOSE TEAMS AND ONE CAPTAIN CHOSE TEAMS AND ONE CAPTAIN LOOK AT THE CATEGORY LOOK AT THE CATEGORY CHOSE THE TOP 5 ANSWER (S) CHOSE THE TOP 5 ANSWER.
Black Jack in Objective-C
1 CSC 222: Computer Programming II Spring 2004 HW1 review arrays vs. vectors class design object-oriented design data objects + functionality example:
1 / / / /. 2 (Object) (Object) –, 10 (Class) (Class) –, –, – (Variables) [ Data member Field Attribute](, ) – (Function) [ Member function Method Operation.
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Example - The.
© Glenn Rowe AC Lab 2 A simple card game (twenty- one)
1 Todays Objectives Announcements Homework #1 is due next week Return Quiz 1 – answers are posted on the Yahoo discussion page site Basic Java Programming.
It’s All in the Cards Adding and Subtracting Integers
Computer Science Project: BLACKJACK BY TEAM A. Overview of the Project Part A: Ramanathan Swaminathan, Zaith Peralta Ramos Game control, scoring and user.
Picture It Very Basic Game Picture Pepper. Original Game import java.util.Scanner; public class Game { public static void main() { Scanner scan=new Scanner(System.in);
13/04/2015Client-server Programming1 Block 6: Threads 1 Jin Sa.
INTERFACES IN JAVA 1.Java Does not support Multiple Inheritance directly. Multiple inheritance can be achieved in java by the use of interfaces. 2.We need.
EXAMPLES. Example 1: Write a Java method that performs addition on two binary numbers. Each binary number is kept in an integer array
Objects, Variables & Methods Java encapsulates data and action modules that access the data in one container, called an object. Object members that.
MATLAB PROJECT DO YOU WANT TO PLAY A GAME?. DESIGN CRITERIA For this project, you are required to implement any card game using MATLAB  All selections.
Welcome to Jeff’s baseball game! Here is how to play. You are asked a math question and you have to get it right or you will repeat the question until.
12 Pontoon1May Pontoon program CE : Fundamental Programming Techniques.
Design Example. Requirements Make a program that simulates the game of blackjack For now, we ignore money/betting…. just simulate game play But… this.
Elevens Lab Student Material – on website
CS 106 Introduction to Computer Science I 04 / 02 / 2008 Instructor: Michael Eckmann.
Building Memory… Notes from class on 11/13/06. The Game Think about what types of objects we will need in our system and some of the properties and capabilities.
Java Coding 8 David Davenport Computer Eng. Dept., Bilkent University Ankara - Turkey. Object-Oriented Design Examples.
COMP 14 Introduction to Programming Mr. Joshua Stough March 30, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218.
CS 106 Introduction to Computer Science I 11 / 08 / 2006 Instructor: Michael Eckmann.
Project 1 Blackjack simulation Graphics interface provided
Chapter 5 Black Jack. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 5-2 Chapter Objectives Provide a case study example from problem statement.
AP Computer Science.  Not necessary but good programming practice in Java  When you override a super class method notation.
Mau Mau (mow- mow) A card game
CS 106 Introduction to Computer Science I 04 / 07 / 2010 Instructor: Michael Eckmann.
o Simulate a deck of playing cards o Shuffle the deck o Deal (5) cards into the hand o Turn over the first card o The user must guess whether the next.
February 8: Decimal Day. WARM UP & UNDERSTANDING DECIMALS.
March 8: Decimal Day. SORTING ACTIVITY With your partner, sort your deck of decimal squares SHARE How did your team sort the deck? How do you think kids.
Ace to King OBJECTIVE: To increase visual attention, and visual/spatial memory abilities. EQUIPMENT: A deck of ordinary cards. EQUIPMENT: A deck of ordinary.
Jeopardy Start Click the Start button to go to the Category Board and begin the game. On the Category Board, click the button of your choice to select.
Black Jack MVC By Jeremy DiPaolo. Introduction Goal: To create a Black Jack game that takes advantage of the MVC framework. Uses many of the components.
Water Matters! Jeopardy Game Review of the Water Matters! Curricula Grades 6-8.
Poker UML and ADT design plan.
 CHOOSE TEAMS  LOOK AT THE CATEGORY  CHOOSE THE TOP 5 ANSWER (S)  1000 PEOPLE SURVEYED WORLDWIDE  CHECK THE SURVEY ANSWERS!
Inner and Anonymous Classes Though you are captive in the OO paradigm, you can use inner classes and anonymous classes to get around this constraint and.
Object Oriented Design. Object-Oriented Design Method for designing computer programs –Useful for thinking about large problems Consider “objects” interacting.
Math Games Compiled By: Joan Bartlett and Heather Bartlett.
1 CSC 221: Computer Programming I Spring 2008 Lists, data storage & access  ArrayList class  methods: add, get, size, remove, contains, set, indexOf,
Designing a Card Game Solitaire--Thirteens. Game.
Hello and welcome to who wants to be a Millionaire! On this game you will be asked 15 questions. It will then come up with 4 possible answers, 1 of which.
November 28, 2005ICP: Chapter 9: Object Oriented Programming 1 Introduction to Computer Programming Chapter 9: Object Oriented Programming Michael Scherger.
1 CSC 221: Computer Programming I Fall 2006 Lists, data storage & access  ArrayList class  methods: add, get, size, remove, contains, set, indexOf, toString.
 CHOSE TEAMS AND ONE CAPTAIN  LOOK AT THE CATEGORY  CHOSE THE TOP 5 ANSWER (S)  1000 PEOPLE SURVEYED WORLDWIDE  CHECK THE SURVEY ANSWERS!
Author Ivan Dominic Baguio. ABOUT THE GAME Game Objective  The goal of each player in the game is to discard all cards in his hand before every other.
Games. Traditional Games Blackjack Poker Baccarat American Roulette Craps Slot Machines, Wheel of Fortune Electronic Gaming Keno & Bingo.
Games We Play By James Ramdeo 8.2 STEM Club. Factors and Multiples is a game that can be played against one of friends. In this game you start with any.
FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University.
/** Feb 1996 Cay Horstmann */ import java.util.*; import corejava.*; public class EmployeeTest { public static void main(String[]
HANGMAN- Software/ Hardware Integration Project Idea was to design a working C++ program to play a Hangman word guessing game Idea was to design a working.
Sequential (Linear) Binary Selection** Insertion** Merge.
Georgia Institute of Technology More on Creating Classes Barb Ericson Georgia Institute of Technology June 2006.
Shlomo Hershkop Basics overview. Shlomo Hershkop Basic Review - Overview Practice coding Practice coding finger guessing game finger guessing.
© A+ Computer Science - Elevens is a lab about classes and Lists. List is a major concept being tested by the Elevens lab. Elevens.
Section 5.5 Application: The Card Game of War. 5.5 Application: The Card Game of War A deck of cards is shuffled and dealt to two players The players.
AP Java Elevens Lab.
How likely is it? Probability.
Chapter 5 Black Jack.
6.NS.5 Integer War You will need: deck of cards
Dot Cards Face-Off Game
CLICK HERE TO BEGIN THE GAME!!
Showing Relationships in UML
Task 2 Implementation help
CSC 205 Java Programming II
HOW TO PLAY PLAY.
HOW TO PLAY PLAY.
Presentation transcript:

o Simulate a deck of playing cards o Shuffle the deck o Deal 5 cards into the hand o Turn over the first card o The user must guess whether the next card is higher or lower o Turn over the next card o If the user guesses correctly, the game continues o If the user guesses correctly 4 times, the game is over and the user wins oIf the user guesses incorrectly, the game ends

Card Class Face Suit Rank is based upon the Face Implements the Comparable Interface Methods Constructor public String getFace() public String getSuit() public int getRank() public int compareTo(Object other)

Hand Class Represented as an array or as an ArrayList Methods Constructor public int getSize() public void addCard(Card c) public Card getCard(int i) private void changeCard(int pos,Card c) public void sort() private int findLowestIndex(int startIndex) public void printHand()

CardDeck Class Represented as a two-dimensional array of Card objects Methods Constructor public void shuffle() public Card deal() public void printDeck()

The User Clicks Higher

The User Clicks Lower

The User Clicks Higher

The User Is Wrong! Game Over

Blackjack War Games that use different card decks Extend the CardDeck class Games where Card ranks are different Extend the Card class