Create Software Components 

Using Java Level 2

 

 

Course Info

Scheme

Resources

Tutorials

Java Demos

Utilities

Links


 

    Quiz 7 - Answers

Graphics Methods

 

Question 1.   

(d) g.drawOval (60,60,40,40);

Remember: the radius is only half the height and width of a circle, (diameter.)

Question 2.         

(b) g.fillArc (10,10,50,50, 0, 90); 

Question 3.         

(c) g.fill3DRect (10,10,100,100, true);  

Question 4.   

(b) g.drawRect (10,10,100,100);

Question 5.         

(d) g.drawLine(10,10,10,110);  

Question 6.         

drawString

(take note of the capital S)

Question 7.         

setColor

(take note of the capital C and American spelling of Color)

Question 8.    

(d) Font aFont = new Font( "Arial", Font.BOLD + Font.ITALIC, 12 );

Question 9.         

setFont

(take note of the capital F)

Question 10.   

(a) Color aColor = new Color( 50,0,0 );

Note:- don't forget, method names start with a lowercase letter while classes start with a capital letter.

 

        

 

  Site Home 

Java Home   

  Forum  

Course Info

Welcome

Overview

Assessment

Qualification

Scheme of Work

Assignments

Resources

Information

Blackboard

Learning Center

Web Materials

Reading

Java Demos

Utilities

Links

Lecture Materials

Tutorials & Notes

Exercises

Activities

Quizzes

 

Site Home

Top

Unit Home

ADR 2002