CS183 -- Lab 1: Using Existing Classes



->Courses
->CS183
-->Objectives
-->Quiz 1
->Lab 1
-->Lab 2
-->Project 1
-->Project 2
->Electronic Submission
->Old Exams
->C++ Examples
->MSVC++ Info
->STL Info
->MFC/GUI Info
->Software
->Tentative Schedule
->Support Forum
->Course Policies

[Courses]
[Rich][Home][Rich]
[PHome]

Spring Quarter 2003

Course Objectives Addressed

  • Understand the rationale for object-oriented design and programming.
  • Understand data abstraction and abstract data types.
  • Be able to document the design and implementation of small software systems.

Overview

The purpose of this lab is to design and implement a stand-alone program that incorporates basic C++ programming concepts. These concepts, covered in CS-182, are prerequisites for CS-183.

Acknowledgement

This lab was developed by Dr. Chris Taylor.

Problem Statement

Write a program that will make use of the LogEntry class to read in entries from a http log file and indicate the following:

  • Number of requests for files over 30KB
  • Number of requests occuring between 3pm and 5pm
  • Total amount of data served between 3pm and 5pm
  • Number of invalid requests (404 status)
  • Most popular browser (userAgent that appears most frequently in the log file)

You should not modify the LogEntry files, but you will need to add them to your project.

You may not use any global data objects (at file scope).

Notes

  • If you have never used the Microsoft Visual C++ compiler, you may want to take a look at the following CS182 lab assignment for help on how to create a project workspace in MSVC++.
  • You will need to download LogEntry.zip and add the LogEntry.cpp and LogEntry.h files to your project.
  • You will need to download 03FebPhotos.zip which contains an http log file (03FebPhotos.log).
  • On very large log files, reading the file can take a significant amount of time. Some of you may be interested (this is not required) in experimenting with a fastReader class (fastReader.h and fastReader.cpp) that reads lines of text files significantly faster than the getline function defined in the string class.

Lab 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.)
  • A brief description of any problems you encountered or questions you have regarding the lab.
  • 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
  • Any suggestions you have for how the lab could be improved.
  • Results of your program when run on the example log file.
  • The documented source code for your program. Do not include the files in LogEntry.zip or 03FebPhotos.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 sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost.

Your grade will depend on quality of design and clarity of the code and documentation, as well as whether your program produces the correct results. If you have any questions, consult your instructor.

© 2003 Dr. Christopher C. Taylor Office: CC-27C Phone: 277-7339 Last Updated: Thu Mar 13 17:27:21 2003
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.