Midterm, ECSC 330, Spring 2023
Name ______________________________________
- The weight for each question is given.
- Use as much paper as you wish, but make your answers are legible.
- Please label your answers with the question number.
- Please answer each question thoughtfully and carefully.
- Please staple this page on top of your answers.
- Scoped Enumerated Types.
- [2 points] Give the syntax for declaring a scoped enumerated type containing the seasons of the year (SPRING, SUMMER, FALL, WINTER);
- [4 points] What additions might a programmer add to an enumerated type other than the known "values"? Why?
- [4 points] Besides the type declaration of an enumerated type, what other items might a programmer supply related to that type?
- Abstraction
- [4 points] Provide a useful definition of abstraction as it relates to programmers.
- [6 points] Explain how an scoped enumerated class can be viewed at two different levels of abstraction in a program. Give concrete examples.
- [6 points] Define abstract data type.
- Object Oriented Design
- [6 points] Discuss the difference between object oriented design and functional decomposition.
- [6 points] What differentiates objects, functions, and variables?
- [6 points] When defining a class interface, what must be considered? What must be provided in this interface?
- Standard Library
- [4 points] Describe the vector class contained in the standard library.
- [2 points] What are iterators?