HW2 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ----------------------------------------------------------------------HW#1 SPECS----------------------------------------------------------------------HW#2 SPECSCS108, SPRING 2009----------------------------------------------------------------------HW#2 SPECSWrite code to create a "Circle" class.The Circle class should meet the following specs:* Circles should have the following 3 properties ("instance variables"):An x coordinate and a y coordinate, which store the coordinatesof the circle's center.A property named R, which stores the radius of the circle.Note: for the 3 properties, choose reasonable data types.* Your Circle class should have a default constructor,and a 3-parameter customized constructor.Note: your default constructor can create a "unit circle", if you want.* Circles should have a "whatsMyArea()" behavior ("instance method"):When a program gives this command to a particular circle object,that circle should compute and "return" its area to the calling routine....
View Full Document

Page1 / 3

HW2 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online