\input{../settings/settings}
\usepackage{listings} \lstset{numbers=left, numberstyle=\tiny, numbersep=5pt}
\usepackage{enumitem}
\lstset{language=Java, numbersep=10pt, tabsize=5}

\begin{document}
	 \klausur{Foundations of Software Engineering}{Prof. Lüttgen}{Sommersemester 2014}{90}{Einsprachiges Wörterbuch}
	 
	 \section{Description}
	 \subsection*{Proposal for a Virtual Scrum Board (VSB)}
	 The VSB is a computer-based system that provides a virtual scrum task board for a team of software engineers. These engineers apply Scrum for developing software on the basis of User Stories, the requirements are represented by User Stories and each sprint's development is based on Tasks. VSB users can take on the core rules of Scrum, i.e. Scrum Master, Product Owner and Developer. Users can either work locally or remotely with VSB.
	 \subsubsection*{Story \& Task functionality}
	 VSB allows users to create and update User Stories. User Stories are kept in a Product Backlog. VSB also permits users to create and update Tasks.
	 \subsubsection*{Task board functionality}
	 VSB permits users to generate a prioritized Sprint Backlog, to assign Tasks to Developers, to trace Tasks on the Task Board between the statuses ToDo, In Progress and Done, and to declare User Stories as completed.
	 \subsubsection*{Remote team functionality}
	 VSB provides an interface for projectmanagement, e.g. displaying the relation between Task and the Developer that worked on this Task at any point in time. This information is also available to Human Resources, i.e. the personal department. In addition, VSB provides several algorithms for estimating the current development speed of the Developer team.
	 \subsubsection*{Authentification and authorization functionality}
	 Each user authentificates by providing their login name and password before beeing assigned the appropriate roles to authorize access to VSB's functionality.\\
	 \\
	 \underline{Note}: Where there is a lack of detail in the proposal above, you are permitted to make assumptions. However, you shall always clearly state those assumptions in your answers.

	\newpage
	 
	\section{Q1: Blastoff and Requirements \hfill [15 Marks]} 
	 	(1a) State the goal of VSB. \hfill [5 Marks]\\
	 	\\
	 	(1b) Provide a stakeholder map for VSB containing at least eight stakeholders. \hfill [6 Marks]\\
	 	\\
	 	(1c) Describe one realistic non-functional requirement for VSB. Also include its \hfill [4 Marks] \newline rationale and fit criterion, and name the source of the requirement.\\
	 	
	 	\newpage
	 
	\section{Q2: Use Cases \hfill [35 Marks]}
	 	The subsequent questions refer to the following use case "Add New Task":\\
		\\
	 		\begin{tabular}{ll}
			Name: & Add New Task\\
			Primary Actor: & Developer\\
			Main Success Scenario:
	 		\end{tabular}

	 		\begin{enumerate}
	 		\item Developer chooses the User Story to which the Task belongs.
	 		\item Developer provides the title of the Task.
	 		\item Developer chooses the names of the Developers to whom the Task will be assigned.
	 		\item VSB verifies whether the Tasks title is new and that the provided Developers are known to the system.
	 		\item Developer approves the Task.
	 		\item VSB creates the Task and adds it to the Task Board.
	 		\item VSB updates the Sprint Backlog accordingly.
	 		\end{enumerate}
	 	(2a) Supplement the use case "Add new Task" by documenting at least two distinct \hfill [5 Marks] \newline alternative scenarios in high-ceremony format. \\
	 	\\
	 	(2b) For the use case "Add New Task", supply the missing fields required by the \hfill [7 Marks] \newline high-ceremony template introduced in the lectures. List all missing fields, and provide \\ reasonable values for each.\\
	 	\\
	 	(2c) Conduct a use case realization regarding use case "Add New Task".  \hfill [13 Marks] \newline Apply your knowledge on Tasks, User Stories und Scrum to derive additional \\ attributes, services/methods, and relations between the derived classes.\\
	 	\\
	 	(2d) Analyse the object lifecycle of the VSB object "Task":  \hfill [10 Marks]
	 	\begin{enumerate}[label={\alph*)}]
	 	     \item Draw a state machine for object "Task", which reflects the information contained in the use case "Add New Task".
	 	     \item Given your knowledge of Tasks und User Stories, add and highlight any missing states or transitions in your answers to (a).
	 	     \item Supply a UML diagram of class "Task", which summarizes your results from (a) and (b).
	 	\end{enumerate} 
	 	
	\newpage
	 	
	\section{Q3: Design \hfill [30 Marks]}
	 	(3a) Propose an architecture for VSB by drawing an appropriate diagram.  \hfill [10 Marks] \newline If any architecture pattern from the lectures is visible in your diagram, explicitly \newline name and highlight this pattern. Discuss the quality of your proposed architecture \newline regarding the design principles presented in the module.\\
	 	\\
	 	(3b) Explain the Strategy Design Pattern: \hfill [15 Marks]
	 	\begin{enumerate}
	 		 \item Supply a UML class diagram representing the pattern's structure.
	 		 \item Explain the pattern's behaviour.
	 		 \item Mention one advantage and one disadvantage of the Strategy Pattern.
	 		 \item Propose two different areas in VSB's design where this design pattern can be applied.
	 	\end{enumerate}
	 	\vspace{3mm}
	 	(3c) Compare and contrast the two concepts composition and inheritance in \hfill [5 Marks] \newline object orientation. State which one should be preferred, and give two arguments \newline supporting your answer.\\
	 	
	\newpage
	
	\section{Q4: Testing \hfill [20 Marks]}
		(4a) Propose a black-box test suite for the following Java method by stating four \hfill [6 Marks] \newline different test cases. 
		\begin{lstlisting}
	\\returns position of needle in haystack
	int calculateFirstOccurencePosition (char[] haystack, char[] needle)
		\end{lstlisting}
		\vspace{3mm}
		(4b) Consider the following Java method: \hfill [11 Marks]
		\begin{lstlisting}
	int calculateFirstOccurencePosition(char[] haystack, char[] needle){
		int n = haystack.length;
		int m = needle.length;
		for(int i = 0; i<n-m; i++){
			int j = 0;
			while(j<m && haystack[i+j] == needle[j]){
				j++;
			}
			if(j == m){
				return i;
			}
			return -1;
		}
	}
		\end{lstlisting}
	 	\begin{enumerate}[label={\alph*)}]
	 	     \item Draw the control flow graph corresponding to the method above.
	 	     \item Propose a test suite for the above method such that full branch coverage is achieved.
	 	     \item Demonstrate full branch coverage of the test suite in your answer to (b).
	 	\end{enumerate} 
	 	\vspace{3mm}
	 	(4c) Briefly explain the concept of "stub", and mention in which specific context of \hfill [3 Marks] \newline testing it is applied.

\end{document}