CS 251 Lab

Lab- 10/31/06

TrainCar is a class describing a single train car with a certain type. TrainDriver contains methods for manipulating linked lists as well as a main driver method.

TrainCar.java
TrainDriver.java

Lab- 10/24/06

Address is a class that contains fields for an address entry. HashMapExample uses Address to create mappings of people's names to Address objects. Of course this does not completely take advantage of HashMap's functionalities or even of hash tables, but it is sufficient enough to understand how to use a HashMap for an ID3Tag, for example.

Address.java
HashMapExample.java

Lab- 10/17/06

MusicSelection is a class which contains an inner class, ID3TagParser, which contains a parse() method used to parse an ID3 tag. The purpose is to understand how the parser would read an MP3 file and extract the information that it needs from the ID3 tag:

MusicSelection.java (Removed. I encourage you to come up with your own solutions to parse an ID3Tag. It's not that difficult! Just read the ID3 spec and understand the layout of an ID3 tag so you know exactly what to grab.)

Note that this parse method returns an ID3Tag object. You are responsible for writing the ID3Tag class, which will contain getters and setters to manipulate all data associated with an ID3 tag. You must also write an ID3TagException, which is thrown whenever the parser encounters an invalid ID3 tag field/byte/etc.

Lab- 9/26/06

Part of the GUI code for Project 3: Tetris Visualizer

VisualizeExample.java