ASGKIT PROG1 (Primera Asignacion) PSP
ASGKIT PROG1 (Primera Asignacion) PSP
ASGKIT PROG1 (Primera Asignacion) PSP
Program 1
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
Program 1
October 2006
Program 1
October 2006
Thisassignmentkitcoversthefollowingtopics.
Section
Prerequisites
Program 1
SeePage
Prerequisites
Program1requirements
Linkedlistsoverview
Meanandstandarddeviationoverview
UsingmeanandstandarddeviationinthePSP
Calculatingmeanandstandarddeviation
Ameanandstandarddeviationexample
Assignmentinstructions
Guidelinesandevaluationcriteria
12
Reading
Chapters1and2
October 2006
Program 1 requirements
Program1
requirements
UsingPSP0,writeaprogramtocalculatethemeanandstandarddeviationofa
setofnrealnumbers.
Yourprogramcanreadthenrealnumbersfromthekeyboard,afile,orsome
othersource.
Usealinkedlisttostorethennumbersforthecalculations.Ifnecessary,a
variableorstaticarray(s),database,orotherdatastructure(s)maybeusedto
holdthedata.
Thoroughlytesttheprogram.Atleasttwotestsshouldusethedatainthe
columnsofTable1.ExpectedresultsareprovidedinTable2.
Column1
EstimateProxy
Size
160
591
114
229
230
270
128
1657
624
1503
Column2
Development
Hours
15.0
69.9
6.5
22.4
28.4
65.9
19.4
198.7
38.8
138.2
Table1
Test
ExpectedValue
Mean Std.Dev
550.6
572.03
60.32
62.26
Table1:Column1
Table1:Column2
ActualValue
Mean
Std.Dev
Table2
Program 1
October 2006
Linked lists
Overview
Linkedlistsareacommonabstractdatatypeusedtomaintaincollectionsofdata.
Linkedlistsareimplementedwithpointers.
Alinkedlisttypicallyhastwocomponents.
listhead
listnode(s)
Pointer
to first node
Pointer
to last node
HEAD
NODE 2
Data
Data
...
NODE n-1
NODE n
Data
Data
null
Someoftheoptionsforlinkedliststructureare
thelistheadcanpointtothefirstnode,lastnode,orboth
alistnodecanpointtothenextnode,priornode,orboth
Nullpointersareoftenusedtoindicateanemptylistortheendofthelist.
Typicaloperationsonalinkedlistinclude
addnode
removenode
nextnode
priornode
Program 1
October 2006
Overview
Standarddeviationisameasureofthespreadordispersionofasetofdata.The
morewidelythevaluesarespreadout,thelargerthestandarddeviation.For
example,saywehavetwoseparatelistsofexamresultsfromaclassof30
students;onerangesfrom31%to98%,theotherfrom82%to93%.The
standarddeviationwouldbelargerfortheresultsofthefirstexam.
Usingmeanand
standarddeviation
inthePSP
Meanandstandarddeviationareusedtodivideyourhistoricalsizedatainto
categoriesandsizeranges.ThiswillbediscussedinmoredetailinLecture4
EstimatingwithPROBEII.
Calculatingmean
andstandard
deviation
Theformulaforcalculatingthemeanis
n
xavg
i 1
Theformulaforstandarddeviation,,is
x x
n
i 1
avg
n 1
where
isthesymbolforsummation
iisanindextothennumbers
xisthedataintheset
nisthenumberofitemsintheset
Program 1
October 2006
Inthisexample,wewillcalculatemeanandstandarddeviationofthedatain
Table3.
Table3
1. Inthisexample,thereare10itemsinthedataset.Therefore,wesetn=10.
2. Wecannowsolvethesummationitemsinthemeanformula.
n
xavg
x
i 1
n
1
2
3
4
5
6
7
8
9
10
Total
x
186
699
132
272
291
331
199
1890
788
1601
10
x
i 1
6389
3. Wecanthensubstitutetheintermediatevalueintotheformula.
xavg
6389
10
xavg 638.9
Program 1
October 2006
Continuedonnextpage
Program 1
October 2006
Continued
x x
n
i 1
avg
n 1
1
2
3
4
5
6
7
8
9
10
Total
186
699
132
272
291
331
199
1890
788
1601
10
xi 6389
i 1
x x
i
avg
205,118.41
3,612.01
256,947.61
134,615.61
121,034.41
94,802.41
193,512.01
1,565,251.21
22,230.81
925,636.41
x
10
i 1
xazvg 3,522,761.90
5. Wecanthensubstitutetheintermediatevalueintotheformula.
3,522,761.00
9
391,417.878
625.633981
Program 1
October 2006
Assignment instructions
Beforestartingprogram1,reviewthetoplevelPSP0processscriptbelowto
ensurethatyouunderstandthebigpicturebeforeyoubegin.Also,ensurethat
youhavealloftherequiredinputsbeforeyoubegintheplanningphase.
Assignment
instructions
PSP0ProcessScript
Purpose
Entry Criteria
Step
1
Activities
Planning
Development
Postmortem
Description
- Produce or obtain a requirements statement.
- Estimate the required development time.
- Enter the plan data in the Project Plan Summary form.
- Complete the Time Recording log.
- Design the program.
- Implement the design.
- Compile the program, and fix and log all defects found.
- Test the program, and fix and log all defects found.
- Complete the Time Recording log.
Complete the Project Plan Summary form with actual time, defect, and size
data.
Exit Criteria
Continuedonnextpage
Program 1
October 2006
10
Assignment instructions,
Planningphase
Continued
Planprogram1followingthePSP0planningphasescript.
PSP0PlanningScript
Purpose
Entry Criteria
Step
1
Activities
Program
Requirements
Resource
Estimate
Description
- Produce or obtain a requirements statement for the program.
- Ensure that the requirements statement is clear and unambiguous.
- Resolve any questions.
- Make your best estimate of the time required to develop this program.
- Enter the plan time data in the Project Plan Summary form
- Documented requirements statement
- Completed Project Plan Summary form with estimated development time
data
- Completed Time Recording log
Exit Criteria
Verifythatyouhavemetalloftheexitcriteriafortheplanningphase,thenhave
aninstructorreviewyourplan.Afteryourplanhasbeenreviewed,proceedto
thedevelopmentphase.
Continuedonnextpage
Program 1
October 2006
11
Assignment instructions,
Continued
DeveloptheprogramfollowingthePSP0developmentphasescript.
Development
phase
PSP0DevelopmentScript
Purpose
Entry Criteria
Step
1
Activities
Design
Code
Compile
Test
Description
- Review the requirements and produce a design to meet them.
- Record in the Defect Recording log any requirements defects found.
- Record time in the Time Recording log.
- Implement the design.
- Record in the Defect Recording log any requirements or design defects
found.
- Record time in the Time Recording log.
- Compile the program until error-free.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- Test until all tests run without error.
- Fix all defects found.
- Record defects in the Defect Recording log.
- Record time in the Time Recording log.
- A thoroughly tested program
- Completed Time and Defect Recording logs
Exit Criteria
Verifythatyouhavemetalloftheexitcriteriaforthedevelopmentphase,then
proceedtothepostmortemphase.
Continuedonnextpage
Program 1
October 2006
12
Assignment instructions,
Postmortem
phase
Continued
ConductthepostmortemfollowingthePSP0postmortemscript.
PSP0PostmortemScript
Purpose
Entry Criteria
Step
1
Activities
Defect Recording
Defect Data
Consistency
Time
Description
- Review the Project Plan Summary to verify that all of the defects found
in each phase were recorded.
- Using your best recollection, record any omitted defects.
- Check that the data on every defect in the Defect Recording log are
accurate and complete.
- Verify that the numbers of defects injected and removed per phase are
reasonable and correct.
- Using your best recollection, correct any missing or incorrect defect data.
- Review the completed Time Recording log for errors or omissions.
- Using your best recollection, correct any missing or incomplete time
data.
- A thoroughly tested program
- Completed Project Plan Summary form
- Completed Time and Defect Recording logs
Exit Criteria
VerifythatyouhavemetalloftheexitcriteriaforthePSP0postmortemphase,then
submityourassignment.
Submittingyour
assignment
Whenyouvecompletedthepostmortemphase,submityourassignment
package,sourcecode,andtestresultstotheinstructor.
Theorderfortheassignmentpackageis
PSP0ProjectPlanSummaryform
TimeRecordinglog
DefectRecordinglog
sourceprogramlisting
testresults
Program 1
October 2006
13
Yourprocessreportmustbe
complete
legible
inthespecifiedorder
Suggestions
Remember,youshouldcompletethisassignmenttoday.
Yourprocessdatamustbe
accurate
precise
selfconsistent
Keepyourprogramssimple.Youwilllearnasmuchfromdevelopingsmall
programsasfromlargeones.
Ifyouarenotsureaboutsomething,askyourinstructorforclarification.
Softwareisnotasolobusiness,soyoudonothavetoworkalone.
Youmust,however,produceyourownestimates,designs,code,and
completedformsandreports.
Youmayhaveothersreviewyourwork,andyoumaychangeitasaresult.
Youshouldnoteanyhelpyoureceivefromothersinyourprocessreport.
Logthereviewtimethatyouandyourassociatesspend,andlogthedefects
foundoranychangesmade.
Program 1
October 2006
14