Comp Sci 6.4-6.9

Ace your homework & exams now with Quizwiz!

46. How many colors are built into the Expo class?

36

22. What is the mathematical definition of a circle?

A set of points in a plane that are equidistant from a given point.

26. When using drawOval, what will the output look like if the horizontal radius is greater than the vertical radius?

A short, fat oval is created.

27. When using drawOval, what will the output look like if the horizontal radius is less than the vertical radius?

A tall, skinny oval is created.

10. What does awt stand for?

Abstract windows tools

19. IDEs like jGRASP and JCreator have the ability to execute applets using a special program called _______________, which is part of the JDK.

AppletViewer

49. What file contains reference information for the Expo class.

Expo.html

15. An applet is a Java program that is designed to execute inside a web page. In order for this to work you need an _______ file

HTML

html?

Hypertext markup language

50. In order to use the Expo class, the file Expo.java must be located where?

In the same folder/directory as the .java that calls the Expo class methods.

4. What is the minimum requirement of any call to a graphics method?

Information about the location or coordinate for the picture

20. When you try to execute a Java applet in a web browser, it may still be blocked, even if you chose to "Allow" it. Why is that?

Many browsers no longer execute java for security reasons.

1. Is the Expo class part of the Java programming language?

No it is a special class created by John Schram.

6. List 2 differences between a Cartesian graph and a computer graphics screen.

The (0,0) coordinate of is located in the top left hand corner of the graphics window, and the Y values increase from top down to bottom in the computer graphics system.

5. What is the name of the coordinate system that has 4 quadrants and the point (0,0) in the center?

The Cartesian coordinate system

24. What parameters are necessary for drawCircle?

The X and Y coordinate for the center point as well as the radius.

12. What parameters are required by both drawPixel and drawPoint?

The X and Y value of the pixel or point.

23. What is the radius of a circle?

The distance from the center to any point on the edge of a circle

18. What happens to the file jgrasphta.html when jGRASP is closed?

The file is automatically erased.

14. The parameters of drawLine include 4 int value which are for 2 coordinate points.In terms of drawing the line, what do these points represent?

The first 2 integers specify the starting coordinate. The third and fourth integers specify the ending coordinate.

11. In the Expo class, what is the first parameter of any method that does anything graphical?

The first parameter is g, a Graphics object.

43. What happens when a small shape is drawn on top of a large shape that is the same color?

The shape will not appear.

21. Like drawLine, drawRectangle requires that you also specify 2 coordinate points.

The starting and stopping coordinates of the line or the upper-left-hand coordinate and lower right hand coordinate.

30. The first 5 parameters of drawArc are identical to drawOval. drawArc adds 2 more parameters at the end. What do these 2 parameters specify?

The starting degree value and the stopping degree value.

25. How is an oval different from a circle?

There are 2 radii.

17. Consider programs ExpoMethods01.java and ExpoMethods02.java. These are applets. How were we able to execute these programs from jGRASP without the special file mentioned in question #15?

Whenever you execute an applet in jGRASP, it actually creates the necessary HTML file for you

28. When using drawOval, what will the output look like if the horizontal radius is equal to the vertical radius?

a circle

7. What method is always found in an application?

a main method

Applets do not have main methods. What do they have instead?

a paint method

29. What is an arc a piece of?

an oval

9. What 2 libraries must be imported in order for graphics applets to work?

awt and applet

44. What is the default drawing color?

black

13. What is the difference between drawPixel and drawPoint?

drawPixel only draws one pixel. drawPoint actually draws a 3 by 3 "square" of 9 pixels.

42. Which 3 draw methods do not have corresponding fill methods?

drawPixel, drawPoint, and drawLine

48. If you want to draw PAC-MAN, what method would you use?

fillCircle, fillArc

47. If you want to draw solid rectangles, circles and ovals what methods would you use?

fillRectangle fillCircle fillOval

2. Which type of method has more parameters: Math methods or graphics methods?

graphics

3. Graphics images are not solid pictures, but images created with hundreds or thousands of individual colored dots. What are these individual graphics dots called?

pixels

45. What Expo method lets you change colors?

setColor

41. Does the order of the parameters matter ?

yes


Related study sets

Guyton Chapter 61 - Autonomic Nervous System

View Set

Chapter 15 - Integrated Marketing Communications

View Set

Surgery 1001-1200 ចម្លើយពេញ

View Set

MindTap: Worksheet 13.2: Performance and Discharge

View Set

Test 1, Discrete Data & Continuous Data

View Set

Quiz : Chapter 3 Self-awareness, Self-disclosure

View Set

Steps for Simplifying a Complex Fraction

View Set