Disk -...

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: //******************************************************************** // Disk.java Author: Lewis/Loftus // // Solution to Programming Project 11.11 // // Encapsulates a disk in the grapical Towers of Hanoi solution //******************************************************************** import java.awt.Color; import java.awt.Graphics; class Disk { int diskSize; static final int HEIGHT = 20; static final int WIDTH_STEP = 20; static final int ARC_WIDTH = 5; static final int ARC_HEIGHT = 5; static final Color DISK_COLORS = { Color.black, Color.red, Color.blue, Color.yellow, Color.green, Color.orange, Color.magenta, Color.gray, Color.pink }; //----------------------------------------------------------------- // Creates a disk of specified size //----------------------------------------------------------------- Disk(int size) { diskSize = size; } //----------------------------------------------------------------- // Returns the size of the disk //-----------------------------------------------------------------...
View Full Document

Page1 / 2

Disk -...

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