The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science

CSci 131 - Data Structures

Lecture 6 Homework

1. Write the package specification to define an exported type for computer courses. All courses should include the course name defined as 30 character string. There are two kinds of computer courses: programming courses and nonprogramming courses. Programming courses have a data component specifying the language used. The choices are Ada 83, Ada 95, C, C++, LISP, or Prolog. There is only one operation defined: a Put procedure. Use a variant record to define the type.

2. Write the body of the package defined in problem 1.

3. Rewrite the package specification for the type defined in problem 1 using tagged and derived types.

4. Write the body of the package defined in problem 3.

5. What are the specialization relationships, is a relationships, that exist in the data defined in problem 1?