Unix Commands | |
cd directoryName | |
Moves you to the directory directoryName | |
cd .. | |
Moves you "back" one directory, out of the one you are currently in | |
cp sourceFile destinationFile | |
Makes a copy of sourceFile and saves it as destinationFile | |
cp ~userA/sourceFile ~userB/destinationFile | |
Makes a copy of sourceFile from userA's files and saves it as destinationFile in userB's files. If the user name is left out, Unix assumes you're talking about your own files | |
DrawingPad Class | |
dp.drawRectangle(int x, int y, int width, int height) | |
Draws an empty rectangle starting at point (x,y) with the given width and height | |
dp.fillRectangle(int x, int y, int width, int height) | |
Draws a filled in rectangle starting at point (x,y) with the given width and height | |
dp.drawOval(int x, int y, int width, int height) | |
Draws an empty oval starting at point (x,y) with the given width and height | |
dp.fillOval(int x, int y, int width, int height) | |
Draws a filled in oval starting at point (x,y) with the given width and height | |
dp.drawTriangle(int x1, int y1, int x2, int y2, int x3, int y3) | |
Draws an empty triangle with verticies (x1, y1), (x2, y2), (x3, y3) | |
dp.fillTriangle(int x1, int y1, int x2, int y2, int x3, int y3) | |
Draws a filled in triangle with verticies (x1, y1), (x2, y2), (x3, y3) | |
dp.drawLine(int x1, int y1, int x2, int y2) | |
Draws a line from (x1, y1) to (x2, y2) | |
dp.setColor(color.colorName) | |
Sets the color of all following draw commands. colorName can be black, darkGray, gray, lightGray, white, red, green, blue, cyan, magenta, yellow, pink, or orange. | |
dp.setColor(double redPercent, double greenPercent, double bluePercent) | |
Sets the collor for all following draw commands to a set combination of red, green, and blue. Each value should be between 0.0 and 1.0 | |
Aquarium Class | |
Note: The Aquarium used for lab 6 MUST be calle "aqua" | |
aqua.resize(int x, int y) | |
Resizes the aquarium so it is x pixels wide and y pixels tall | |
aqua.addFish(fishName) | |
Adds a fish to the aquarium. fishName is the name of the fish to be added. | |
aqua.clear() | |
Clears all of the fish out of the aquarium |
Created by Beau Mack
19 February 1999