->Homepage
->Schedule
->Courses
-->CS183
-->SE281
-->Tentative Schedule
-->Objectives
-->Quiz 1
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
->Course Policies
->Electronic Submission
->Documentation Standards
->Old Exams
->C++ Examples
->MSVC++ Info
->Software
->Support Forum
->Unix Info
->Nature Photos

[Home]
[Rich][Home][Rich]
[Author]
SE281 -- Lab 3: Visitor Pattern

Spring 2004

Objectives Addressed
  • understand and apply object-oriented design patterns
  • understand the use of UML in the design process
  • be able to design and implement small software components and systems
  • be able to use computer-aided software engineering (CASE) tools in the design process
Overview

The purpose of this assignment is develop a better understanding of the visitor pattern.

Problem Statement

Rewrite the DesktopItem and child classes so that they use the visitor pattern to provide functionality for size and erase.

Add a visitor called summary that will display a summary for the item that is visited. For example, a summary may look something like:

labs, 32.6 KB
|
+-- lab1.txt, 1.3KB, "SE281 -- Lab 1: Modelling in Rose ..."
|
+-- lab1.wav, 31.3KB, Length: 0:32, mono, 11.2Hz, 16 bps

Write a program that tests all of the additional and modified functionality introduced in this assignment.

Optional: Redo the open and save methods like you did with size and erase.

Interim Activity Log (due 11:00pm, the day prior to week 5 lab)

You should submit an activity log to indicate your activity and progress on this assignment during the first week (one log file for the entire team).

Lab Report (due 11:00pm, the day prior to week 6 lab)

Here is a template file to use as a starting point for this report.

The lab report should consist of the following:

  • A link to your Rational Rose model file, and a .png image with the UML diagram describing the visitor class hierarchy.
  • Your reaction (a couple of paragraphs on what you learned and what you thought about while working on this assignment) In your reaction you should indicate how appropriate you think the use of the visitor pattern is for this application.
  • Any suggestions you have for how the assignment could be improved.
  • Results from your testing program.
  • An activity log indicating how much time you spent on each phase of the assignment. You should use the format found in the template XML file and report the time in the following categories:
    • Modeling
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Writing Report
    • Other
  • The documented source code for your program.

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost.

Acknowledgment

This laboratory was developed by Dr. Chris Taylor.

Last Updated: Friday, 02-Apr-2004 14:06:17 CST