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

April 25

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

Examples from April 25

Today we worked with one large example of Interfaces:

Point2D.java PointXY.java PointXYZ.java and Application.java File Point2D.java contains an interface for two dimensional points. We give two different implementations of this interface: PointXY.java and PointXYZ.java. The Application class makes use of these classes. In particular, it has a distance() method that takes arguments of type Point2D, regardless of which of the implementing classes these arguments come from.

 

 

 

 

 

 

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: