OpenStax-CNX module: m Java3002r Review * R.G. (Dick) Baldwin

Similar documents
Java3002: Creating and Manipulating Turtles and Pictures in a World Object

Java3002: Creating and Manipulating Turtles and Pictures in a World Object *

Java3018: Darkening, Brightening, and Tinting the Colors in a Picture *

Java4340r: Review. R.G. (Dick) Baldwin. 1 Table of Contents. 2 Preface

Java OOP: Java Documentation

Java0078 Java OOP Callbacks - II *

Hs01006: Language Features, Arithmetic Operators *

Java4350: Form Processing with JSP

INEW Advanced Java Programming. Collection Editor: R.G. (Dick) Baldwin

Authoring OpenStax Documents in Apache OpenOffice Writer *

AP Computer Science A, Clarification of the Java Subset. By: R.G. (Dick) Baldwin

Java4320: Web Programming Model *

Accessible Objected-Oriented Programming Concepts for Blind Students using Java. By: R.G. (Dick) Baldwin

Java4570: Session Tracking using Cookies *

Multimedia Programming with Java Getting Started

The json-simple Java Library. By: R.G. (Dick) Baldwin

Java OOP: Modifications to the Turtle and SimpleTurtle Classes

Polymorphism - The Big Picture *

How to make a "hello world" program in Java with Eclipse *

Morse1010 Translating Text to Morse Code *

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

Using Flex 3 in a Flex 4 World *

Chapter 4 Defining Classes I

GAME : Vector Addition *

The Processing Programming Environment. By: Richard Baldwin

CmSc 150 Fundamentals of Computing I. Lesson 28: Introduction to Classes and Objects in Java. 1. Classes and Objects

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Introduction to Programming Using Java (98-388)

Java and OOP. Part 2 Classes and objects

COMP 250 Winter 2011 Reading: Java background January 5, 2011

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Object Oriented Programming in C#

TOPIC 8 MORE ON WHILE LOOPS

CS 302 Week 9. Jim Williams

Unit Testing with JUnit in DrJava *

Pace University. Fundamental Concepts of CS121 1

CMSC 132: Object-Oriented Programming II

The Essence of OOP using Java, Nested Top-Level Classes. Preface

Rules and syntax for inheritance. The boring stuff

Java. Classes 3/3/2014. Summary: Chapters 1 to 10. Java (2)

Declarations and Access Control SCJP tips

Binghamton University. CS-140 Fall Problem Solving. Creating a class from scratch

Object Oriented Programming

COMP 202. More on OO. CONTENTS: static revisited this reference class dependencies method parameters variable scope method overloading

CS 231 Data Structures and Algorithms, Fall 2016

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

CS1004: Intro to CS in Java, Spring 2005

Java: Classes. An instance of a class is an object based on the class. Creation of an instance from a class is called instantiation.

Day 4. COMP1006/1406 Summer M. Jason Hinek Carleton University

This Week. Fields and Variables. W05 Example 1: Variables & Fields. More on Java classes. Constructors. Modifiers

COP 3330 Final Exam Review

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

A foundation for programming. Classes and objects. Overview. Java primitive types. Primitive types Creating your own data types

Java Magistère BFA

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

Encapsulation. Administrative Stuff. September 12, Writing Classes. Quick review of last lecture. Classes. Classes and Objects

Lecture 2: Java & Javadoc

Principles of Object Oriented Programming. Lecture 4

ASSIGNMENT 4 Classes and Objects

Chapter 4 Java Language Fundamentals

3.1 Class Declaration

Java1486-Fun with Java, Understanding the Fast Fourier Transform (FFT) Algorithm *

Xna0118-The XNA Framework and. the Game Class

Chapter 4: Writing Classes

Object-Oriented Programming Concepts

Table of Contents Date(s) Title/Topic Page #s. Chapter 4: Writing Classes 4.1 Objects Revisited

Introduction to Java

Chapter 4. Defining Classes I

Classes Classes 2 / 35

CS 1316 Exam 1 Summer 2009

Islamic University of Gaza Faculty of Engineering Computer Engineering Department

CLASSES AND OBJECTS. Fundamentals of Computer Science I

11/19/2014. Objects. Chapter 4: Writing Classes. Classes. Writing Classes. Java Software Solutions for AP* Computer Science A 2nd Edition

CSCE3193: Programming Paradigms

ASSIGNMENT 5 Objects, Files, and a Music Player

Classes Classes 2 / 36

JAVA: A Primer. By: Amrita Rajagopal

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable?

CLASSES AND OBJECTS. Fundamentals of Computer Science I

GAME Motion Displacement and Vectors

Operations. I Forgot 9/4/2016 COMPUTER SCIENCE DEPARTMENT PICNIC. If you forgot your IClicker, or your batteries fail during the exam

MIDTERM REVIEW. midterminformation.htm

Objects and Classes -- Introduction

Super-Classes and sub-classes

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists

Object-Oriented Programming in Java

Computer Science II (20073) Week 1: Review and Inheritance

Java Fundamentals (II)

Objects and Iterators

Handout 7. Defining Classes part 1. Instance variables and instance methods.

Distributed Systems Recitation 1. Tamim Jabban

엄현상 (Eom, Hyeonsang) School of Computer Science and Engineering Seoul National University COPYRIGHTS 2017 EOM, HYEONSANG ALL RIGHTS RESERVED

390 Object-Based Programming Chapter 8. Copyright 2002 by Deitel & Associates, Inc. and Prentice Hall. All Rights Reserved.

TOPIC 12 CREATING CLASSES PART 1

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

COMP-202 Unit 8: Defining Your Own Classes. CONTENTS: Class Definitions Attributes Methods and Constructors Access Modifiers and Encapsulation

Chapter 6 Lab Classes and Objects

What will this print?

Prelim 1. CS 2110, October 1, 2015, 5:30 PM Total Question Name True Short Testing Strings Recursion

Transcription:

OpenStax-CNX module: m45762 1 Java3002r Review * R.G. (Dick) Baldwin This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 4.0 Abstract This module contains review questions and answers keyed to the module titled Java3002: Creating and Manipulating Turtles and Pictures in a World Object. Revised: Sat Apr 02 14:17:44 CDT 2016 This page is included in the following Books: ITSE 2321 - Object-Oriented Programming (Java) 1 Object-Oriented Programming (OOP) with Java 2 1 Table of Contents Preface (p. 1) Questions (p. 2) 1 (p. 2), 2 (p. 2), 3 (p. 2), 4 (p. 2), 5 (p. 3), 6 (p. 3), 7 (p. 3), 8 (p. 3), 9 (p. 3), 10 (p. 3), 11 (p. 3), 12 (p. 4), 13 (p. 4), 14 (p. 4), 15 (p. 4), 16 (p. 4), 17 (p. 4), 18 (p. 4), 19 (p. 5), 20 (p. 5), 21 (p. 5), 22 (p. 5), 23 (p. 5), 24 (p. 5), 25 (p. 5), 26 (p. 6), 27 (p. 6), 28 (p. 6), 29 (p. 6), 30 (p. 6), 31 (p. 7), 32 (p. 7), 33 (p. 7), 34 (p. 7), 35 (p. 7), 36 (p. 7), 37 (p. 7), 38 (p. 7), 39 (p. 8), 40 (p. 8), 41 (p. 8), 42 (p. 8), 43 (p. 8), 44 (p. 8), 45 (p. 9), 46 (p. 10), 47 (p. 10), 48 (p. 11), 49 (p. 11), 50 (p. 11) Figures (p. 11) Listings (p. 12) Answers (p. 13) Miscellaneous (p. 19) 2 Preface This module contains review questions and answers keyed to the module titled Java3002: Creating and Manipulating Turtles and Pictures in a World Object 3. The questions and the answers are connected by hyperlinks to make it easy for you to navigate from the question to the answer and back again. * Version 1.6: Apr 2, 2016 2:18 pm -0500 http://creativecommons.org/licenses/by/4.0/ 1 http://cnx.org/contents/dzovxpfw 2 http://cnx.org/contents/-2rmhfs_ 3 http://cnx.org/content/m44149

OpenStax-CNX module: m45762 2 3 Questions 3.1 Question 1. True or False? The import directive at the very beginning of Listing 1 (p. 2) is a directive to the compiler and the virtual machine notifying them that the class named Color can be found in the package named java.awt. Listing 1. Question 1. import java.awt.color; public class Prob01{//Driver class public static void main(string[] args){ //Instantiate an object and call its method named run. Prob01Runner obj = new Prob01Runner(); obj.run(); //Get information from the object and display it on // the command-line screen. System.out.println(obj.getMars()); System.out.println(obj.getJoe()); System.out.println(obj.getSue()); }//end main }//end class Prob01 Answer 1 (p. 19) Table 1 3.2 Question 2 True or False? The class named library. Answer 2 (p. 19) Color imported in Listing 1 (p. 2) is a member of Ericson's multimedia 3.3 Question 3 True or False? A package folder. Answer 3 (p. 18) is the specication of a particular folder on the disk relative to a standard root 3.4 Question 4 True or False? Every Java application and every Java applet must include the denition of a class that contains the denition of a method named main. Answer 4 (p. 18)

OpenStax-CNX module: m45762 3 3.5 Question 5 True or False? The name of the class containing the main method is also the name of the application insofar as being able to compile and execute the application is concerned. Answer 5 (p. 18) 3.6 Question 6 True or False? The name of the application shown in Listing 1 (p. 2) is Proj01. Answer 6 (p. 18) 3.7 Question 7 True or False? The name of the source code le containing the class denition shown in Listing 1 (p. 2) must be Prob01.java in order for the application to compile and run as an application named Prob01. Answer 7 (p. 18) 3.8 Question 8 True or False? In its simplest form, an application can be compiled by executing the command shown in Listing 2 (p. 3) at the command prompt where Prob01.java is the name of the le containing the main method. Listing 2. Question 8. javac Prob01 Answer 8 (p. 18) 3.9 Question 9 Table 2 True or False? It is often necessary to specify the path to various library les on the command line when compiling an application. In that case, the simplest form given in Listing 3 (p. 18) is not sucient. Answer 9 (p. 18) 3.10 Question 10 True or False? When a Java application is successfully compiled, it will produce one or more output les with an extension of.class. Answer 10 (p. 18) 3.11 Question 11 True or False? The execution of a Java application begins and ends in the method named main. Answer 11 (p. 18)

OpenStax-CNX module: m45762 4 3.12 Question 12 True or False? The two commands shown in Listing 4 (p. 4) can be used to compile and execute a Java application named Prob01 where: The only special class library required is contained in the folder named bookclasses. The path from the root to the folder named bookclasses is represented by \bookclasses. Listing 4. Question 12. javac -cp.;---\bookclasses Prob01.java java -cp.;---\bookclasses Prob01 Answer 12 (p. 17) 3.13 Question 13 Table 3 True or False? The Java compiler program is named java.exe. Answer 13 (p. 17) 3.14 Question 14 True or False? The Prob01.java and Prob01 at the ends of the two commands in Listing 4 (p. 4) specify the les being operated on by the virtual machine and the compiler respectively. Answer 14 (p. 17) 3.15 Question 15 True or False? In Listing 4 (p. 4), the -cp indicates that a classpath follows. Answer 15 (p. 17) 3.16 Question 16 True or False? A classpath consists of one or more path specications separated by semicolon characters. Answer 16 (p. 17) 3.17 Question 17 True or False? The purpose of the classpath in Listing 4 (p. 4) is to tell the compiler and the virtual machine where to look for source code les that the application needs in order to successfully compile and execute. Answer 17 (p. 17) 3.18 Question 18 True or False? The period ahead of the semicolon in Listing 4 (p. 4) says to search the root folder rst. Answer 18 (p. 17)

OpenStax-CNX module: m45762 5 3.19 Question 19 True or False? The rst statement in the body of the main method in Listing 1 (p. 2) instantiates a new object of the class named Prob01Runner. Answer 19 (p. 17) 3.20 Question 20 True or False? The rst statement in Listing 1 (p. 2) saves a reference to a new object of the class named Prob01Runner in a reference variable named obj. In general, the type of the variable must be: The name of the object, or The name of a superclass of the object, or The name of an interface implemented by the object. Answer 20 (p. 17) 3.21 Question 21 True or False? In Java, you must save a reference to a newly instantiated object in order to gain access to that object later in the program. Answer 21 (p. 16) 3.22 Question 22 True or False? The second statement in the body of the main method in Listing 1 (p. 2) uses the reference stored in the variable named obj to call the method named run encapsulated in the object referred to by the contents of obj. Answer 22 (p. 16) 3.23 Question 23 True or False? The following three methods that are called in Listing 1 (p. 2) are of a type that is commonly referred to as accessor methods. They are also sometimes referred to by the slang term getter methods. getmars getjoe getsue Answer 23 (p. 16) 3.24 Question 24 True or False? The method named println that is called in Listing 1 (p. 2) is a member of Ericson's multimedia library. The purpose of the println method is to display text on an image. Answer 24 (p. 16) 3.25 Question 25 True or False? Java uses four access modiers to specify the accessibility of various classes and members in a Java application: public private

OpenStax-CNX module: m45762 6 protected package-private Answer 25 (p. 16) 3.26 Question 26 True or False? Listing 5 (p. 6) shows the beginning of a class named Prob01Runner. Listing 5. Question 26. class Prob01Runner{ //Instantiate the World and Turtle objects. private World mars = new World(300,274); private Turtle joe = new Turtle(mars); private Turtle sue = new Turtle(mars); Answer 26 (p. 16) 3.27 Question 27 Table 4 True or False? The class that begins in Listing 5 (p. 6) does not have an access modier. This puts it in package-private access category. A class with package-private access can be accessed by code that is stored in the same package and cannot be accessed by code stored in other packages. Answer 27 (p. 16) 3.28 Question 28 True or False? The last three statements in Listing 5 (p. 6) declare three private variables. Because these variables are declared private, they can be accessed by any method dened in any class in the same package. Answer 28 (p. 16) 3.29 Question 29 True or False? The three variables declared in Listing 5 (p. 6) are instance variables variables. Answer 29 (p. 16) as opposed to class 3.30 Question 30 True or False? Because the three variables declared in Listing 5 (p. 6) are instance variables, they belong to an object instantiated from the class. Even if the variables were public, they could only be accessed by rst gaining access to the object to which they belong. Answer 30 (p. 15)

OpenStax-CNX module: m45762 7 3.31 Question 31 True or False? The three variables declared in Listing 5 (p. 6) are reference variables. This means that they are capable of storing references to objects and are also capable of storing values of the eight primitive types. Answer 31 (p. 15) 3.32 Question 32 True or False? Ericson's class library contains a class named World and another class named Turtle. The code in Listing 5 (p. 6) instantiates one object of the World class and populates that world with three objects of the Turtle class. Answer 32 (p. 15) 3.33 Question 33 True or False? Every class denition has one or more method-like members called constructors. (If you don't dene a constructor when you dene a class, a default constructor will be automatically dened for your class.) Answer 33 (p. 15) 3.34 Question 34 True or False? The name of the constructor must always be the same as the name of the class in which it is dened. Like a method, a constructor may or may not take arguments. If there are two or more (overloaded) constructors, they must have dierent argument lists. Answer 34 (p. 15) 3.35 Question 35 True or False? To instantiate an object of a class, you apply the new operator to the class' constructor, passing parameters that satisfy the required arguments for the constructor. Answer 35 (p. 15) 3.36 Question 36 True or False? When an object is instantiated, the constructor returns an array containing the values in all of the instance variables. Answer 36 (p. 15) 3.37 Question 37 True or False? The last two statements in Listing 5 (p. 6) instantiate two objects of the Turtle class and use them to populate the World object whose reference is stored in the variable named mars. Answer 37 (p. 15) 3.38 Question 38 True or False? If a variable (exclusive of local variables inside of methods) is not purposely initialized when the object in instantiated, it will receive a default initialization value. The default values are: 0 or 0.0 for numeric variables true for boolean variables null for reference variables

OpenStax-CNX module: m45762 8 Answer 38 (p. 15) 3.39 Question 39 True or False? Code written into a class' constructor is executed when an object of the class is instantiated. Answer 39 (p. 14) 3.40 Question 40 True or False? Good object-oriented programming practice says that most of the instance variables encapsulated in an object should be declared private. If there is a need to make the contents of those variables available outside the object, that should be accomplished by dening protected accessor methods. Answer 40 (p. 14) 3.41 Question 41 True or False? Everything in Java is passed and returned by reference. Answer 41 (p. 14) 3.42 Question 42 True or False? Each of the accessor methods shown in Listing 6 (p. 8) returns a copy of the reference pointing to either a Turtle object or a World object. Listing 6. Question 42. public Turtle getjoe(){return joe;} public Turtle getsue(){return sue;} public World getmars(){return mars;} Answer 42 (p. 14) 3.43 Question 43 Table 5 True or False? Code in the println method calls a method named tostring on each incoming primitive value and displays the string value returned by that method. Answer 43 (p. 14) 3.44 Question 44 True or False? The tostring method is overridden (not overloaded) so as to return a string value describing the object. Answer 44 (p. 14) in the World and Turtle classes

OpenStax-CNX module: m45762 9 3.45 Question 45 True or False? The code in Listing 7 (p. 10) replaces the default all-white picture in a World object with another picture. (Note, the variable named mars contains a reference to an object of the class World.)

OpenStax-CNX module: m45762 10 Listing 7. Question 45. public void run(){ mars.setpicture(new Picture("Prob01.jpg")); Answer 45 (p. 14) 3.46 Question 46 Table 6 True or False? The background of a World object consists of an object of Ericson's Picture class. (A Picture object is encapsulated in the Answer 46 (p. 14) 3.47 Question 47 World object.) True or False? The code in Listing 8 (p. 10) uses two levels of indirection to add my name to the picture that forms the background of the world shown in Figure 1 (p. 10). Listing 8. Question 47. mars.getpicture().tostring( "Dick Baldwin",10,20); Figure 1 (p. 10) - Question 47. Table 7

OpenStax-CNX module: m45762 11 Answer 47 (p. 13) 3.48 Question 48 True or False? A Turtle object encapsulates many methods that can be used to manipulate the turtle in a variety of dierent ways. Answer 48 (p. 13) 3.49 Question 49 True or False? A call to the forward method of a turtle object with no parameters causes the turtle to move forward by a default distance of 100 pixels. Answer 49 (p. 13) 3.50 Question 50 True or False? A call to the moveto method of a turtle object with a single parameter value of 150 causes the turtle to move forward by a distance of 150 pixels. Answer 50 (p. 13) 4 Figures Figure 1 (p. 10). Question 47.

OpenStax-CNX module: m45762 12 5 Listings Listing 1 (p. 2). Question 1. Listing 2 (p. 3). Question 8. Listing 3 (p. 18). Answer 8. Listing 4 (p. 4). Question 12. Listing 5 (p. 6). Question 26. Listing 6 (p. 8). Question 42. Listing 7 (p. 10). Question 45. Listing 8 (p. 10). Question 47. Listing 9. (p. 14) Answer 47. What is the meaning of the following two images? This image was inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at the same time. The image is also an example of the kinds of things that we do in my course titled ITSE 2321, Object- Oriented Programming. This image was also inserted for the purpose of inserting space between the questions and the answers.

OpenStax-CNX module: m45762 13 6 Answers 6.1 Answer 50 False. The moveto method of the Turtle class cannot be called with a single parameter. Two parameters are required. Back to Question 50 (p. 11) 6.2 Answer 49 Back to Question 49 (p. 11) 6.3 Answer 48 Back to Question 48 (p. 11) 6.4 Answer 47 False. The code in Listing 8 (p. 10) won't compile. The tostring method does not apply to images. The correct code is shown in Listing 9 (p. 14).

OpenStax-CNX module: m45762 14 Listing 9. Answer 47. mars.getpicture().addmessage( "Dick Baldwin",10,20); Back to Question 47 (p. 10) 6.5 Answer 46 Back to Question 46 (p. 10) 6.6 Answer 45 Back to Question 45 (p. 9) 6.7 Answer 44 Back to Question 44 (p. 8) 6.8 Answer 43 Table 8 False. Code in the println method calls a method named tostring on each incoming object reference and displays the string value returned by that method. Back to Question 43 (p. 8) 6.9 Answer 42 Back to Question 42 (p. 8) 6.10 Answer 41 False. Everything in Java is passed and returned by value Back to Question 41 (p. 8), not by reference. 6.11 Answer 40 False. If there is a need to make the contents of those variables available outside the object, that should be accomplished by dening public accessor methods. Back to Question 40 (p. 8) 6.12 Answer 39 Back to Question 39 (p. 8)

OpenStax-CNX module: m45762 15 6.13 Answer 38 False. The default values are: 0 or 0.0 for numeric variables false for boolean variables null for reference variables Back to Question 38 (p. 7) 6.14 Answer 37 Back to Question 37 (p. 7) 6.15 Answer 36 False. When an object is instantiated, the constructor returns a reference to the new object. Back to Question 36 (p. 7) 6.16 Answer 35 Back to Question 35 (p. 7) 6.17 Answer 34 Back to Question 34 (p. 7) 6.18 Answer 33 Back to Question 33 (p. 7) 6.19 Answer 32 False. The code in Listing 5 (p. 6) instantiates one object of the with two objects of the Turtle class. Back to Question 32 (p. 7) World class and populates that world 6.20 Answer 31 False. The three variables declared in Listing 5 (p. 6) are reference variables (as opposed to primitive variables). This means that they are capable of storing references to objects as opposed to simply being able to store values of the eight primitive types. It also means that they are incapable of storing values of the eight primitive types. Back to Question 31 (p. 7) 6.21 Answer 30 Back to Question 30 (p. 6)

OpenStax-CNX module: m45762 16 6.22 Answer 29 Back to Question 29 (p. 6) 6.23 Answer 28 False. Because these variables are declared private, they can only be accessed by code contained in methods dened inside the same class (and in inner classes of the class, which is beyond the scope of this module). Back to Question 28 (p. 6) 6.24 Answer 27 Back to Question 27 (p. 6) 6.25 Answer 26 Back to Question 26 (p. 6) 6.26 Answer 25 Back to Question 25 (p. 5) 6.27 Answer 24 False. The method named println that is called in Listing 1 (p. 2) is a method belonging to a standard system object that represents the standard output device (usually the command-line screen). The purpose of the println method is to display material on the command-line screen. Back to Question 24 (p. 5) 6.28 Answer 23 Back to Question 23 (p. 5) 6.29 Answer 22 Back to Question 22 (p. 5) 6.30 Answer 21 Back to Question 21 (p. 5)

OpenStax-CNX module: m45762 17 6.31 Answer 20 False. In general, the type of the variable must be: The name of the class, or The name of a superclass of the class, or The name of an interface implemented by the class. Back to Question 20 (p. 5) 6.32 Answer 19 Back to Question 19 (p. 5) 6.33 Answer 18 False. The period ahead of the semicolon in Listing 4 (p. 4) says to search the current folder rst. Back to Question 18 (p. 4) 6.34 Answer 17 False. The purpose of the classpath is to tell the compiler and the virtual machine where to look for previously compiled class les that the application needs in order to successfully compile and execute. Back to Question 17 (p. 4) 6.35 Answer 16 Back to Question 16 (p. 4) 6.36 Answer 15 True Back to Question 15 (p. 4) 6.37 Answer 14 False. The Prob01.java and Prob01 at the ends of the two commands in Listing 4 (p. 4) specify the les being operated on by the compiler and the virtual machine respectively. Back to Question 14 (p. 4) 6.38 Answer 13 False. The Java compiler program is named javac.exe. The virtual machine is named java.exe. Back to Question 13 (p. 4) 6.39 Answer 12 Back to Question 12 (p. 4)

OpenStax-CNX module: m45762 18 6.40 Answer 11 Back to Question 11 (p. 3) 6.41 Answer 10 Back to Question 10 (p. 3) 6.42 Answer 9 Back to Question 9 (p. 3) 6.43 Answer 8 False. The required command is shown in Listing 3 (p. 18). Listing 3. Answer 8. javac Prob01.java Back to Question 8 (p. 3) 6.44 Answer 7 Back to Question 7 (p. 3) 6.45 Answer 6 Table 9 False. The name of the application shown in Listing 1 (p. 2) is Prob01. Back to Question 6 (p. 3) 6.46 Answer 5 Back to Question 5 (p. 3) 6.47 Answer 4 False. Java applets do not require a method named main. Back to Question 4 (p. 2) 6.48 Answer 3 Back to Question 3 (p. 2)

OpenStax-CNX module: m45762 19 6.49 Answer 2 False. java.awt.color belongs to the Java standard edition class library. Back to Question 2 (p. 2) 6.50 Answer 1 Back to Question 1 (p. 2) 7 Miscellaneous This section contains a variety of miscellaneous information. Housekeeping material Module name: Java3002r Review: Creating and Manipulating Turtles and Pictures in a World Object File: Java3002r.htm Published: 02/10/13 Disclaimers: Financial : Although the Connexions site makes it possible for you to download a PDF le for this module at no charge, and also makes it possible for you to purchase a pre-printed version of the PDF le, you should be aware that some of the HTML elements in this module may not translate well into PDF. I also want you to know that, I receive no nancial compensation from the Connexions website even if you purchase the PDF version of the module. In the past, unknown individuals have copied my modules from cnx.org, converted them to Kindle books, and placed them for sale on Amazon.com showing me as the author. I neither receive compensation for those sales nor do I know who does receive compensation. If you purchase such a book, please be aware that it is a copy of a module that is freely available on cnx.org and that it was made and published without my prior knowledge. Aliation : I am a professor of Computer Information Technology at Austin Community College in Austin, TX. -end