CS321 -- Lab 7: Button Emulation



->Courses
->CS321
-->Presentation
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
-->Lab 6
->Lab 7
-->Lab 8
->Electronic Submission
->Old Exams
->C++ Examples
->Unix Help
->Software
->Tentative Schedule
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Fall Quarter 2001

NOTE: Students from sections 3 and 4 should refer to the class handout instead of this webpage for details on lab 7.

Purpose

The purpose of this lab is to develop an appreciation for how a button object may be implemented.

Acknowledgement

This lab was developed by Dr. Henry Welch.

General Lab Information

Implement a simple button somewhere in the drawing area. As a minimum is should possess the following features:

  • Text labeling the button (try using QPainter::drawText)
  • A clearly distinguishable border
  • Clear indication that the button is depressed (i.e., it should change appearance while down)
  • Have the button press cause a clearly observable change in the rest of the drawn image
  • Extra credit may be awarded for buttons that appear three-dimensional.
  • Do not forget to redraw your button during a Paint event.

To get an idea of how a typical button works run your shell and experiment by pressing on a button and while holding move off the button, try the reverse and release over the button, etc.

NOTE: It is acceptable to sacrifice some of your other mouse functionality to support this button.

Application demonstration

You should demonstrate the successful operation of your application before or during week 9 lab.

Lab report (due 11pm, the day prior to week 9 lab)

The lab reports should be self-contained. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report and any previous reports that you have submitted. Your report should include:

  • Purpose
  • Problem Statement
  • Procedure -- what approach you used to solve the problem
  • Discussion including:
    • A tally of the number of new Non-commented Lines Of Code (NLOC) written for this lab assignment. You should use the CLC perl script on your code. If possible, break the NLOC down into the various features you needed to implement.
    • A summary of your activity log indicating how much time you spent on each phase of the assignment. Please report the time in the following categories:
      • Designing
      • Coding
      • Debugging (before you think it's working)
      • Testing (after you think it's working)
      • Report writing
      • Other
    • A narrative describing any specific problems you encountered and how you solved them.
  • Conclusions (what you learned, suggestions of how the lab could be improved, things you would have done differently, etc.)
  • Documented source code (clearly identifying any changes made since your last submission). Note: you should include all the source code necessary to compile your project except for unmodified source code written by Dr. Welch. For example, you don't need to include shell.cpp if you didn't modify it.
    You may wish to use gensrc, a shell script which will produce an XML document that may be used as a starting point for your report. The file will include all of the source code files (provided you modify the script appropriately... edit gensrc for details on how to do this.)
  • Extra credit is available but only if it is clearly identified during the demonstration and in your report.
  • Be sure to address any areas concern from previous submissions.

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

If you have any questions, consult the instructor.

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