Graphic Design & Digital Media

Study Guide for Test #2

Chapters covered

  • Chapter 7 Functions
  • Chapter 8 Objects

What to study

  • All textbook pages
  • Also use your notes and Powerpoint for guide
  • Try to code a simple OOP without looking. I will not ask you to handwrite an entire program, but you may be asked to "fill in parts" or "recognize parts" of some programs.

FORMAT OF TEST:

The 3 types of questions will be short answers, discussion, and snippets of code.

Here are examples of all types of questions

  • meaning of void
  • as described on page 118, why is writing your own functions so important. i.e. what are benefits of functions
  • syntax for creating a function. Be able to briefly explain as well.
  • syntax for calling a function
  • some of the synonyms for functions
  • What are some return types besides void?
  • What OOP stands for?
  • How is a human being like an object? Analogize based on our class discussion.
  • List and describe the 4 steps in creating a class.
  • List and describe the 3 steps in using an object.
  • What is OOP definition.
  • Where can you place a class? Explain reason for your answer.
  • In section 8-8, there is an enlightening discussion on the question of when should you use OOP. Be able to explain.
  • Identify the part of using an object represented by this code:
    myCar = new Car();
  • Below are the variables for a class called Balloon. (Don't overthink it; it's just a circle)

float posX;
float posY;
float speed;
color c;

Write the a constructor for it. There are no arguments. You may assign any values you wish to the variables.

 

 

 

You will not have to write any code, but maybe fill in a short part or identify a block of code. For instance, I might provide a block of code representing one of the 7 steps of creating a class or using an object. I will ask you to identify the block of code.