6.092 | January IAP 2006 | Undergraduate

Java Preparation for 6.170

Labs

This course makes use of Athena, MIT’s UNIX-based computing environment. OCW does not provide access to this environment.

The labs for the course began after the lecture session and were designed to take one hour. During the lab sessions, students received assistance from the instructors. Since 6.092 was a preparatory class for MIT course 6.170, many of the lab assignments were taken from 6.170 material. The files (.properties and .css) are specific to the Lab 2 assignment.

DAY # ASSIGNMENTS SOLUTIONS
1 Lab 1: JavaTM Basics, Problems 1-4 (PDF) Lab 1 Solutions (PDF)

MathCalc.java (JAVA)
Primes.java (JAVA)
StringCharacters.java (JAVA)

2 Lab 1 (cont.): Balls and Boxes, problem 7 (PDF) Box.java (JAVA)
Ball.java (JAVA)
BallContainer.java (JAVA)
BoxTest.java (JAVA)
3 Lab 2: MadLibs: Hours of Linguistic Fun (PDF) junit.zip (ZIP) (The ZIP file contains: 100 .class files, 1 .css file, 6 .gif files, 1 .mf file, and 1 .properties file.)

lab2.tar.gz (GZ) (The GZ file contains: 7 .java files, 1 .classpath file, and 1 .project file.)

MadLib.java (JAVA)
MadLibTemplate.java (JAVA)
MadLibTest.java (JAVA)
MadHamlet.java (JAVA)
MadHello.java (JAVA)
StdStreamUI.java (JAVA)
UserInterface.java (JAVA)

4 Lab 3: Comparators and Ordering (PDF) lab3.tar.gz (GZ) (The GZ file contains: 6 .java files, and 1 java~ file.)

AntiAliasJButton.java (JAVA)
AntiAliasJLabel.java (JAVA)
ComparatorExample.java (JAVA)
ExtendedTableRenderer.java (JAVA)
PeopleComparator.java (JAVA)
Person.java (JAVA)