Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 150 4.29.05 April 27
Document Actions

April 27

by admin last modified 2005-05-11 13:33

Examples from April 29

Today we worked with two simple programs that use the Comparable interface to facilitate sorting. Both call predefined
methods to sort structures whose base types are in class Person, which implements Comparable:

Person.java PersonList.java does this with LinkedLists

Person.java PersonArray.java does this with arrays.

Then we did a first example of subclasses. Class Point is a simple class; Class ColoredPoint is a subclass of Point:

Point.java ColoredPoint.java PointApplication.java

 

 

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: