This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 27th, 2014  |  syntax: None  |  size: 0.64 KB  |  views: 2  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. public class Dyad extends Ball  
  3. BEGIN  
  4.  
  5.    public Dyad() // constructor
  6.    BEGIN
  7.       Ball() // call constructor method of super class
  8.    END
  9.    
  10.    public void draw() // over rides draw method of super class
  11.    BEGIN
  12.       integer radius = SuperClass.getRadius()
  13.       integer x = SuperClass.getX()
  14.       integer y = SuperClass.getY()
  15.       set colour for drawing to color
  16.       drawFilledOval in bounding rectangle,
  17.                 top left (x, y), bottom right (x + 2*radius, y + 2*radius)
  18.       drawFilledOval in bounding rectangle,
  19.                 top left (x+radius, y), bottom right (x + 3*radius, y + 2*radius)
  20.    END
  21.    
  22. END  // end class Dyad
clone this paste RAW Paste Data