Quiz Flashcards

1
Q

Base Class of Java?

A

Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Swing Classes in Unit 2

A

JFrame, JPanel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe Public and Private. What are they?

A

Public and Private are access modifiers. Public allows fields or methods to be accessed outside of the class in which it is defined. Private fields and methods only can be accessed inside the class it is defined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Write statement you would call to include all of the swing classes to code.

A

Import Javax.swing*;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which JPannel method gets called when the screen is repainted?

A

Paintcomponent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the data that belong to class or object called?

A

fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are code that implements the behavior of an object?

A

methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What arguments fillRect or fillOval

A

start x, end x, width, height.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are arguments of draw line method?

A

start x, start y, end x, end y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you set the current color of the graphic context?

A

g.SetColor(Color)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you define a Panel?

A

JPannel myPanel = new JPanel();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you set a size to panel?

A

myPanel.setSize(600, 400)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where is the +x and +y plane?

A

Quadrant 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you set color?

A

g.setcolor(color.green);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly