Title: Structs vs Arrays CAT

Author: Tammy VanDeGrift and Kate Deibel

Date: December 03, 2003

Technique: Categorizing Grid

Before Class Preparation Time: LOW

Class Completion Time: LOW

In-Class Analysis Time: LOW

Out-Of-Class Analysis Time: LOW

Assessment Goals:
Topics:
Purpose:

This activity allows instructors to see if students understand appropriate uses of arrays and structs.


Activity:

This activity will give you the opportunity to decide on appropriate tools for a task. Place each item in the Scenarios box under the data structure that is best used for that situation.


ARRAY STRUCT



Scenarios
  1. Your answers to a True/False test with 10 questions.
  2. Keeping track of rainfall data for a year
  3. Creating a record for a person in your e-mail address book
  4. Sorting high temperatures for the previous month
  5. Finding the median score of your last 20 bowling scores
  6. Keeping track of the current state of a crossword puzzle
  7. Keeping track of a day's weather -- rainfall, high temperature, low temperature, average pressure, percent humidity
  8. Storing a customer profile with their account number, current balance, expiration date of charge account
  9. Keeping track of 2 players' positions on a 2-dimensional grid
  10. A multiple-choice question with four answers to choose from
  11. The nutritional content (protein, carbohydrates, vitamins, etc.) of a brand of breakfast cereal
  12. The Red, Green, and Blue color components of a pixel

Solution:
  1. ARRAY: Your answers to a True/False test with 10 questions.
  2. ARRAY: Keeping track of rainfall data for a year
  3. STRUCT: Creating a record for a person in your e-mail address book
  4. ARRAY: Sorting high temperatures for the previous month
  5. ARRAY: Finding the median score of your last 20 bowling scores
  6. ARRAY: Keeping track of the current state of a crossword puzzle
  7. STRUCT: Keeping track of a day's weather -- rainfall, high temperature, low temperature, average pressure, percent humidity
  8. STRUCT: Storing a customer profile with their account number, current balance, expiration date of charge account
  9. ARRAY: Keeping track of 2 players' positions on a 2-dimensional grid
  10. ARRAY or STRUCT:A multiple-choice question with four answers to choose from
  11. ARRAY or STRUCT:The nutritional content (protein, carbohydrates, vitamins, etc.) of a brand of breakfast cereal
  12. ARRAY or STRUCT: The Red, Green, and Blue color components of a pixel

Instructor Responses: Response Analysis:

Run through the grids and mark incorrect or missing entries. Identify the most common errors as well as any patterns that could explain student confusion. Reflect upon these errors and report them back to the class as you see fit.



Variant Uses of Activity:
Device-Enabled: Has Been Enabled

Related Topics: