IB Option D HL

IB Option D HL

12th Grade

9 Qs

quiz-placeholder

Similar activities

Which is better?

Which is better?

KG - Professional Development

10 Qs

Cyber security

Cyber security

6th - 12th Grade

12 Qs

資訊測驗-高年級

資訊測驗-高年級

10th - 12th Grade

11 Qs

minecraft  : )

minecraft : )

1st Grade - Professional Development

13 Qs

Programming Terminology

Programming Terminology

12th Grade

10 Qs

Google Apps

Google Apps

4th - 12th Grade

10 Qs

Rekrutacja na medyka

Rekrutacja na medyka

KG - Professional Development

13 Qs

Grade 7 IA CARPENTRY (MEASURING AND LINING TOOLS)

Grade 7 IA CARPENTRY (MEASURING AND LINING TOOLS)

7th Grade - University

10 Qs

IB Option D HL

IB Option D HL

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Robert Morrison

Used 8+ times

FREE Resource

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

Inserts item at position index

size()

Inserts item to the end of the list

return(int index)

Returns the number of items in the List

add(int index, Object item)

Not a real List method!

add(Object item)

Deletes the item at position index

remove(int index)

8.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which statements about data structures are true?

Arrays are a primitive type

ArrayList and LinkedList are more efficient than arrays. Arrays should be avoided.

Arrays are normally the most efficient way of storing data where the size is static and known in advance.

List types can only store object references, whereas arrays can store both primitive types and object references.

9.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

z is an object reference which is passed to a method to replace the formal parameter (argument) x. Which statement is true?

If x is reassigned to a different object in the method, z is also reassigned to that object

If the object referenced by x has its state changed by the method, the object referenced by z will be unaffected

If the object referenced by x has its state changed by the method, the object referenced by z will also be affected (because it is the same object).

It is impossible for the method to make any changes to z or x, since java uses pass-by-value mechanisms.