Graphic Design & Digital Media

Study Guide for Test #3


Chapters covered

What to study

Chapter 9 Arrays

- All pages

Chapter 15 Images

- Sections 1 & 2


The test will be a combination of short answer questions, essays, multiple choice, writing functions, and debugging code errors.

The questions will be phrased just like the questions on Tests 1 and 2.

Examples of all types of questions

  • Be able to define an array.
  • What is the name of the class for loading and displaying images?
  • Explain the syntax for the image() function.  In other words, be able to name the 5 possible parameters.
  • According the slide #4 in Chapter 15 Powerpoint, talk about resizing images. 
  • What is the purpose of the translate() function.
  • Explain how the alpha value works in tinting.  That is, what is the range of numbers? What is the highest and the lowest? In the following code, which is the alpha?
    tint(0, 255, 0, 127).  What if it’s just one parameter such as tint()?  
  • Write and describe the syntax for the distance function.
  • What is the meaning of millis().
  • Declare and initialize an integer array that has 500 elements. The name of the array is theValues
  • Define and initialize a string array with 5 specific names I’ll give you. You can choose how you want to do it. Slide #8 of the PowerPoint give a good example.  
  • Declaring an array of an object. This will be a multiple choice question so that you’ll need to be able to identify the correct syntax.


Examples of multiple choice

  1. Which is the correct syntax for filling an array element
    • stuff[0] = 1.6;
    • stuff{0} = 1.6;
    • stuff(0) = 1.6;
    • stuff0  =  1.6;
  2. Which is the correct syntax for iterating through all elements in an array?
    • for (int i = 0; i< values.length; i++) { }
    • for (int i = 0; i< values.width; i++) { }
    • for (int i = 0; i< values.length(); i++) { }
    • for (int i = 0; i< values.width(); i++) { }
  3. (See page 181) The _____  array function is used to expand the size of an array by one element while adding data to the new position
    • subset()
    • concat()
    • splice()
    • append()
  4. The name of the folder for holding image files is:
    • info
    • data
    • assets
    • images
  5. The rotate() function takes one argument, an angle measured in _______.
    • degrees
    • pixels
    • inches
    • radians