annotated-10578536%20Assignment%201%20CSI2321.docx

pdf

School

Edith Cowan University *

*We aren’t endorsed by this school

Course

2312

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

6

Uploaded by ColonelMusic13929

Report
Assignment 1 - Software Engineering Problems Nicholas Foti (10578536) Submitted to: Martin Masek Submission date: 7/04/2023
Question 1: Function point analysis Q: 1.1 Calculate the complexity adjustment factor A: The complexity adjustment factor is calculated using the equation: K1 + K2 * SUM (Fi) = 0.65 + 0.01 x 47 = 1.12 Q: 1.2 Calculate the total adjusted function points A: To fine the adjusted function points you must first find the unadjusted function points (UFP) by multiplying the number of items by their weight and taking the sum. UFP = (3x3) + (6x4) + (4x6) + (8x4) + (6x5) + (2x7) + (3x3) + (5x4) + (4x6) + (5x7) + (6x10) + (10x15) + (12x5) + (5x7) + (8x10) = 606 Now you can calculate the adjusted function points (AFP) by multiplying the UFP by the previously calculated complexity adjustment factor (CAF) AFP = UFP x CAF = 606 x 1.12 = 678.72 Q: 1.3 Calculate the total cost of developing the software system A: The total cost of developing the software system is calculated by multiplying the adjusted function points by the cost per function point. It is stated in the brief that each function point will cost $8,800. = 678.72 * 8800 = $5,972,736
Question 2: MMRE Q: 2.1 Given the information in the table below, evaluate the model that Company A has been using by calculating MMRE and PRED and provide a rationale for your conclusion. For the rationale, you should go beyond what is in the unit materials and provide appropriate references. A: To calculate the Mean Magnitude of Relative Error (MMRE) you first need the Magnitude of Relative Error (MRE) MRE is calculated by: MRE = ABS ((Estimate – Actual) / Actual) = Actual Effort Estimated Effort MRE 140 126 14/140 = 0.1 240 225 15/240 = 0.0625 155 125 30/155 = 0.1935 350 345 5/350 = 0.0143 175 190 15/175 = 0.0857 272 220 52/272 = 0.1911 170 190 20/170 = 0.1176 125 160 35/125 = 0.28 180 150 30/180 = 0.1666 265 200 65/265 = 0.2452 138 120 18/138 = 0.1304 230 195 35/230 = 0.1521 MMRE can then be calculated using the equation: MMRE = (Sum(MRE) / n) where n is the total number of efforts = (0.1 + 0.0625 + 0.1935 + 0.0143 + 0.0857 + 0.1911 + 0.1176 + 0.28 + 0.1666 + 0.2452 + 0.1304 + 0.1521) / 12 = 0.1449 OR 14.4% PRED is the percentage of projects for which the estimate is within x% of the actual value. PRED(0.25) = k/n where k is the number of data points with MRE equal to or less than 0.25 and n is the total number of data points PRED(0.25) = 11/12 = 0.9166 OR 91.6% In conclusion, these outcomes predict that the models estimate is accurate as the MMRE is less that 0.25 and PRED(0.25) is greater than 75%.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 3: McCabe’s Cyclomatic Complexity Q: 3.1 Calculate the cyclomatic complexity metric for the flowchart in Figure 3.1. The nodes are the functions associated with the software system. Show your working. A: To calculate the cyclomatic complexity you can use three methods. Method 1 includes counting the number of edges and nodes, method 2 includes counting the binary decision points and method 3 includes counting the bounded regions in the graph. I will be using method 2 for this flowchart. Method 2: v(G) = #dp + 1 where #dp is the number of binary decision points. = 3 + 1 = 4 Using the method 3 equation to see if the answer is the same can confirm the correct answer. Method 3 = v(g) = #regions + 1 where #regions is the number of bounded regions in the chart = 3 + 1 = 4
Q: 3.2 If an update impacts the best route, three steps are performed (1. to 3. in the figure). Discuss the potential impact on the cyclomatic complexity measure of including the code to implement these steps in the flowchart? A: If the code aims to add three additional steps to the flowchart this would likely increase the cyclomatic complexity as more nodes and edges would be added. Both step one and three would add a decision point that branches off into two paths. However, the second step would not introduce a decision point meaning the difference of E – N would be greater. Question 4: Calculate Chidamber suite of metrics (using Java code) Q: 4.1 Weighted methods per class (WMC). Include default constructors in the calculation. A: The Cylinder class has 7 methods 1. No-Argument constructor Cylinder() 2. Constructor Cylinder 3. Set height of Cylinder 4. Calculate area of Cylinder 5. Calculate volume of Cylinder 6. Convert Cylinder to a String 7. Get height of Cylinder Therefore, WMC of the Cylinder Class if 7 Q: 4.2 Depth of Inheritance Tree (DIT) A: The DIT of the Cylinder class is 4 because the Cylinder class inherits from the circle class which then inherits from the Point class giving a total of 3 however, because this is JAVA code you have to add 1. Therefore, DIT of Cylinder class = 4 Q: 4.3 Number of Children (NOC) A: There is no subclasses that extend the Cylinder class in this piece of JAVA code Therefore, NOC = 0
Q: 4.4 Coupling between objects (CBO) A: The Cylinder class is coupled to the Circle class through inheritance. The Math class is also used however, it is part of the standard JAVA library therefore will not be considered in the calculation of CBO. Therefore, CBO = 1 Q: 4.5 Response for Class (RFC) A: the RFC is the number of methods in the Cylinder class plus the methods it calls from other classes. There are 7 methods in the Cylinder class as stated before, and it calls 3 methods (super.toString(), super.area(), and the no argument constructor) 7+3 = 10 RFC = 10 Q: 4.6 Lack of Cohesion of Methods A: The LCOM is calculated from the number of method pairs that do not share instance variables minus the number of method pairs that share at least one. However, in this case the number of method pairs that do not share instance variables is 0 therefore, the LCOM = 0 since the number of pairs that share at least one instance is greater than or equal to the number of method pairs that do not share any instance variables LCOM = 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help