IB Option D HL

IB Option D HL

12th Grade

9 Qs

quiz-placeholder

Similar activities

Computación Básica

Computación Básica

KG - 12th Grade

10 Qs

EMPTECH L4 Q3

EMPTECH L4 Q3

12th Grade

10 Qs

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

ZOOM QUIZ

ZOOM QUIZ

1st - 12th Grade

10 Qs

loop while/do while

loop while/do while

7th - 12th Grade

10 Qs

Quiz - Quarter 4 (Oracle)

Quiz - Quarter 4 (Oracle)

12th Grade

10 Qs

bts

bts

KG - Professional Development

13 Qs

IB Option D HL

IB Option D HL

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Robert Morrison

Used 8+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the best definition of 'object reference'

A variable that contains an object

A variable that points to an object

A variable that instantiates an object

A unique hash code that identifies a particular object in memory

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which statements about recursion are correct?

Recursive algorithms must have a base case and a general case

Recursion is rarely used in practice (in the context of high-level programming)

Recursive algorithms are somewhat memory-intensive

There are some problems for which the solution can be expressed much more simply with recursion

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Presume a is an object reference. z is a new object reference, which is initially assigned to a. Which statement is most correct?

z will always reference the same object as a

z references a different object that is an identical copy of the object referenced by a

z references the same object as a, but if a is reassigned, z will continue to reference the original object

z references a different object than a, but of the same class

4.

DRAG AND DROP QUESTION

1 min • 1 pt

ArrayList ​and LinkedList are two classes which ​ (a)   the ​ (b)   ​ (c)   . As a result, they have the same ​ (d)   . The underlying implementation of these two classes is ​ (e)   , but they can be used in an identical way.

implement
List
interface
access methods
different
inherit
class
source code
similar

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

You are defining a Node class for a singly linked list. Write the line of code that defines a pointer to the subsequent Node as an instance variable. Use the object reference 'next'. Do not initialise the instance variable.

6.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following are considered good software development practices?

Using existing library classes instead of manually re-implementing existing functionality

Making use of indentation and spacing to aid readability

Writing methods using as few lines of code as possible

Ensuring the precise function of all code is described clearly through comments

Answer explanation

Code should be self-documenting through use of modularity, meaningful identifiers and short, clear code statements. Comments should only be used sparingly, or to produce class documentation (e.g. Javadoc)

Code should be as clear as possible - the number of lines doesn't matter (within reason). In many cases, one action per line is much clearer and will execute just as efficiently as a single long, complex line of code that performs many functions.

7.

MATCH QUESTION

1 min • 1 pt

Match the following List interface methods with their description

Returns the number of items in the List

add(int index, Object item)

Inserts item at position index

size()

Deletes the item at position index

add(Object item)

Not a real List method!

remove(int index)

Inserts item to the end of the list

return(int index)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?