quiz7 - Name: _ Section: Dave's 15-100 M N O P March 4,...

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

View Full Document Right Arrow Icon
1 Name: ____________________ Section: M N O P Dave's 15-100 March 4, 2009 Quiz 7 20 Minutes
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Reference Location Class Location (int row, int col) int getRow () int getCol () Color Class Color (int red, int green, int blue) int getRed () int getGreen () int getBlue () World Class World (int numRows, int numCols) World (String imageFileName) int getNumRows () int getNumCols () Color getColor (Location loc) void setColor (Location loc, Color c) HW7 File static void makeGray (World w)
Background image of page 2
3 1. Consider the following variable declarations. Location loc; Color c; World w; Assuming these variables have also been initialized appropriately, indicate which of the following statements are consistent with the Location , Color , and World classes from Homework 7 (listed on the previous page). Circle your answers. c = World.getColor(loc); valid invalid w.setColor(loc, new Color(255, 0, 0)); valid invalid c = new Color(0.5, 0.5, 2.0); valid invalid w.setColor(loc, c.getRed()); valid invalid c.getRed() = 255; valid invalid c = loc.getColor(); valid invalid
Background image of page 3

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

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

Page1 / 6

quiz7 - Name: _ Section: Dave's 15-100 M N O P March 4,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online