Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 of 13 When we attempt to delete an item in a list, it is possible that we do not find that item in

Question 1 of 13

When we attempt to delete an item in a list, it is possible that we do not find that item in the list, in which case we cannot delete it.
True
False

Question 2 of 13

Unless we run out of memory, we can always insert in a linked list.

True
False

Question 3 of 13

In an empty list, head is null

True
False

Question 4 of 13

When we delete the first node in a list, we always set head to null.

True
False

Question 5 of 13

When we successfully delete an item from a list, the number of items in a list decreases by 1.

True
False

Question 6 of 13

Assuming a linked list is properly coded, attempting to delete from an empty list should not result in a NullPointerException
True
False
Reset Selection

Question 7 of 13

1.0 Points

Data stored in a linked list must be of the primitive data types.
True
False
Reset Selection

Question 8 of 13

1.0 Points

It is good practice to provide an accessor to the head of a linked list.
True
False
Reset Selection

Question 9 of 13

1.0 Points

Assuming the number of items is an instance variable of a linked list class, it is good practice to provide a mutator for it.
True
False
Reset Selection

Question 10 of 13

1.0 Points

A linked list _________________ .

A. Has fixed size

B. Can grow and shrink as items are added or deleted

C. Can grow but not shrink, i.e., items can be added but not deleted

D. Can shrink but not grow, i.e., items can be deleted but not added

Reset Selection

Question 11 of 13

1.0 Points

A node (of a linked list) typically has _________________ .

A. 2 attributes: data and the location of the next node

B. 1 attribute only: data

C. 1 attribute only: the location of the next node

Question 12 of 13

When testing the delete method of a linked list, what scenarios do we want to test?

A. Attempt to delete an item not in the list

B. Delete the first item in the list

C. Delete an item in the middle of a list

D. All of the above

Question 13 of 13

When testing the insert method of a linked list (one that inserts at the beginning of the list), what scenarios do we want to test?

A. Insert in an empty list (only)

B. Insert in an empty list and a non-empty list

C. Insert in a non-empty list( only)

D. There is no need to test if we think the method is properly coded

Question 1 of 16

An applet is an extension of the JApplet class.
True
False

Question 2 of 16

The JApplet class is the javax.swing package.
True
False

Question 3 of 16

The main method is used in applets.
True
False

Question 4 of 16

Which package is the Graphics class part of? _________________ .

A. javax.swing

B. java.swing

C. java.awt

D. javax.awt

E. java.graphics

Question 5 of 16

Which applet method is called automatically when the applet needs to redraw itself? _________________ .

A. init

B. main

C. paint

D. exit

E. applet

Question 6 of 16

The drawLine, drawRect and drawOval methods take four parameters.
True
False

Question 7 of 16

The drawLine, drawRect and drawOval methods are all void methods.
True
False

Question 8 of 16

The drawString method is a value-returning method.
True
False

Question 9 of 16

The coordinate (0,0) represents which point in a window? _________________ . A.

the upper right corner

B.

the upper left corner

C.

the lower right corner

D.

the lower left corner

E. the center of the window

Question 10 of 16

In the method call drawRect( 10, 20, 100, 200 ), 100 and 200 represent, respectively _________________ A.

The x and y coordinates of the top left corner of the rectangle being drawn

B. The x and y coordinates of the bottom right corner of the rectangle being drawn

C. The x and y coordinates of the top right corner of the rectangle being drawn

D. the width and height of the rectangle being drawn

E. the height and the width of the rectangle being drawn

Question 11 of 16

In the method call drawRect( 10, 20, 100, 200 ), 10 and 20 represent, respectively _________________ A.

The x and y coordinates of the top left corner of the rectangle being drawn

B. The x and y coordinates of the bottom right corner of the rectangle being drawn

C. The x and y coordinates of the top right corner of the rectangle being drawn

D. the width and the height of the rectangle being drawn

E. the height and the width of the rectangle being drawn

Question 12 of 16

The Color class contains Color constants
True
False

Question 13 of 16

Black has RGB values 0,0,0
True
False

Question 14 of 16

The RGB values of Color.GREEN are _________________ A.

0,255,0

B. 255,0,0

C. 0,255,0

D. 0,0,0

E. 255,255,255

Question 15 of 16

The RGB values of Color.ORANGE are _________________ A.

255,0,0

B.

255,200,0

C.

255,0,200

D.

0,0,0

E. 255,255,255

Question 16 of 16

Using the Color constructor Color( int rr, int gg, int bb ), how many color combinations can you instantiate?

A. 255

B. 3

C. around 16 million

D. around 1,000

E. around 65,000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago