Midterm, ECSC 330, Spring 2023

Name ______________________________________


  1. Scoped Enumerated Types.
    1. [2 points] Give the syntax for declaring a scoped enumerated type containing the seasons of the year (SPRING, SUMMER, FALL, WINTER);
    2. [4 points] What additions might a programmer add to an enumerated type other than the known "values"? Why?
    3. [4 points] Besides the type declaration of an enumerated type, what other items might a programmer supply related to that type?
  2. Abstraction
    1. [4 points] Provide a useful definition of abstraction as it relates to programmers.
    2. [6 points] Explain how an scoped enumerated class can be viewed at two different levels of abstraction in a program. Give concrete examples.
    3. [6 points] Define abstract data type.
  3. Object Oriented Design
    1. [6 points] Discuss the difference between object oriented design and functional decomposition.
    2. [6 points] What differentiates objects, functions, and variables?
    3. [6 points] When defining a class interface, what must be considered? What must be provided in this interface?
  4. Standard Library
    1. [4 points] Describe the vector class contained in the standard library.
    2. [2 points] What are iterators?