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

[Home]
[Rich][Home][Rich]
[Author]
CS183 -- Lab 2: Implementing Classes

Spring 2004

Objectives Addressed
  • Understand the rationale for object-oriented design and programming.
  • Understand data abstraction and abstract data types.
  • Be able to design and implement simple C++ classes and class libraries.
  • Be able to document the design and implementation of small software systems.
Overview

The purpose of this lab is to implement a Histogram class for which the public interface has already been designed.

Problem Statement

Implement the Histogram class (refer to the Histogram.h header file) and write a program that will use the Histogram and LogEntry classes to generate histograms of the:

  • Number of requests per hour
  • Number of requests per day
  • Number of requests by filesize

The histogram should look something like this:

                                   Request by Day of Week
   Sunday | *** (20)
   Monday | ****************************** (210)
  Tuesday | *************************************** (276)
Wednesday | ************************************************************ (422)
 Thursday | ************************** (180)
   Friday | ******************************** (227)
 Saturday | *************** (109)
          --------------------------------------------------------------
                               |                   |                   |
                              141                 281                 422
                                        Requests

or

                                 Requests by Filesize (in bytes)
       0-5000 | ********** (48)
   5000-10000 | ************ (59)
  10000-50000 | ************************************************************ (301)
 50000-100000 | ***** (24)
100000-500000 | * (7)
              --------------------------------------------------------------
                                   |                   |                   |
                                  100                 200                 300
                                            Requests

Notes:

  • You should implement all of the member functions given in the Histogram class definition.
  • You may not modify the public portion of the Histogram.h header file.
  • You may modify the LogEntry if you wish.
Interim Activity Log (due 11:00pm, the day prior to week 4 lab)

You should submit an activity log to indicate your activity and progress on this assignment during the first week.

Lab report (due 11:00pm, the day prior to week 5 lab)

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

The lab report should consist of the following:

  • Your design documentation. (One or two paragraphs describing your approach to solving the problem. This section should convince me that you were thinking when you made the decisions that you did about how to design your program.)
  • Your reaction (a couple of paragraphs on what you learned and what you thought about while working on this assignment)
  • Any suggestions you have for how the lab could be improved.
  • 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:
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Writing Report
    • Other
  • The required histograms for the log file used in Lab 1 and the same histograms for this much larger log file.
  • The documented source code for your program. Do not include the files in LogEntry.zip, 03DecPhotos.zip, or 03DecUnix.zip.

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. It may be wise to keep a diskette backup as well.

Acknowledgment

This laboratory was developed by Dr. Chris Taylor.

Last Updated: Thursday, 01-Jan-2015 13:37:43 CST