--- 02/assignment2.tex	2003/12/11 14:44:50	1.1
+++ 02/assignment2.tex	2003/12/12 14:52:20	1.7
@@ -24,70 +24,158 @@
         These three supplements each other adding references to
         each other. None of these is useful by itself, but by
         adding them up one can get a better perspective of the
-        size of the software.
+        size of the software. The length itself don't tell
+        anything of how large the completed software will be, but
+        together with functions and complexity one can understand
+        the size of the software. Once the size of the software is
+        established one may come with effort estimations, and
+        based on those make a budget for what resources the
+        project will need. Given these three it is possible to get
+        an idea of how productive a programmer is during a time
+        unit. It will not be a perfect answer, but it will be
+        something that could be used to measure deviations in work
+        etc.
     \subsection{Give an example where code length measure can be useful and an
     example where source code length measure is not useful.}
-        svar
+        Code length is useful if it is not going to be used by
+        itself. One example of this could be if we are interested
+        in how much work is done in a week. Then we could look at
+        loc, and also take into account the complexity and the functions provided
+        (like loc * complexity / functions or something similar).
+        Then loc could be useful.
+
+        Code length is useless if it is used by itself. For
+        example the statement I am a good programmer since I
+        produce more then n loc per week useless.
     \subsection{Explain what are the main ideas behind Albrecht's Function Points.
     Discuss advantages and disadvantages of the measure. Motivate.}
-        svar
+        %denna var bra http://www.spr.com/products/function.htm
+        The main idea behind FP's are to provide  language
+        independent metric that can be used no matter what
+        language are used. Albrech thought it was wrong that the
+        only way to tell effort and cost per effort until he begun
+        was in loc. A often used metric to tell productivity was
+        cost/loc, and that don't tell anything since different
+        languages require different number of loc's to solve the
+        same problem. This cost could be lover if the language
+        requires a lot of code, but the end cost could still get
+        higher if the program takes longer time to complete.
+        The main idea behind FP's is to give ways to
+        tell cost and productivity in a way that is language
+        independent. FP's does satisfy this idea. A easier
+        language will get a lower cost/FP and a greater number of
+        FP's/person\&month then a more complex language.
+
+        The great advantage with this method is that it is (almost) truly
+        language independent, while a disadvantage would be that
+        if this is established in the beginning of a project and
+        should be used to choose a appropriate language to use, if
+        the language is unfamiliar, then these metrics can't be
+        computed (like FP's/person\&month). Also this way of presenting
+        the result does not take into account training and
+        inexperience while showing the result. Also this should
+        not be used to compare different projects or groups to se
+        the difference between them since this does not take
+        everything into account. Also one might be tempted to
+        always use the language with the highest productivity,
+        this is good in most cases, but sometimes there are other
+        factors to sum in, like speed, security etc.
     \subsection{Describe structural measures presented by Fenton. (Control flow
     structure, Data flow structure, Data structure). Give an example
     where you explain how one could use the structural measures
     (specify which structural measure) to ensure the quality of the
     software product.}
-        svar
+        %http://sern.ucalgary.ca/~kliewerc/SENG/623/summaries.htm#sum02 var lite halvbra... det bästa jag kunde hitta dock, + F4...
+        Control flow is a diagram with nodes, connected via the
+        directed connections showing the possible routs the
+        program (or actually the flow of data in the program) may
+        take. This could be broken down to several diagrams if it
+        gets to large and complex. This diagram can be used to
+        decide how many test cases is needed to test the program
+        completely.
+
+        The data flow structure could be shown in a module-call
+        graph. The module-call graph shows what modules calls what
+        other modules, and thereby showing more the flow of
+        information within the program. This may also be used to
+        show coupling and cohesion in the program.
+
+        The data structure can be measured both locally and
+        globally. Locally it is interesting how much data
+        structure each data item has, and globally it is the
+        amount of data for the system. For the local data
+        structures very little research has been done, but for the
+        global there are more.
     \subsection{Draw the flow graph for the program, which
     based on the data provided by everyday measurements of the air
     temperature will calculate the maximum, minimum and the most
     commonly occurred temperature (the temperature that occurs twice
     or more) for a given month. Present program paths that has to be
     executed in order to satisfy the following testing strategies:}
+        See appendix a for the diagram.
         \subsubsection{Statement coverage}
-            svar
+            a-b-c-d-e-f-g-h-i-j-k-l-m-n
         \subsubsection{Branch coverage}
-            svar
+            a-b-c-d-e-f-g-h-i-j-k-l-m-n \\
+            a-b-c-b-c-d-e-g-i-j-k-m-n \\
+            a-b-c-d-e-f-g-h-i-j-k-l-m-k-m-n \\
         \subsubsection{Visit each loop}
-            svar
+%osäker på om detta är rätt...jag har bara antagit att man skall göra ett test så att man kör alla looparna
+            a-b-c-b-c-d-e-f-g-e-f-g-h-i-g-h-i-j-k-l-m-k-m-n
     \subsection{Calculate the cyclomatic complexity of your program. What does
     this figure tell you?}
-        svar
+        %Cyclomatic complexity (CC) = E - N + p
+        %where E = the number of edges of the graph
+        %N = the number of nodes of the graph
+        %p = the number of connected components
+        %http://www.sei.cmu.edu/str/descriptions/cyclomatic.html
+        Hopefully you mean McCabe's cyclomatic complexity\\
+        % e = no of arcs | n = no of nodes
+        e-n+2 | 18 - 14 + 2 = 18 - 16 = 2 \\ %men vad säger nu detta
+        This tells us the number of tests we have to do to cover
+        each path in the program. It could also be used to give a
+        estimation of how complex the final software will be. If
+        higher then 20 it should be seen as a high risk project,
+        and if higher then 50 as a very high risk project.  %nuffrorna kommer från http://www.sei.cmu.edu/str/descriptions/cyclomatic.html
   \section{OO metrics}
   \textbf{Measuring the use cases}
+    %vi skall använda templaten, och bifoga denna...
     \subsection{Measure the use case specifications shown in Design 1 using the
     chosen use case metrics suite from the lecture}
-        svar
+        See appendix b.
     \subsection{Measure the use case specifications shown in Design 2 using the
     chosen use case metrics suite from the lecture}
-        svar
+        See appendix c.
     \subsection{Write a short section (up to ½ page) with answers to the following
     questions:}
-        \subsubsection{Which of the two systems presented can be expected to be
-             more complex and why?}
-                svar
-        \subsubsection{Which of the two systems can be expected to require more
-            effort to be built? Why?}
-                svar
-  \textbf{Measuring designs}
+        \begin{itemize}
+            \item Which of the two systems presented can be expected to be
+            more complex and why?
+            \item Which of the two systems can be expected to require more
+            effort to be built? Why?
+        \end{itemize}
+            svar
+  \\ \\ \textbf{Measuring designs}
   \subsection{Measure the class diagram presented in Design 1 using the CK metrics suite presented on the
     lecture.}
-          svar
+          See appendix b.
     \subsection{Measure the class diagram presented in Design 2 using
     the CK metrics suite presented on the lecture.}
-          svar
+          See appendix c.
     \subsection{Measure the code in the files .java from Design 1 with the CK metrics suite
     presented on the lecture.}
-          svar
+          See appendix b.
     \subsection{ Measure the code in the files .java
     from Design 2 with the CK metrics suite presented on the lecture.}
-          svar
+          See appendix c.
     \subsection{Write a short section (up to ½ page) with answers to the following
     questions:}
-        \subsubsection{Which of the metrics could not be computed based on the class
-        diagrams? Why?}
-            svar
-        \subsubsection{Which of the two systems is more complex? Why?}
-            svar
+        \begin{itemize}
+            \item Which of the metrics could not be computed based on the class
+            diagrams? Why?
+            \item Which of the two systems is more complex? Why?
+        \end{itemize}
+        Svar
         \subsubsection{Which method of gathering metrics - from UML designs or source
         code - is less time consuming?}
             svar
@@ -95,14 +183,100 @@
     \subsection{Describe how the external product attributes differ from the
     internal ones. Describe the connection between external and
     internal product attributes.}
-          svar
-    \subsection{Assume that you are
-    working at the company that mainly specializes on developing of
-    web-based applications. Your manager gives you an assignment to
-    develop a software quality model for the company. The model should
-    show external quality attributes, corresponding internal
-    attributes and metrics. Present the assumptions that you will use
-    while creating of the quality model. Provide an explanatory text
+          The internal attributes can be measured from within the
+          system (like loc etc) while for the external attributes
+          one must look at the finished product to se the external
+          attributes. Also in general internal attributes are
+          considered easier to measure (and then predict) then the
+          external attributes.
+
+          This is partly since the internal attributes can be
+          measured more ``directly'' then the external. For
+          instance loc is easy to count while usability is a lot
+          harder to measure. For the internal attributes one can
+          expect to be able to get absolute values while on the
+          external attributes one can expect them to be less
+          accurate.
+
+          However several of the internal attributes (if not all)
+          does affect the external attributes in a way that can
+          (in most cases) be predicted. One can for instance say
+          that in a specific solution if the loc is increased
+          (both with comments) then one could expect to get a
+          higher maintainability. Also most of the external
+          attributes can be affected via the internal if the
+          developers keep the external attributes in mind.
+
+          In most cases (if not always) the customer of the product
+          is more interested in the external attributes. Does this
+          mean that the external attributes are of ``greater''
+          value to the team developing the product?
+
+          Not always but in many cases. Also one should keep in
+          mind that just because the external attributes are more
+          important that the internal could be forgotten.
+    %\subsection{Assume that you are working at the company that
+    %mainly specializes on developing of web-based applications.
+    %Your manager gives you an assignment to develop a software
+    %quality model for the company. The model should show external
+    %quality attributes, corresponding internal attributes and
+    %metrics. Present the assumptions that you will use while
+    %creating of the quality model. Provide an explanatory text
+    %for your model.} %Jag tyckte inte om att läsa den texten;)
+    \subsection{Assume that you are working at a company that
+    mainly specializes in development of web-based applications.
+    Your manager gives you an assignment to develop a software
+    quality model for the company. The model should show external
+    quality attributes, corresponding internal attributes and
+    metrics. Present the assumptions that you will use while
+    creating the quality model. Provide an explanatory text
     for your model.}
-        max 8 sidor
+        Assumptions: We are using an iterative development
+        process, we are using function points to measure progress,
+        we are using a good configuration management tool, we are
+        identifying risks before starting a project, we are, but
+        not always using uml for our projects.
+
+        Since we are working on web-based applications we also
+        assumed that we are selling those to a customer. This made
+        us make a value based quality view. This made us decide
+        that usability, lernability, reusability, maintainability, reliability,
+        is the most important external attributes. The internal
+        attributes are not considered as important, other than to
+        help up the external. Customer satisfaction does supersede
+        this thou. The external attributes has the following
+        impact on customer satisfaction: \\
+        \begin{tabular}{|l|l|l|}
+            \hline
+            Attribute       & Importance    & Role \\ \hline
+            Usability       & High          &
+                Decides if the customer fells that he may use\\
+            & & the product or not. The more usable the product\\
+            & &  becomes, the higher value it gets (and thereby\\
+            & &  higher quality).   \\ \hline
+%hmmm, borde finnas nått bättre sätt...
+            Learnability    & High          &
+                The quicker the end-user can learn to use the \\
+            & & program, the quicker he feels the value of the\\
+            & & program and does need it. This makes the \\
+            & & customer feels a gain from buying our product \\ \hline
+            Reusability     & Medium        &
+                This is only important if using agreements like\\
+            & & ``avtal 90'' or similar that gives us the freedom\\
+            & & of the developed artifacts, and may use them in\\
+            & & projects to come. If the customer has no demands\\
+            & & on this, and will own the artifacts then it is \\
+            & & not taken into consideration.\\ \hline
+            Maintainability & Medium    &
+                This is only important if we are using the \\
+            & to low &
+                reusability from above. And only to support that\\
+            & & purpose. Otherwise this would not have been a \\
+            & & issue at all. \\ \hline
+            Reliability     & High      &
+                This is important since a reliable program is \\
+            & & seen as having a higher value. \\ \hline
+        \end{tabular} \\ \\
+        Internal attributes are only important in order to gain
+        the external attributes.
 \end{document}
