Thursday 11 April 2013

Blog task: Questions


1. What keyword implements inheritance?

extends


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

javax.swing.   java.awt.


3. Provide the following links:

1.    java specification 7                 
http://docs.oracle.com/javase/7/docs/api/overview-summary.html

2.    java specification 7 - javax.swing                   
http://docs.oracle.com/javase/7/docs/api/javax/swing/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 – OptionPane
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.

int i;  
    for (i = 0; i <=10; i++) { }


5. What is a constructor?

The first method called when instantianting an object/class
A constructor sets variables for a class/object


6. What is the difference between a class and an object?

A class is an overall type of a thing     eg  Dog is a class
An object is an item of the class          eg  Terrier is an object of the Dog class


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

new


8. Describe the parameters required by the drawOval method.

x and y coordinates  -  for the start position of the draw 
width and height       -  to set the size of the oval/circle


9. What do X & Y screen coordinates mean/refer to?
x is the horizontal axis of the screen 
y is the vertical axis of the screen


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

0,0     or      x=0 , y=0

Original Post Apr 29th 2012

No comments:

Post a Comment