Professional Documents
Culture Documents
Quiz 1
Review
Format:
Fill in the Blank (given a set of terms)
15 Marks (Knowledge)
True False
10 Marks (Knowledge)
Short Answer
write output
write methods
30 Marks (Application
Total Quiz Value
55 Marks
Content:
Review content from Data Structures - 1D and 2D arrays (notes and practice exercises).
Answer the questions below:
1.
What is an array?
2.
3.
Assume you need a data structure to store even integers between 10 and 30.
a)
b)
c)
d)
e)
f)
4.
What public variable stores the capacity of the array? How can you access this variable?
5.
b)
c)
6.
What is a 2D array?
7.
8.
Assume you need a data structure to store 5 marks for a class of 10 students.
a)
b)
c)
d)
9.
Assume you need a data structure to store profits for a 6-month period for a number of store chains
which is initially unknown.
10.
11.
a)
b)
c)
d)
b)
c)
d)
e)
//Method to search for a given data element and return its index
public int search (int element)
f)
g)
h)
i)
j)