600.321/421, Object Oriented Systems
Smalltalk Assignment 1
Due: Friday Sep 25, 5PM

Before doing this assignment it is strongly suggested you work through Chapter 4 of Liu in VisualWorks.

Code the following Grade class in a new class category named precisely Assignment1.

The built-in libraries of Smalltalk make very effective use of abstract classes. The Magnitude class is an abstract class which allows comparisons <, =, etc. Date, Time, Character are all subclasses of Magnitude.
Write a new magnitude class Grade, a subclass of Magnitude, which is a letter grade ranging from F- to A+.

Clarifications

On 9-23 at 11AM, the following clarifications were added:
  1. A < A+ is true.
  2. F- is worth -.3. This assignment is not asking that the bottom of the grade scale be implemented properly, Hopkins actually has no D-, F+, or F- grades. Assume it does.
  3. Don't store the grade internally as a string since they are not so efficient.

Coding Style

Well, its only your first crack but its never too early to work on good coding practices. Here are some initial guidelines. The system classes serve as an excellent model for what to follow.

Submission Instructions

Use the file out as.. menu option on the class category list to file out your class category as Assignment1.st, and then submit this file from hops via the precise (no exceptions in names, please) hops command
~scott/bin/submit Assignment1 Assignment1.st
(The general format for this command is the name of the assignment followed by the file(s) submitted)

You will need to ftp your files to hops first if you are working on some other machine.

Don't submit a .im file, they are too big! Use the file in/out tool instead.

You can check what files you submitted via

~scott/bin/query
All of your solutions should work in VisualWorks Smalltalk 3.0.