Sunday 24 June 2012

Homework

1. What keyword implements inheritance?
extends is the keyword for inheritance. 

 2. What is the name of the Component library we have used this week?
Swing

3. Provide the following links:
  1. java specification 7 :http://docs.oracle.com/javase/7/docs/api/
  2. java specification 7 - javax.swing: http://docs.oracle.com/javase/7/docs/api/javax/swing/colorchooser/package-summary.html
  3. java specification 7 - JPanel: http://docs.oracle.com/javase/7/docs/api/javax/swing/JPanel.html
  4. java specification 7 - JFrame: http://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html
  5. java specification 7 - JOptionPane: http://docs.oracle.com/javase/7/docs/api/javax/swing/JOptionPane.html

 
4. Describe/show a for loop that has been primed to start at 0 and continue 10 times.
starting condition | continuation condition | increment/decrement
for (int i =0; i < 10; i ++) {
}


5. What is a constructor?      
to create an instance or object  


6. What is the difference between a class and an object? http://javapants.blogspot.com.au/2012/03/what-is-class.html  

A class is the definition of something and object is a 

7. What keyword do we use to instantiate an object from a class?
new 

8. Describe the parameters required by the drawOval method. - 4 required.
  1. x screen coord
  2. y screen coord
  3. height to draw
  4. width to draw 







9. What do X & Y screen coordinates mean/refer to? 
X = Width 
Y = Hight

10. What is the top left coordinate of the screen? 
 0,0

 

No comments:

Post a Comment