0% found this document useful (0 votes)
37 views19 pages

Midterm Apr 072022

This document is a summary of a computer graphics midterm exam containing 50 multiple choice questions. The exam was taken by Michael John B. Serdan and they scored 49 out of 50 points. The exam covered topics such as Java swing components, 2D graphics, animation, and object-oriented programming concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views19 pages

Midterm Apr 072022

This document is a summary of a computer graphics midterm exam containing 50 multiple choice questions. The exam was taken by Michael John B. Serdan and they scored 49 out of 50 points. The exam covered topics such as Java swing components, 2D graphics, animation, and object-oriented programming concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

COMPUTER GRAPHICS MIDTERM EXAM


Total points 49/50

Email *
[email protected]

48. Animating objects using this timer is the most effective and accurate 1/1
way of animation. *

Thread

Timer

Standard utility

Swing timer

Lastname, Firstname, MI *
Serdan, Michael John B.

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 1/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

16. It defines an editable text field. It can have multiple lines. The swing 0/1
class that defines the text area is JTextArea and it inherits the
JTextComponent class. *

Frame

Button

TextArea

Dialog

20. It is a lightweight component that allows the editing of a single line of 1/1
text. *

JFrame

JTextField

JButton

JLabel

42. It is a process which displays only the information needed and hides 1/1
the unnecessary information. We can say that the main purpose of
abstraction is data hiding. *

Classes

Abstraction

Inheritance

Objects

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 2/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

46. This is the easiest timer but also the least effective way of animating 1/1
objects in Java games *

Standard utility

Timer

Swing timer

Thread

36. It is a representation of something else: something real or imaginary. 1/1


It can be textual, mathematical, graphical, or can use some other form of
symbolic representation. It is an abstraction. *

Design

Process

Models

Tools

19. It is is a top-level container that provides a window on the screen. * 1/1

JFrame

JButton

JLabel

JTextField

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 3/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

37. The step-by-step activities and related deliverables that are used to 1/1
model and construct software. *

Models

Tools

Process

Design

23. It is a basic set of rendering attributes for the outlines of graphics 1/1
primitives including width, end caps, line joins, miter limit, and dash. *

Point

Caps

Basic Stroke

Line

35. It is a bitmap image applied to a shape. In Java 2D, we use the 1/1
TexturePaint class. It is applied with the setPaint() method. *

Area

Textures

Shapes

Gradients

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 4/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

4. It is a converter that displays date & time conversion—locale-specific 1/1


full name of month. *

td

ty

te

tB

40. What is the Object name in this example? Public class Mybook {int 1/1
x=10; Public static void main (String args []) {Mybook Myobj= new
Mybook (); System.out.println(MyObj.x); } } *

Mybook

Public

Void Main

MyObj

5. A date & time conversion—hour in 12-hour clock. * 1/1

td

te

ty

tl

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 5/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

9. An escape sequence that tells the compiler to insert a double quote 1/1
character in the text at this point. *

\\

\[

\'

\"

30. This is where all of your painting code should be placed. * 1/1

paintChildren

paintBorder()

paintComponent()

39. These are called as instances of a class. They are created from class 1/1
in java or any other languages. Objects are those that have state and
behaviour. *

Abstraction

Objects

Classes

Inheritance

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 6/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

24. It joins path segments by connecting the outer corners of their wide 1/1
outlines with a straight segment. *

JOIN_BEVEL

JOIN_MITER

JOIN_ROUND

Option 3

1. The methods return true if the argument is not null and is an object of 1/1
the same type and with the same numeric value. *

boolean equals(Object obj)

short shortValue()

int compareTo(Float anotherFloat)

int compareTo(Short anotherShort)

11. It is a building process before building something. * 1/1

Design

Models

Process

Tools

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 7/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

21. Which of the following program editors require the least amount in 1/1
software requirement? *

Netbeans

IntelliJ

Eclipse

18. It allows us to select a specific range of values. In Java Swing API, 1/1
JSlider is the class that is used to implement the slider. *

Slider

Container

Applet

Frame

28. It is used to create a labeled button that has platform independent 1/1
implementation *

JFrame

JLabel

JButton

JTextField

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 8/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

27. It is a lightweight component that allows the editing of a single line of 1/1
text. *

JLabel

JFrame

JTextField

JButton

7. It is a Math class constant which is the ratio of the circumference of a 1/1


circle to its diameter. *

Math.PI

Math.E

Math.Dm

Math.Exp

32. These are decorations applied at the intersection of two path 1/1
segments and at the intersection of the endpoints of a subpath. There
are three decorations: JOIN_BEVEL, JOIN_MITER, and JOIN_ROUND. *

Basic Shapes

End Points

Caps

Joins

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd6… 9/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

50. It is responsible for the components’ layout in GUI applications and is 1/1
an interface implemented by all the layout manager classes. *

Frame

Container

LayoutManager

Border

12. Which of the following is NOT a characteristic of Java Swing? * 1/1

It is built on top of an abstract windowing toolkit API purely written in Java


programming language.

It provides lightweight and platform-independent components, making it suitable


and efficient in designing and developing desktop-based applications (systems).

It provides heavy, independent components for web-based application

It is used to create window-based applications which makes it suitable for


developing lightweight desktop applications.

10. An escape sequence that tells the compiler to insert a newline in the 1/1
text at this point. *

\nl

\l

\-

\n

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 10/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

6. A date & time conversion—minutes in 2 digits, with leading zeroes as 1/1


necessary. *

tp

tm

tM

ty

2. What is the output of the following syntax: 1/1


System.out.format("%,8d%n", n); *

461,012

+461012

461012

00461012

49. This command sets whether the frame can be resized * 1/1

setResize()

setFrame()

setFrameSize()

setResizable()

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 11/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

8. An escape sequence that tells the compiler to insert a tab in the text at 1/1
this point. *

\b

\n

\t

\r

26. It is used to display a short string or an image icon. It can display text, 1/1
image or both . It is only a display of text or image and it cannot get focus
*

JLabel

JTextField

JButton

JFrame

33. It joins path segments by extending their outside edges until they 1/1
meet *

JOIN_ROUND

JOIN_BEVEL

JOIN_MITER

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 12/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

22. Which of the following program editors provides 1250+ plugins * 1/1

IntelliJ

Netbeans

Eclipse

47. This timer is very similar to swing timer but uses the java.util.timer 1/1
instead of the javax.Swing.Timer. For Java Swing games this way is more
accurate. *

Standard utility

Swing timer

Timer

Thread

17. It is a component that is used to create a push button with a name or 1/1
label on it. In swing, the class that creates a labeled button is JButton. *

TextArea

Frame

Dialog

Button

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 13/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

45. It is a rapid display of sequence of images which creates an illusion of 1/1


movement. *

Graphics

Video

Animation

Illusion

29. Which of the following program editors mainly focus on android 1/1
development and java projects. *

Eclipse

Netbeans

IntelliJ

34. It joins path segments by rounding off the corner at a radius of half 1/1
the line width. *

JOIN_ROUND

JOIN_BEVEL

JOIN_MITER

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 14/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

15. It is a container that can contain other components such as buttons, 1/1
labels, text fields, etc and can contain a title, a border, and also menus,
text fields, buttons, and other components. *

Dialog

Container

Applet

Frame

14. Which of the following is NOT included in JComponent? * 1/1

JList

JLabel

Dialog

JTable

13. It provides a space in which we can display components and also 1/1
manage their spacing, layout, etc. *

Panel

Button

Container

Frame

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 15/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

3. What is the output of the following syntax: public class 1/1


BasicMathDemo { public static void main(String[] args) { double a =
-191.635; double b = 43.74; int c = 16, d = 45;System.out.printf("The min of
of %d " + "and %d is %d%n", c, d, Math.min(c, d)); *

The min of 16 and 45 is 16

The rint of 43.74 is 44

The floor of 43.74 is 43

The max of 16 and 45 is 45

25. In computer graphics, it is a smooth blending of shades from light to 1/1


dark or from one colour to another. In 2D drawing programs and paint
programs, these are used to create colorful backgrounds and special
effects as well as to simulate lights and shadows. *

Textures

Gradients

Shapes

Area

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 16/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

43. It is a method in which one object acquires/inherits another object’s 1/1


properties, and inheritance also supports hierarchical classification. *

Objects

Inheritance

Classes

Abstraction

Course/Year/Section *
CEIT-37-401A

31. It is a simple graphics primitive and an object which connects two 1/1
points. It is drawn with the drawLine() method. *

Shapes

Point

Line

Star

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 17/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

44. It refers to many forms, or it is a process that performs a single action 1/1
in different ways. It occurs when we have many classes related to each
other by inheritance. *

Inheritance

Hierarchical Level

Hybrid Inheritance

Polymorphism

38. It is the process of using an object-oriented methodology to design a 1/1


computing system or application. This technique enables the
implementation of a software solution based on the concepts of objects.
*

Programming

Computing System

Conceptualization

Object Oriented Design

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 18/19
4/7/22, 4:40 PM COMPUTER GRAPHICS MIDTERM EXAM

41. These are like object constructors for creating objects. The collection 1/1
of objects is said to be a class. They are said to be logical quantities. They
don’t consume any space in the memory. *

Inheritance

Objects

Abstraction

Classes

This content is neither created nor endorsed by Google. - Terms of Service - Privacy Policy

 Forms

https://docs.google.com/forms/d/e/1FAIpQLSfPIbK0LmJCL5Wl06YgeFy66ugaKRM395PW2OdzGoEGQ8Q0lA/viewscore?hr_submission=ChkI4oLd… 19/19

You might also like