<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE CAT [ <!ENTITY nbsp  "&#160;"> ]>
<CAT xmlns:cat="http://www.w3.org/TR/html4/" version="2.0"> 
<cat:title>Structs vs Arrays CAT</cat:title>
<cat:author>Tammy VanDeGrift and Kate Deibel</cat:author>
<cat:date>December 03, 2003</cat:date>

<cat:technique>Categorizing Grid</cat:technique>

<cat:purpose>
<p>
This activity allows instructors to see if students understand appropriate uses of arrays and structs.
</p>
</cat:purpose>
<cat:activity>
<p>
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.
</p>

<br></br>

<center>

<table border="1">
<tr>
<td align="center" width="150">
ARRAY
</td>
<td align="center" width="150">
STRUCT
</td>
</tr>
<tr>
<td height="175">
<br></br>
</td>
<td height="175">

<br></br>

</td>
</tr>
</table>

<br></br>

<table border="1">
<tr>
<td align="center">
Scenarios
</td>
</tr>
<tr>
<td>

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

</td>
</tr>
</table>

</center>
</cat:activity>
<cat:solution>
<ol>
<li><b>ARRAY:</b> Your answers to a True/False test with 10 questions.</li>
<li><b>ARRAY:</b> Keeping track of rainfall data for a year</li>
<li><b>STRUCT:</b> Creating a record for a person in your e-mail address book</li>
<li><b>ARRAY:</b> Sorting high temperatures for the previous month</li>
<li><b>ARRAY:</b> Finding the median score of your last 20 bowling scores</li>
<li><b>ARRAY:</b> Keeping track of the current state of a crossword puzzle</li>
<li><b>STRUCT:</b> Keeping track of a day's weather -- rainfall, high temperature, low temperature, average pressure, percent humidity</li>
<li><b>STRUCT:</b> Storing a customer profile with their account number, current balance, expiration date of charge account</li>
<li><b>ARRAY:</b> Keeping track of 2 players' positions on a 2-dimensional grid</li>
<li><b>ARRAY or STRUCT:</b>A multiple-choice question with four answers to choose from</li>
<li><b>ARRAY or STRUCT:</b>The nutritional content (protein, carbohydrates, vitamins, etc.) of a brand of breakfast cereal</li>
<li><b>ARRAY or STRUCT:</b> The Red, Green, and Blue color components of a pixel</li>
</ol>
</cat:solution>
<cat:analysis>
<p>
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.
</p>
</cat:analysis>
<cat:variant_uses>
	<cat:variation>After deciding on the appropriate data structure, have the students describe the contents of the data structure as it applies to each situation.</cat:variation>
	<cat:variation>Have students work in groups to complete this activity. The instructor may want to circulate throughout the groups to ensure that each group is making progress. After the groups have completed their lists, the instructor can ask for votes on each item. It is important that the instructor explains why each data structure is appropriate for the task.</cat:variation>
	<cat:variation>Have students work individually on their lists and then form groups of 4-5 people to discuss their individual lists with other members of the group.</cat:variation>
</cat:variant_uses>
<cat:classification>
<cat:assessment_goals>
	<cat:goal>Develop analytic skills</cat:goal>
	<cat:goal>Develop ability to draw reasonable inferences from observations</cat:goal>
	<cat:goal>Improve memory skills</cat:goal>
	<cat:goal>Develop appropriate study skills, strategies, and habits</cat:goal>
	<cat:goal>Learn terms and facts of this subject</cat:goal>
	<cat:goal>Learn concepts and theories of this subject</cat:goal>
</cat:assessment_goals>
<cat:topics>
	<cat:topic>Structs</cat:topic>
	<cat:topic>Arrays</cat:topic>
	<cat:topic>C</cat:topic>
	<cat:topic>C++</cat:topic>
</cat:topics>
<cat:participation_level>
</cat:participation_level>
<cat:time>
	<cat:preparation_time>LOW</cat:preparation_time>
	<cat:class_time>LOW</cat:class_time>
	<cat:in_class_analysis_time>LOW</cat:in_class_analysis_time>
	<cat:out_class_analysis_time>LOW</cat:out_class_analysis_time>
</cat:time>
<cat:instructor_response>
	<cat:response>Lecture</cat:response>
	<cat:response>Next Day Summary</cat:response>
	<cat:response>Class Discussion</cat:response>
	<cat:response>Small Group Discussions</cat:response>
	<cat:response>Homework</cat:response>
</cat:instructor_response>
<cat:device_enabled>Has Been Enabled</cat:device_enabled>
<cat:related_topics>
	<cat:topic>Decomposition</cat:topic>
	<cat:topic>Design</cat:topic>
	<cat:topic>Functions</cat:topic>
	<cat:topic>Classes</cat:topic>
	<cat:topic>Variables</cat:topic>
</cat:related_topics>
</cat:classification>
</CAT>