Kĩ thuật lập trình - Lecture 14: Software metrics

Why Measure Software Fundamentals of Measurement Theory Use Case Points

ppt20 trang | Chia sẻ: thuychi16 | Lượt xem: 650 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Kĩ thuật lập trình - Lecture 14: Software metrics, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Ivan MarsicRutgers UniversityLECTURE 14: Software Metrics1TopicsWhy Measure SoftwareFundamentals of Measurement TheoryUse Case Points2Why Measure SoftwareTo estimate development time and budgetTo improve software quality3Measurement Scale (1)Nominal scale – group subjects into categoriesExample: designate the weather condition as “sunny,” “cloudy,” “rainy,” or “snowy”The two key requirements for the categories: jointly exhaustive & mutually exclusiveMinimal conditions necessary for the application of statistical analysisOrdinal scale – subjects compared in orderExamples: “bad,” “good,” and “excellent,” or “star” ratingsArithmetic operations such as addition, subtraction, multiplication cannot be applied4Measurement Scale (2)Interval scale – indicates the exact differences between measurement pointsExamples: traditional temperature scale (centigrade or Fahrenheit scales)Arithmetic operations of addition and subtraction can be appliedRatio scale – an interval scale for which an absolute or nonarbitrary zero point can be locatedExamples: mass, temperature in degrees Kelvin, length, and time intervalAll arithmetic operations are applicable5Subjective Metrics6Subjective Metrics7Use Case Points (UCPs)Size and effort metricAdvantage: Early in the product development (after detailed use cases are available)Drawback: Many subjective estimation steps involvedUse Case Points = function of (size of functional features (“unadjusted” UCPs)nonfunctional factors (technical complexity factors)environmental complexity factors (ECF))8Actor Classification and WeightsActor typeDescription of how to recognize the actor typeWeightSimpleThe actor is another system which interacts with our system through a defined application programming interface (API).1AverageThe actor is a person interacting through a text-based user interface, or another system interacting through a protocol, such as a network communication protocol.2ComplexThe actor is a person interacting via a graphical user interface.39Example: Safe Home AccessActor nameDescription of relevant characteristicsComplexityWeightLandlordLandlord is interacting with the system via a graphical user interface (when managing users on the central computer).Complex3TenantTenant is interacting through a text-based user interface (assuming that identification is through a keypad; for biometrics based identification methods Tenant would be a complex actor).Average2LockDeviceLockDevice is another system which interacts with our system through a defined API.Simple1LightSwitchSame as LockDevice.Simple1AlarmBellSame as LockDevice.Simple1DatabaseDatabase is another system interacting through a protocol.Average2TimerSame as LockDevice.Simple1PoliceOur system just sends a text notification to Police.Simple1*Actor classification for the case study of home access control Unadjusted Actor Weight (UAW)UAW(home access) = 5  Simple  2  Average  1  Complex = 51  22  13 = 1210Use Case WeightsUse case weights based on the number of transactions Use case categoryDescription of how to recognize the use-case categoryWeightSimpleSimple user interface.Up to one participating actor (plus initiating actor).Number of steps for the success scenario:  3.If presently available, its domain model includes  3 concepts.5AverageModerate interface design.Two or more participating actors.Number of steps for the success scenario: 4 to 7.If presently available, its domain model includes between 5 and 10 concepts.10ComplexComplex user interface or processing.Three or more participating actors.Number of steps for the success scenario: 7.If available, its domain model includes 10 concepts.1511Example: Safe Home AccessUse caseDescription CategoryWeightUnlock (UC‑1)Simple user interface. 5 steps for the main success scenario. 3 participating actors (LockDevice, LightSwitch, and Timer).Average10Lock (UC‑2)Simple user interface. 2+3=5 steps for the all scenarios. 3 participating actors (LockDevice, LightSwitch, and Timer).Average10ManageUsers (UC‑3)Complex user interface. More than 7 steps for the main success scenario (when counting UC‑6 or UC‑7). Two participating actors (Tenant, Database).Complex15ViewAccessHistory (UC‑4)Complex user interface. 8 steps for the main success scenario. 2 participating actors (Database, Landlord).Complex15AuthenticateUser (UC‑5)Simple user interface. 3+1=4 steps for all scenarios. 2 participating actors (AlarmBell, Police).Average10AddUser (UC‑6)Complex user interface. 6 steps for the main success scenario (not counting UC‑3). Two participating actors (Tenant, Database).Average10RemoveUser (UC‑7)Complex user interface. 4 steps for the main success scenario (not counting UC‑3). One participating actor (Database).Average10Login (UC‑8)Simple user interface. 2 steps for the main success scenario. No participating actors.Simple5Use case classification for the case study of home access control UUCW(home access) = 1  Simple  5  Average  2  Complex = 15  510  215 = 8512Technical Complexity Factors (TCFs)Technical factorDescriptionWeightT1Distributed system (running on multiple machines)2T2Performance objectives (are response time and throughput performance critical?)1()T3End-user efficiency1T4Complex internal processing1T5Reusable design or code1T6Easy to install (are automated conversion and installation included in the system?)0.5T7Easy to use (including operations such as backup, startup, and recovery)0.5T8Portable2T9Easy to change (to add new features or modify existing ones)1T10Concurrent use (by multiple users)1T11Special security features1T12Provides direct access for third parties (the system will be used from multiple sites in different organizations)1T13Special user training facilities are required113Technical Complexity Factors (TCFs)TCF = Constant-1  Constant-2  Technical Factor Total = Constant-1 (C1) = 0.6Constant-2 (C2) = 0.01Wi = weight of ith technical factorFi = perceived complexity of ith technical factor 14Scaling Factors for TCF & ECF15ExampleTechnical factorDescriptionWeightPerceived ComplexityCalculated Factor (WeightPerceived Complexity)T1Distributed, Web-based system, because of ViewAccessHistory (UC‑4)2323 = 6T2Users expect good performance but nothing exceptional1313 = 3T3End-user expects efficiency but there are no exceptional demands1313 = 3T4Internal processing is relatively simple1111 = 1T5No requirement for reusability1010 = 0T6Ease of install is moderately important (will probably be installed by technician)0.530.53 = 1.5T7Ease of use is very important0.550.55 = 2.5T8No portability concerns beyond a desire to keep database vendor options open2222 = 4T9Easy to change minimally required1111 = 1T10Concurrent use is required (Section 5.3)1414 = 4T11Security is a significant concern1515 = 5T12No direct access for third parties1010 = 0T13No unique training needs1010 = 0Technical Factor Total:3116Environmental Complexity Factors (ECFs)ECF = Constant-1  Constant-2  Environmental Factor Total = Constant-1 (C1) = 1.4Constant-2 (C2) = 0.03Wi = weight of ith environmental factorFi = perceived impact of ith environmental factor Environmental factorDescriptionWeightE1Familiar with the development process (e.g., UML-based)1.5E2Application problem experience0.5E3Paradigm experience (e.g., object-oriented approach)1E4Lead analyst capability0.5E5Motivation1E6Stable requirements2E7Part-time staff1E8Difficult programming language 117Environmental factorDescriptionWeightPerceived ImpactCalculated Factor (Weight Perceived Impact)E1Beginner familiarity with the UML-based development1.511.51 = 1.5E2Some familiarity with application problem0.520.52 = 1E3Some knowledge of object-oriented approach1212 = 2E4Beginner lead analyst0.510.51 = 0.5E5Highly motivated, but some team members occasionally slacking1414 = 4E6Stable requirements expected2525 = 5E7No part-time staff will be involved1010 = 0E8Programming language of average difficulty will be used1313 = 3Environmental Factor Total:11ExampleEnvironmental complexity factors for the case study of home access 18Calculating the Use Case Points (UCP)UCP = UUCP  TCF  ECFFrom the above calculations, the UCP variables have the following values:UUCP = 97TCF = 0.91ECF = 1.07For the sample case study, the final UCP is the following:UCP = 97  0.91  1.07 = 94.45 or 94 use case points. 19Project DurationProductivity Factor (PF)Duration = UCP  PF20
Tài liệu liên quan