MOOC/CS102 Introduction of CS2
Unit 3. Assessment Review
soicem
2016. 12. 30. 14:03
Unit 3의 평가 문제를 피드백하겠습니다. Unit 3는 STL에 관련된 것들을 묻는 문제들이 나왔습니다.
Q2. Write a simple statement that explains a generic unit.
A generic unit is code that defines a computation in which the types and operations are not specified until the code is used.
Q4. Match each concept with the associated item
- Modularity : Expressions, Statements, and function
- Abstraction : Naming compound elements as a unit
- Composition : Objects, Packages, Classes, and structures
- Hierarchy : Subclasses
Q5. 'Abstraction' means understanding behavior without knowing how it is implemented.
Q7. Write a simple statement describing the STL and listing several of its components.
The STL is the Standard Template Library for C++. It is an organized collection of generic algorithms usable for solving general problems and task. It contains 4 categories of templates: Containers, Iterators, Algorithms, and Functors.
Q8. Explain iterators and list several kinds of iterators.
An iterator is an object that is used to reference and traverse the elements of a container object. There are several kinds of iterators, including forward iterator, bidirectional iterator, and random access iterator.
Q11. What quality attributes are of interest with respect to STL templates?
Complexity and cost are relevant quality attributes of interest. Complexity(the average number of steps an algorithm takes for a problem of size n) and cost(execution time and amount of storage needed for a problem of size n) are known for many of the templates containers, iterators, and algorithms. They can help one select the most efficient template to use in a program design. For example, we use the complexity of a sort algorithm to decide which sort to use for a particular problem.
good!