Computer Programming II 2nd Half Review Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Justinsmith
J
Justinsmith
Community Contributor
Quizzes Created: 9 | Total Attempts: 42,938
| Attempts: 207 | Questions: 23
Please wait...
Question 1 / 23
0 %
0/100
Score 0/100
1. Applets use a X and Y coordinate system.

Explanation

Applets use a X and Y coordinate system because they are graphical programs that are designed to be embedded within web pages. The X and Y coordinate system allows applets to position and manipulate graphical elements on the screen. This system is commonly used in computer graphics to represent the location of objects in a two-dimensional space. Therefore, the statement "Applets use a X and Y coordinate system" is true.

Submit
Please wait...
About This Quiz
Computer Programming II 2nd Half Review Quiz - Quiz

How are you when it comes to computer programming now that we have undergone that extensive course on some basic languages in use today? Below is a quiz... see moreto review the material from the 2nd half of the Metcalfe County high school`s computer programming II course. Give it a try and get to see just how attentive you have been this past year. All the best! see less

2. Custom colors can be added into a Java applet

Explanation

In Java, custom colors can be added into a Java applet. The Graphics class in Java provides methods such as setColor() that allow developers to specify custom colors using RGB values. These custom colors can then be used to draw shapes, fill areas, or set the background color in a Java applet. Therefore, the statement "Custom colors can be added into a Java applet" is true.

Submit
3. Print and println are the same

Explanation

The statement "print and println are the same" is false. Although both "print" and "println" are used to display output in programming, they have different functionalities. "print" displays the output without adding a new line, while "println" displays the output and adds a new line after it. This subtle difference allows for more control over the formatting and presentation of the output.

Submit
4. Applets and Applications are coded the same way.

Explanation

Applets and Applications are not coded the same way. Applets are small applications that are designed to run within a web browser, while applications are standalone programs that can be run independently. Applets are typically written in Java and require a Java Virtual Machine to run, whereas applications can be written in various programming languages and do not require a specific runtime environment. Therefore, the statement that "Applets and Applications are coded the same way" is false.

Submit
5. Which of the following would be used to draw a curved line within a Java Applet?

Explanation

The drawArc method in Java Applet is used to draw a curved line. It allows the programmer to specify the starting and ending angles, as well as the width and height of the arc. This method is commonly used to create curved shapes or to draw portions of circles. Therefore, drawArc is the correct choice for drawing a curved line within a Java Applet.

Submit
6. Within Java an oval is always drawn inside of a__________ _________

Explanation

In Java, when drawing an oval, it is always drawn inside a bounding rectangle. The bounding rectangle is a rectangle that completely encloses the oval shape. This rectangle acts as a reference frame for the oval, determining its position and size. The oval is then drawn within this rectangle, ensuring that it fits perfectly inside. This approach allows for easy manipulation and positioning of the oval shape within the Java program.

Submit
7. TThe Java standard class library is part of any Java development environment

Explanation

The Java standard class library is a collection of pre-written classes and interfaces that provide a wide range of functionality for Java developers. It includes classes for input/output, networking, data structures, GUI components, and much more. This library is an integral part of any Java development environment and is automatically included when setting up a Java project. Therefore, the statement "The Java standard class library is part of any Java development environment" is true.

Submit
8. Which of the following classes would allow random numbers to be generated?

Explanation

The Random class would allow random numbers to be generated. The Math class provides mathematical functions but does not generate random numbers. The Keyboard class is not a standard class in most programming languages and does not have a built-in function for generating random numbers. The String class is used for manipulating and working with strings, not generating random numbers. Therefore, the correct class for generating random numbers is the Random class.

Submit
9. When using JCreator a shortcut to run the current program is_________

Explanation

When using JCreator, the shortcut to run the current program is F5. This shortcut allows users to quickly execute their code without having to navigate through menus or use the mouse. It is a commonly used shortcut in many programming environments and helps to streamline the development process.

Submit
10. What do the first two numbers in page.drawLine (10, 20, 150, 45); mean?

Explanation

The first two numbers in the page.drawLine function represent the X and Y coordinates. In this case, the line will start at the point (10, 20) on the page and end at the point (150, 45). The X coordinate determines the horizontal position, while the Y coordinate determines the vertical position.

Submit
11. The X,Y coordinate in the upper left hand corner of an Applet screen would be___,____.

Explanation

The X,Y coordinate in the upper left hand corner of an Applet screen is (0,0) because the coordinate system used in computer graphics and programming typically starts at (0,0) in the upper left corner of the screen. This means that the X-axis increases as you move to the right and the Y-axis increases as you move down the screen. Therefore, the upper left corner has the coordinates (0,0).

Submit
12. Page.setColor (new Color(255,255,255)); would set the color within an Applet to.

Explanation

The given code page.setColor (new Color(255,255,255)); sets the color within an Applet to white. The values (255,255,255) represent the RGB values for white, where each value ranges from 0 to 255. Therefore, the correct answer is White.

Submit
13. Applets open up using what program within JCreator?

Explanation

Applets open up using the program called AppletViewer within JCreator. This program allows developers to view and test their applets before deploying them on the web. It provides a virtual environment for running and debugging applets, making it an essential tool for applet development.

Submit
14. Which of the following is not a part of the Java standard class library

Explanation

The System class and String class are both part of the Java standard class library, which contains a collection of pre-defined classes and interfaces that provide commonly used functionality. However, the Keyboard class is not a part of the Java standard class library. It is likely a custom class that is not included in the standard library.

Submit
15. Creating an object is called

Explanation

Instantiation refers to the process of creating an object from a class. It involves allocating memory for the object and initializing its state. In other words, instantiation is the act of creating an instance of a class, which can then be used to access the methods and properties defined within that class. Therefore, the correct answer for this question is "instantiation".

Submit
16. Page.setColor (new Color(0,0,0)); would set the color within an Applet to.

Explanation

The given code is setting the color within an Applet to black. The method setColor is being called on the page object, and a new Color object is being passed as an argument with RGB values (0,0,0), which represents black. Therefore, the color within the Applet will be set to black.

Submit
17. A ___________ is a collection of classes that we can use when developing programs.

Explanation

A class library is a collection of classes that can be utilized during program development. It provides a set of pre-defined classes that can be used to create objects and perform various operations. By using a class library, developers can save time and effort by reusing existing classes instead of creating them from scratch. This allows for more efficient and streamlined programming, as well as promoting code consistency and modularity.

Submit
18. One can use negative values within x,y coordinates when designing a Java Applet?

Explanation

In Java Applet, negative values within x, y coordinates can be used. This allows for positioning elements or drawing graphics outside the visible area of the applet window. It can be useful in certain cases, such as when creating animations or implementing scrolling functionality.

Submit
19. An applet doesn't have a _______ method

Explanation

An applet doesn't have a main method because the main method is the entry point for standalone Java applications, not applets. Applets have a different lifecycle and are typically embedded within webpages and run within a web browser. Instead of a main method, applets have init, start, stop, and destroy methods that are called at different stages of the applet's lifecycle.

Submit
20. How many numbers must be supplied with the drawArc method?

Explanation

The drawArc method in programming typically requires six numbers to be supplied. These numbers represent the coordinates and dimensions of the arc to be drawn, including the starting point, width, height, and angles. By providing these six numbers, the drawArc method can accurately render the desired arc on the screen or canvas.

Submit
21. The Keyboard class is part of a package called_________

Explanation

The correct answer is Cs1. The Keyboard class is part of the Cs1 package.

Submit
22. What do the 2nd two numbers in page.drawLine (10, 20, 150, 45); mean?

Explanation

The 2nd two numbers in the page.drawLine function (10, 20, 150, 45) represent the width and height of the line being drawn. The first two numbers (10, 20) correspond to the starting point of the line, while the last two numbers (150, 45) represent the ending point. Therefore, the 2nd two numbers determine how wide and tall the line will be on the page.

Submit
23. Which of the following is not a part of the string class?

Explanation

The toString method is not a part of the string class. The toString method is a method of the Object class, which is the superclass of all classes in Java. It is used to return a string representation of an object. However, the other options (compareTo, length, and concat) are all methods that are directly available in the string class. The compareTo method is used to compare two strings lexicographically, the length method is used to return the length of a string, and the concat method is used to concatenate two strings.

Submit
View My Results

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Feb 06, 2011
    Quiz Created by
    Justinsmith
Cancel
  • All
    All (23)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Applets use a X and Y coordinate system.
Custom colors can be added into a Java applet
Print and println are the same
Applets and Applications are coded the same way.
Which of the following would be used to draw a curved line within a...
Within Java an oval is always drawn inside of...
TThe Java standard class library is part of any Java development...
Which of the following classes would allow random numbers to be...
When using JCreator a shortcut to run the current program is_________
What do the first two numbers in page.drawLine (10, 20, 150, 45);...
The X,Y coordinate in the upper left hand corner of an Applet screen...
Page.setColor (new Color(255,255,255)); would set the color within an...
Applets open up using what program within JCreator?
Which of the following is not a part of the Java standard class...
Creating an object is called
Page.setColor (new Color(0,0,0)); would set the color within an Applet...
A ___________ is a collection of classes that we can use when...
One can use negative values within x,y coordinates when designing a...
An applet doesn't have a _______ method
How many numbers must be supplied with the drawArc method?
The Keyboard class is part of a package called_________
What do the 2nd two numbers in page.drawLine (10, 20, 150, 45);...
Which of the following is not a part of the string class?
Alert!

Advertisement