Category Archives: Class activity

Chapter 6: ArrayList Project

Look in edmodo.com for the project due: (No partners)
Design and implement a class called Card that represents a standard playing card. Each card has a suit and a face value. A Card ADT represents a standard playing card.

Create a class called DeckOfCards that stores 52 objects of the Card class using ArrayList. Include methods to

  • Shuffle the deck. The shuffle method should assume a full deck.
  • Deal a card
  • Report the number of cards left in the deck
  • In addition:

  • Write the method “printForEach” to print all the cards in the deck using the “for-each” loop.
  • Write the method “printIterator” to print all the cards in the deck using the “ListIterator“.
  • Create a driver class with a main method that deals each card from a shuffled deck, printing each card as it is dealt.




  • 🃏

    PClassics: Challenging CS competition: Philadelphia Classic

    Screen Shot 2015-11-22 at 7.23.19 PM

    Philadelphia Classic Spring 2016 Contest

    Start from problems 4 on in class and for homework.
    Work with a partner. DO NOT LOOK FOR THE SOLUTIONS

    Pay special attention to the following:
    1. Make sure you read the instructions in the first 2 pages.
    2. Read the problem many times before you get started.
    3. Draft a plan on paper or a document before you start.
    4. Test parts of the code before you develop the “whole” program.
    5. Do not use outside help of any sort.
    6. All students have to turn in the assignments to edmodo.com

    Previous Contest Problems