CSC113_Lab6 - King Saud University College of Computer and...

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

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, March 26, 2011 lab #6 : Polymorphism Implementations of classes Point and TestShape are given. Determine abstract methods and classes then implement classes: Shape, Circle and Rectangle based on the class diagram and description below: Class Shape has: An attributes of type Point, specifies the center of the shape object. A constructor that allows to initialize the center attribute with the value of the passed parameter A method that takes an object of type Point as a parameter and returns true if the point resides within the shape’s area, and false otherwise. Class Circle has: An attribute of type integer specifies the radius measure of the circle A constructor that takes a Point parameter to initialize the center and an integer parameter to initialize the radius A getRadius method to return the value of the attribute radius
Background image of page 1

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

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

Page1 / 3

CSC113_Lab6 - King Saud University College of Computer and...

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