/coms3134_hearts

Data Structures Lab1 (Java)

Primary LanguageJava

Name: Nathan Hayes-Roth
UNI: nbh2113
Course: COMSW3134 - Data Structures
Assignment: Hearts

Inluded Files
Package: io
IO.java - Standard IO class provided in course resources.

Package: hearts
Card.java - Card defines a class of objects that represent individual playing cards. The program includes a single constructor as well as a number of methods, including getters, setters, and two toString methods.

Deck.java - Deck defines a class of objects that represent groups of cards. The program includes four constructors, methods to shuffle and sort, and two toString methods.

Deal.java - Deal reads a string version of a deck of cards from stdin, recreates the deck, and writes 4 separate 13-card decks (hands) in their string versions to stdout

Leader.java - Leader reads 4 hands from stdin (North, East, South, and West) and writes which hand contains the 2 of clubs to stdout

NewDeck.java - NewDeck produces a deck of 52 cards and prints a string version of it onto stdout.

Show.java - Show reads 4 hands from stdin and pretty-prints them to stdout.

Shuffle.java - Shuffle reads a string version of a deck of cards from stdin, recreates the deck, shuffles the deck, and writes the string version to stdout.