CodeLab 11.27.06 and 12.04.06

CodeLab 11.27.06 and 12.04.06 - CodeLab: 11.27.06 Write an...

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

View Full Document Right Arrow Icon
CodeLab : 11.27.06 Write an interface, PointingDevice, containing: an abstract method, getXCoord that returns an int an abstract method, getYCoord that returns an int an abstract method, attentionRequired that returns a boolean an abstract method, setResolution that accepts a double and returns a double public interface PointingDevice { int getXCoord(); int getYCoord(); boolean attentionRequired(); double setResolution(double x); } Write an interface named 'Test' with the following behavior: a method 'getDuration' that returns a 'Duration' object. a method 'check' that accepts an integer parameter and returns a 'Result' object. a method 'getScore' that returns a double. public interface Test { Duration getDuration(); Result check(int x); double getScore(); } CodeLab : 12.04.06 The superclass Calculator has already been defined and it contains: a (protected) double instance variable, accumulator, which contains the current value of the calculator. You are to write a subclass, CalculatorWithMemory, which contains:
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.

This note was uploaded on 03/29/2008 for the course CS 302 taught by Professor Willbenton during the Fall '07 term at Wisconsin.

Page1 / 3

CodeLab 11.27.06 and 12.04.06 - CodeLab: 11.27.06 Write an...

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