jdalbey

Skeleton of RoundTable class

Oct 13th, 2013
412
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.65 KB | None | 0 0
  1. /** A RoundTable is a table with numbered seats where
  2.  *  players participate in the hot potato game.
  3.  *  @author J. Dalbey    CPE 103
  4.  *  @version 2013.10.12
  5.  */
  6. public class RoundTable
  7. {
  8.     /** A numbered seat at the table. */
  9.     static class Seat
  10.     {
  11.         int value;  // the seat number
  12.         Seat next;  // link to next seat
  13.     }
  14.  
  15.     /** Create a round table with seats 1..size.
  16.      * @param size the number of seats to put in the table
  17.      * @return reference to last seat (which points to the
  18.      *          first seat, completing the circle).
  19.      * @pre size >= 1
  20.      */
  21.     public Seat create(int size)
  22.     {
  23.     }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment