View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

M1 Individual Coding Summer 2007

Techzilla

Software defect tracking is an important task in real-world development. Managers need to see reports about defects found in different products and they need to assign defects to specific developers for fixes. Customers need to report defects. Developers need to see summaries of all defects and to specifically find defects assigned to them for fixes. QA needs summaries of defects and to approve fixes done by developers.

Our final project will be Techzilla a defect-tracking system similar to Bugzilla. Typically, this would be a database application, but we are going to make an in-memory version.

Milestone 1 is an individual milestone designed to get everyone going with Smalltalk. It should be fairly simple to implement. Remember as an individual assignment, you may get Smalltalk help from any classmates, but your actual implementation should be your own.
Create the following classes:

Preparation

Task 1:
Create a Smalltalk class that represents a Defect. Each Defect has the following attributes:

Each defect should have the following methods:
‘Defect id description enterDate status statusDate’)

Task 2:
Create a Smalltalk class that represents a Project. A project keeps track of all the defects associated with it. A project has the following attributes:
and the following methods:
‘Project name with Defects: \n defect1 printString \n defect2 printString…’)

Test Code(paste this code in workspace to test your classes)

| p d |
p := Project named: 'Test'.
Defect reset.
d := Defect new.
d description: 'A bug 1'.
p addDefect: d.
d := Defect new.
d description: 'A bug 2'.
p addDefect: d.
d := Defect new.
d description: 'A bug 3'.
p addDefect: d.
d := Defect new.
d description: 'A bug 3'.
p addDefect: d.
p printString.

Highlighting above workspace code and selecting printIt should show:
 'Project Test Defects: 
Defect 1   A bug 1        #(May 17, 2007 9:52:53 am)       #open        #(May 17, 2007 9:52:53 am)
Defect 2   A bug 2        #(May 17, 2007 9:52:53 am)       #open        #(May 17, 2007 9:52:53 am)
Defect 3   A bug 3        #(May 17, 2007 9:52:53 am)       #open        #(May 17, 2007 9:52:53 am)
Defect 4   A bug 3        #(May 17, 2007 9:52:53 am)       #open        #(May 17, 2007 9:52:53 am)
'

Highlighting all the above code plus these lines and selecting printItshould give you:
p changeStatusFor: 1 to: #rejected.
p changeStatusFor: 3 to: #closed.
p printString.
 'Project Test Defects: 
Defect 1   A bug 1        #(May 17, 2007 9:53:48 am)       #rejected        #(May 17, 2007 9:53:48 am)
Defect 2   A bug 2        #(May 17, 2007 9:53:48 am)       #open        #(May 17, 2007 9:53:48 am)
Defect 3   A bug 3        #(May 17, 2007 9:53:48 am)       #closed        #(May 17, 2007 9:53:48 am)
Defect 4   A bug 3        #(May 17, 2007 9:53:48 am)       #open        #(May 17, 2007 9:53:48 am)
'

Highlighting all the above code plus these lines and selecting doIt should print the following 
reports to the transcript:
p reportFor: #all. 
p reportFor: #rejected.
p reportFor: #closed.

Project defect report for All : Test
Defect ID   Description    Date Entered                     Current Status     Status Date
Defect 1   A bug 1        #(May 17, 2007 9:58:03 am)       #rejected        #(May 17, 2007 9:58:03 am)
Defect 2   A bug 2        #(May 17, 2007 9:58:03 am)       #open        #(May 17, 2007 9:58:03 am)
Defect 3   A bug 3        #(May 17, 2007 9:58:03 am)       #closed        #(May 17, 2007 9:58:03 am)
Defect 4   A bug 3        #(May 17, 2007 9:58:03 am)       #open        #(May 17, 2007 9:58:03 am)
*****************************************************************
Project defect report for Rejected : Test
Defect ID   Description    Date Entered                     Current Status     Status Date
Defect 1   A bug 1        #(May 17, 2007 9:58:03 am)       #rejected        #(May 17, 2007 9:58:03 am)
*****************************************************************
Project defect report for Closed : Test
Defect ID   Description    Date Entered                     Current Status     Status Date
Defect 3   A bug 3        #(May 17, 2007 9:58:03 am)       #closed        #(May 17, 2007 9:58:03 am)


Grading Criteria

Defect Class.........30
Project Class........30
Comments.............20
Coding Style.........20

Link to this Page