1 / 5

91.3913 Assignment 4 Answers April 5, 2002

91.3913 Assignment 4 Answers April 5, 2002. Total of 27 marks. 1. Cyclomatic complexity. 4 marks. Either of these two representations is correct (simple sequences can be collapsed to a single node). CC = #edges - #nodes +2 = 6 - 6 + 2 = 2

efuru
Download Presentation

91.3913 Assignment 4 Answers April 5, 2002

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 91.3913 Assignment 4 Answers April 5, 2002 Total of 27 marks 1. Cyclomatic complexity 4 marks Either of these two representations is correct (simple sequences can be collapsed to a single node). CC = #edges - #nodes +2 = 6 - 6 + 2 = 2 CC = #edges - #nodes +2 = 4 - 4 + 2 = 2

  2. 91.3913 Assignment 4 Answers April 5, 2002 2. WMC, using technique a), is the number of methods in a class: SalesLineItem 2 ProductSpecification 4 Sale 6 3 marks 4 marks 3. LCOM, using technique a) for each attribute calculate: #methods using the class number of attributes then calculate the average of those values; convert the average to a percentage; subtract that from 100: SalesLineItem (two methods and two attributes) average of 2/2 and 2/2 is 1 ==> 100% ==> 100-100 = 0 ProductSpecification(four methods and three attributes) average of 2/4, 2/4, and 2/4 is 0.5 ==> 50% ==> 100-50 = 50

  3. 91.3913 Assignment 4 Answers April 5, 2002 16 marks 4. An O-R mapping: Class Maps to Relation Sale Sale SalesLineItem SalesLineItem ProductSpecification ProductSpecification Association Maps to Relation/FKey contains FK in SalesLineItem (refers to Sale) describes FK in SalesLineItem (refers to ProductSpecification)

  4. 91.3913 Assignment 4 Answers April 5, 2002 Relational Schema Sale sOID date isComplete ... SalesLineItem slOID quantity sOID pOID ProductSpecification pOID description price itemID

  5. 91.3913 Assignment 4 Answers April 5, 2002 Sale Rows: sOID date isComplete ... 111 4/5/2002 false ... SalesLineItem slOID quantity sOID pOID 667 1 111 195 875 2 111 195 ProductSpecification pOID description price itemID 195 Product 1 $2..50 1

More Related