SDSU CS 535 Object-Oriented Programming & Design
Fall Semester, 2001
Assignment 1
    Assignment Index        
© 2001, All Rights Reserved, SDSU & Roger Whitney
San Diego State University -- This page last updated 13-Sep-01

Assignment 1
Due September 20

Implement in VisualWorks a class SimpleCircle. The class should have the following methods.

Class methods

origin: aPoint radius: aNumber
"Returns an instance with the given origin and radius"

radius: aNumber origin: aPoint
"Returns an instance with the given origin and radius"

Instance methods

radius
"returns the radius of the circle"

origin
"returns the origin of the circle"

area
"returns the area of the circle"

includes: aPoint
"Returns true if aPoint is on or inside the circle"

The class methods are to be in a category called "instance creation". The method includes: is to be in a category called "testing". The remaining methods are to be in a category called: "accessing".

Copyright ©, All rights reserved.
2000 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.

    visitors since 13-Sep-01