Assessment Tool

Java course:  Problems, Algorithms, and Programs

Content Tested:  Syntax and Semantic Errors

Lecture Content:

Goals:

Assessment Technique:  Approximate Analogies

Purpose:

To allow instructors to find out if students understand the differences between a syntax and a semantic error and to discover relationships between these concepts in another domain.
 

Activity:

Write the following on the blackboard, overhead, or a piece of paper:  (Activity taken from quiz 1 version 1 of the cse142 spring 2001 offering)


Imagine a game or sport you like to play.  Or, if you're a musician, use musical scores for this analogy.  Now, in that new domain (games, sports, or music) describe what the difference between a syntax error and a semantic error would be.  Give concrete examples of a syntax error and a semantic error.



Be sure to explain the concept of an analogy to the students if they are unfamiliar with the term.  You might need to give the students examples.

Here are some sample responses:

Let's look at a sport.  Syntax errors in a sport would be violations of the rules of the game.  For example, if the sport is soccer then the players (other than the goalie) catching the ball with their hands would be a syntax error.  A semantic error would be poor execution of a play or a poor strategy to win the game.  For example, the soccer team might have a play to kick the ball to a certain person to score and a semantic error would be the team failing to get this person the ball at the appropriate location.

Let's look at music.  If a musician is composing a piece, a syntax error would be an error in writing down the appropriate notes or dynamics.  A semantic error would correspond to someone trying to play a piece of music and playing the wrong notes according the written music.

Possible Uses of Activity: