1. What keyword implements inheritance?
Extends is the keyword used to implement 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/SwingConstants.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.
for( int j = 0; j > 10; j++)
(j = 0) Starting condition, makes the loop start at 0
(j > 10) Continuation condition, Will loop as long as j is less then 10.
(j++) Increment/Decrement, Will increase the value of j as long as the continuation condition is met.
5. What is a constructor?
6. What is the difference between a class and an object?
Class: Defines all states and behaviors of an entity
Object: Is created from the class
7. What keyword do we use to instantiate an object from a class?
We use the keyword new.
8. Describe the parameters required by the drawOval method.
There are 4 parameters needed;
1. The X screen coordinate
2. The Y screen coordinate
3. Height to draw
4. Width to draw
9. What do X & Y screen coordinates mean/refer to?
The locations of were the your drawing too.
10. What is the top left coordinate of the screen?
0,0
No comments:
Post a Comment