The midterm period is now over. Samples answers are posted online.
This is a take home exam, to be completed at any time before the due date, but in no more than 75 minutes.
You must answer the questions by yourself, in your own words, within the time alloted for the exam. You can use class notes, readings, books, Google or any other non-human source of information.
The test comprises of 5 questions. Write your answers to each question in a plain text file whose name is: CS121-midterm-<yourfirstname>.txt
Write your full name and email address at the top of the file.
Answer each question with a short paragraph. Keep your answers short and to the point: only one to a few sentences unless indicated otherwise. Remember to indicate the question number for each answer.
Email your answer file to alex@cs.hmc.edu with subject CS 121 - midterm by the deadline. There will be no extension. A late submission will result in a grade of 0.
The midterm will be graded out of 100 points. Each question's total worth is indicated next to the question number.
Note: up to 5 points will be taken out for a file name that does not comply with these instructions (answer file name, email subject, etc.)
The "Window-Icon-Menu-Pointing device" (WIMP) interface first developed in the early 70's at Xerox PARC, implements many established principles of design for usability, sometimes with great success, sometimes with unintended negative effects. Give 2 examples of positive aspects and why they work; give 2 examples of negative aspects and why or when they don't work as intended.
Hints: for positive, think WIMP vs. terminal command line interface; for negative, think beyond desktop business applications.
Translate the informal description of the SnowFlake applet given above into a list of formal requirements. Group the requirements based on their type (FURPS+), and number them (for use in the next question).
Note: make your list as complete as possible based on the description provided, but do not make up requirements.
The use case Increment subdivision level explores one interaction scenario with the system described above. Translate the scenario below into a use case (short narratives under headings), and then into a refined use case (atomic steps). Refer to the requirements you listed in your answer to the previous question.
The user presses the button labeled "+". The subdivision level is incremented by 1, as reflected in the display, and the Koch snowflake plot is redrawn at the new subdivision level. If the subdivision level is at its maximum value, nothing happens.
A Koch snowflake is a closed curve that can be computed procedurally given a base polygon and a subdivision level. The base polygon can be represented by a collection of vertices. Each vertex has two coordinates.
The following UML class diagram illustrates two possible designs for a SnowFlake class.
Two possible designs for class CSnowFlake
(click for larger size)
Briefly describe the difference in design between class CSnowFlakeA and CSnowFlakeB. Explain which design is more appropriate (and why).
Write the C++ header file for the CSnowFlake class
that implements the design you chose above. Do not provide
implementation for member functions (only declarations in the class
definition). Write the file name in a comment at the top. Document
your code using the Doxygen syntax we have been using for the project.
Note: this code will not be checked with a compiler, typos will not be counted as errors - what matters is the intention...
Some potentially useful info:
ksn namespace.
ksn::CPolygon and ksn::CVertex
are defined in header files KsnPolygon.h
and KsnVertex.h respectively.
---beginning of file--- // File name: ---end of file---