<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Amajumd</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Amajumd"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Amajumd"/>
	<updated>2026-08-07T10:26:05Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108970</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108970"/>
		<updated>2017-08-18T15:26:18Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Self Service Machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Restaurant===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/examples/online-shopping-use-case-diagram-example.html?context=uc-examples Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://www.cloudbus.org/~raj/254/Lectures/RajUML2.pdf Self-Service Machine (page-3)]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108969</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108969"/>
		<updated>2017-08-18T15:25:44Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Self Service Machine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Restaurant===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/examples/online-shopping-use-case-diagram-example.html?context=uc-examples Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://www.cloudbus.org/~raj/254/Lectures/RajUML2.pdf (page-3) Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108968</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108968"/>
		<updated>2017-08-18T15:19:12Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* A shopping website order Process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Restaurant===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/examples/online-shopping-use-case-diagram-example.html?context=uc-examples Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108967</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108967"/>
		<updated>2017-08-18T15:18:06Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Club Information System */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Restaurant===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://www.uml-diagrams.org/restaurant-uml-use-case-diagram-example.html Restaurant]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://tynerblain.com/blog/2007/04/09/sample-use-case-example/ Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108966</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108966"/>
		<updated>2017-08-18T15:09:51Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Purchase order */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [https://creately.com/diagram/example/ifq4uulr/Purchase%20Order Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://tynerblain.com/blog/2007/04/09/sample-use-case-example/ Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108965</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108965"/>
		<updated>2017-08-18T15:07:16Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* ATM system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.fsu.edu/~baker/swe1/restricted/templates/rr631gv1_stuwrk_withdraw_cash_use-case_spec.pdf ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://tynerblain.com/blog/2007/04/09/sample-use-case-example/ Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108964</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108964"/>
		<updated>2017-08-18T15:05:18Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* A shopping website order Process */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://tynerblain.com/blog/2007/04/09/sample-use-case-example/ Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108963</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108963"/>
		<updated>2017-08-18T15:00:15Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Basic use case template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case.&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108962</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108962"/>
		<updated>2017-08-18T14:51:52Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* UML Diagrams and Use cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [https://www.smartdraw.com/uml-diagram/ An introduction to UML diagrams &amp;amp; Tutorial] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case. The complete reference can be found at [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template][4]&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108961</id>
		<title>CSC/ECE 517 Fall 2007/wiki2 4 2q</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2007/wiki2_4_2q&amp;diff=108961"/>
		<updated>2017-08-18T14:48:36Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: /* Definition */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''A Guide to Use Cases on the WEB'''&lt;br /&gt;
&lt;br /&gt;
''Topic :Use cases. There are even more pages on the Web on use cases than on MVC. If someone wants to learn about them, what should (s)he do? Look at the first few hits in Google? I expect we can do better than that. Write a review of the use-case sites on the Web. Which are best for learning about the concept? Which have the most instructive examples? Which teach advanced concepts that are not apparent in perusing most use-case sites? Read at least several dozen pages before deciding how to organize your overview.'' &lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
This page tries to review the use-case sites on the Web which can be useful to best understand the concept. Also a few instructive examples are covered paying attention to the basic use case as well as advanced concepts that are not apparent in perusing most use-case sites.&lt;br /&gt;
 &lt;br /&gt;
=What is a Use Case?=&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;'''''Use case''' is a methodology used in software and systems engineering to understand and identify the functional requirements of a system. Use cases describe the interaction between a primary actor, the initiator of the interaction and the system itself, represented as a sequence of simple steps.''&amp;quot;[1][2]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An actor who can more generally be described as the user of the system, is the external entity and can be a person or another system itself. A use case can be best described as what happens when the actor is using the system to achieve some goal. This goal is nothing but the end result which follows the sequence of events as described in the use cases. &lt;br /&gt;
&lt;br /&gt;
Every use case gives a complete list of events which occur from the time the actor starts interacting with the system till the time the final goal is achieved. A use case also records all the possible scenarios that may occur while trying to reach the desired goal. We can think of it as existence of a main course of events that will occur in normal circumstances, to which the exceptional cases are added. Anything that is not relevant to the actor/user is not a part of the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are a few links to external websites which further illustrate this concept.&lt;br /&gt;
&lt;br /&gt;
* [https://www.ibm.com/developerworks/library/ws-using-oo/ OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
&lt;br /&gt;
==UML Diagrams and Use cases==&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''The Use case diagram is used to identify the primary elements and processes that form the system. The primary elements are termed as 'actors' and the processes are called &amp;quot;use cases.&amp;quot; The Use case diagram shows which actors interact with each use case.&amp;quot;''[3]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
They are useful in providing a pictorial view of the interactions between the users (actors) and sets of events (use cases) associated with the system.They also evolve as the projects or system change with time. The standard elements of a use case diagram makes comprehension easy for anyone trying to understand the use case.&lt;br /&gt;
&lt;br /&gt;
Listed below are useful links in understanding how to draw typical use case diagrams.&lt;br /&gt;
&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
&lt;br /&gt;
=Examples using Use Cases=&lt;br /&gt;
In this section, a few instructive examples have been outlined along with their references which illustrate different ways in which use cases can be written. The first example is a basic use-case template.&lt;br /&gt;
&lt;br /&gt;
===Basic use case template===&lt;br /&gt;
Described below are some the characteristics of a typical use case. The complete reference can be found at [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template][4]&lt;br /&gt;
  '''CHARACTERISTIC INFORMATION'''&lt;br /&gt;
  * ''Goal in Context'':   Buyer issues request directly to our company, expects goods shipped and to be billed.&lt;br /&gt;
  * ''Scope'':  Company&lt;br /&gt;
  * ''Preconditions'':  We know Buyer, their address, etc.&lt;br /&gt;
  * ''Success End Condition'':  Buyer has goods, we have money for the goods.&lt;br /&gt;
  * ''Failed End Condition'':  We have not sent the goods, Buyer has not spent the money.&lt;br /&gt;
  * ''Primary Actor'':  Buyer, any agent (or computer) acting for the customer&lt;br /&gt;
  * ''Trigger'':  purchase request comes in.&lt;br /&gt;
  &lt;br /&gt;
  '''MAIN SUCCESS SCENARIO'''&lt;br /&gt;
  1. Buyer calls in with a purchase request.&lt;br /&gt;
  2. Company captures buyer’s name, address, requested goods, etc.&lt;br /&gt;
  3. Company gives buyer information on goods, prices, delivery dates, etc.&lt;br /&gt;
  4. Buyer signs for order.&lt;br /&gt;
  5. Company creates order, ships order to buyer.&lt;br /&gt;
  6. Company ships invoice to buyer.&lt;br /&gt;
  7. Buyers pays invoice.&lt;br /&gt;
  &lt;br /&gt;
  '''EXTENSIONS'''&lt;br /&gt;
  3a. Company is out of one of the ordered items: &lt;br /&gt;
      3a1. Renegotiate order.&lt;br /&gt;
  4a. Buyer pays directly with credit card:&lt;br /&gt;
      4a1. Take payment by credit card (use case 44)&lt;br /&gt;
  7a. Buyer returns goods:&lt;br /&gt;
      7a. Handle returned goods (use case 105)&lt;br /&gt;
The basic steps that can be followed so as to ensure writing an effective use case has been described well in [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases].[5]&lt;br /&gt;
&lt;br /&gt;
===Club Information System===&lt;br /&gt;
This example provides one use case but distinctly provides a step by step analysis of the events that constitute a Use Case. It mentions the actors, pre-conditions, Exceptions and Alternative scenarios.&lt;br /&gt;
&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
&lt;br /&gt;
===Purchase order===&lt;br /&gt;
This example provides a typical use case specification by listing the Activity, Result, Constraints and Extensions involved with a purchase order from a Finance web page.&lt;br /&gt;
&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
&lt;br /&gt;
===ATM system===&lt;br /&gt;
This example is a little more involved in that it provides a number of use cases associated with using an ATM system including cash withdrawal,&lt;br /&gt;
transfers, deposits, balance inquiry, etc.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
&lt;br /&gt;
===A shopping website order Process===&lt;br /&gt;
This is a very good example that describes the scenarios and extensions involved in writing a use case for a online shopping order. It also describes the UML diagram.  &lt;br /&gt;
&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
&lt;br /&gt;
===Self Service Machine===&lt;br /&gt;
This example provides the typical Use Cases in a self service machine. Some of the aspects of using a self service machine are: buying a product, re-stocking the machine, collecting the money etc. The following link expands on how to do this and also provides the UML diagrams which depict the interaction between the users and system through the use case&lt;br /&gt;
  &lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
&lt;br /&gt;
=Advanced Concepts on Use Cases=&lt;br /&gt;
&lt;br /&gt;
==Pluggable Use Cases==&lt;br /&gt;
&lt;br /&gt;
Most of the time it is found that common behavior is replicated in Use Cases. This can be handled by writing Use Cases with basic behavior which can be 'plugged-in' to write use cases which cover more behavior. This makes them reusable from one project to another.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; &amp;quot;''A pluggable use case is written in a generic form such that it may be exercised wherever needed. As the name implies a pluggable use case can be ‘plugged’ into any other use case even another pluggable use case. It contains a cohesive set of functionality that encapsulates the common behavior of a subgoal, where this subgoal exists in multiple transactions. Because a pluggable use case only constitutes a subgoal of another use case its context must be inferred from the invoking use case.&amp;quot;'' [6]&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following link gives a detailed description of this concept&lt;br /&gt;
&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [1] Ivar Jacobson (1992). Object-Oriented Software Engineering. Addison Wesley Professional. ISBN 0-201-54435.&lt;br /&gt;
* [2] [http://en.wikipedia.org/wiki/Use_case Wikipidea Page] Basic definition of Use Case&lt;br /&gt;
* [3] [http://www.developer.com/design/article.php/2109801 Use Case Diagrams]&lt;br /&gt;
* [4] [http://alistair.cockburn.us/images/Uctempla.doc Basic Use Case Template]&lt;br /&gt;
* [5] [http://www.gatherspace.com/static/use_case_example.html#1 Writing Effective Use Cases]&lt;br /&gt;
* [6] [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;br /&gt;
&lt;br /&gt;
=External Links=&lt;br /&gt;
&lt;br /&gt;
* [http://www.ibm.com/developerworks/webservices/library/co-design5.html OO design process: Use cases, an introduction]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Use_case_fundamentals Use Case Fundamentals]&lt;br /&gt;
* [http://members.aol.com/acockburn/papers/AltIntro.htm An introduction to UML diagrams] &lt;br /&gt;
* [http://www.developer.com/design/article.php/2109801 Elements of a Use Case Diagram]&lt;br /&gt;
* [http://atlas.kennesaw.edu/~dbraun/csis4650/A&amp;amp;D/UML_tutorial/use_case.htm  Tutorial for Use Case Diagrams]&lt;br /&gt;
* [http://odl-skopje.etf.ukim.edu.mk/uml-help/html/02day12.html Self-Service Machine]&lt;br /&gt;
* [http://web.cecs.pdx.edu/~maier/386/usecase06.pdf Club Information System]&lt;br /&gt;
* [http://wiki.its.queensu.ca/display/UIS/Use+Case+Example Purchase order System]&lt;br /&gt;
* [http://www.math-cs.gordon.edu/courses/cs320/ATM_Example/UseCases.html#Startup ATM System]&lt;br /&gt;
* [http://www.protoolkits.com/Analysisandrequirements/Analysistechniques/usecases.html Shopping website order]&lt;br /&gt;
* [http://alistair.cockburn.us/index.php/Pluggable_use_cases#Pluggable_Use_Case_Concept Pluggable Use Cases]&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=106728</id>
		<title>CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=106728"/>
		<updated>2016-12-11T01:13:36Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1643. Refactor and Test Suggestion Controller'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the OSS project of refactoring and testing the suggestion controller of Expertiza.&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites. &lt;br /&gt;
&lt;br /&gt;
== '''Motivation''' ==&lt;br /&gt;
This provides a great opportunity for the students to learn through collaboration. It provides a chance to contribute to an open source project. One would take back experience of working on Rails, and testing environments like RSpec. Being one of the primary user of Expertiza, students would enhance the functionalities according to their experiences using it and can view their changes implemented real-time.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
Our files to be modified are: &lt;br /&gt;
* app/views/mailer/suggested_topic_approved_message.html.erb&lt;br /&gt;
* spec/features/topic_suggestion2_spec.rb&lt;br /&gt;
&lt;br /&gt;
The current folder of suggestion_controller.rb provides a chance to suggest a new topic to work on for a project. There is also an option for the student to not work on it. One can also submit the suggestion anonymously. Once a student submits the topic, the instructor can check that in the view suggestions tab, and can either approve or reject. Once the instructor approves, the student gets a mail regarding the approval. This mail is sent only if the student doesn’t submit the topic anonymously. In the process of assigning the given suggestion as a project topic to the student, it automatically gets assigned to the whole team if the student is part of a team. &lt;br /&gt;
&lt;br /&gt;
Our problem statement includes:&lt;br /&gt;
&lt;br /&gt;
1. Modifying the code in accordance to rails 4 syntax&lt;br /&gt;
&lt;br /&gt;
2. Send email code which was duplicated needs to be replaced by a single method&lt;br /&gt;
&lt;br /&gt;
3. Fix and test the working of email functionality (an email is sent to the student who suggested the topic once the instructor approves, unless he/she sends it anonymously)&lt;br /&gt;
&lt;br /&gt;
4. Write integration tests for each method in suggestion_controller.rb (including some edge cases)&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Before starting off with working on the Expertiza project, we need to fork the existing code from [https://github.com/expertiza/expertiza expertiza/master branch]. We are provided with 3 methods of setting up Expertiza: Docker, setting it up locally and using Expertiza image. We are describing the first two methods (the ones we used) below.&lt;br /&gt;
&lt;br /&gt;
=== Docker ===&lt;br /&gt;
&lt;br /&gt;
The Docker has been set up on a Windows PC and steps are given below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Docker on Windows&lt;br /&gt;
&lt;br /&gt;
docker run --expose 3000 -p 3000:3000 -v //c//Users//Srikar//Expertiza://c//Users//Srikar//Expertiza -it winbobob/expertiza-fall2016&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysql start   &lt;br /&gt;
mysql -uroot -p           &lt;br /&gt;
show databases;  &lt;br /&gt;
quit&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/srikarpotta/expertiza.git&lt;br /&gt;
cd expertiza&lt;br /&gt;
cp config/database.yml.example config/database.yml&lt;br /&gt;
cp config/secrets.yml.example config/secrets.yml&lt;br /&gt;
&lt;br /&gt;
bundle install&lt;br /&gt;
rake db:migrate&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
npm install -g bower&lt;br /&gt;
&lt;br /&gt;
sudo rm /usr/bin/node&lt;br /&gt;
sudo ln –s /usr/bin/nodejs /usr/bin/node&lt;br /&gt;
bower install --allow-root&lt;br /&gt;
thin start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On a Local Machine ===&lt;br /&gt;
We have used MacOS, so the following steps are in regard to MacOS.&lt;br /&gt;
The following steps will help you set up Expertiza project in your local machine. The steps are comprehensive amalgamation of steps mentioned in [http://wiki.expertiza.ncsu.edu/index.php/Development:Setup:OSX Development Setup], the [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit?pli=1 document]provided and also few steps that were missed in both. The order we followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Fork the git repository mentioned above&lt;br /&gt;
&lt;br /&gt;
#Clone the repository to your local machine&lt;br /&gt;
Install [http://brew.sh/ Homebrew]&lt;br /&gt;
&lt;br /&gt;
#Install RBENV&lt;br /&gt;
brew update&lt;br /&gt;
brew install rbenv&lt;br /&gt;
brew install ruby-build&lt;br /&gt;
&lt;br /&gt;
#Install dependencies&lt;br /&gt;
brew install aspell gcc47 libxml2 libxslt graphviz&lt;br /&gt;
&lt;br /&gt;
#Install gems&lt;br /&gt;
export JAVA_HOME=/etc/alternatives/java_sdk&lt;br /&gt;
bundle install&lt;br /&gt;
&lt;br /&gt;
#Change yml files&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename secrets.yml.example to secrets.yml&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename database.yml.example to database.yml&lt;br /&gt;
&lt;br /&gt;
#Edit database.yml to include the root password for your local MySQL in the “password” field&lt;br /&gt;
&lt;br /&gt;
#Install mysql (https://gist.github.com/nrollr/a8d156206fa1e53c6cd6) &lt;br /&gt;
&lt;br /&gt;
#Log into MySql as root (mysql is generally present in /usr/local/mysql/bin/)&lt;br /&gt;
mysql -uroot -p&lt;br /&gt;
&lt;br /&gt;
#Create expertiza user&lt;br /&gt;
create user expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Create the databases&lt;br /&gt;
create database pg_development;&lt;br /&gt;
create database pg_test;&lt;br /&gt;
&lt;br /&gt;
#Set privileges for expertiza user&lt;br /&gt;
grant all on pg_development.to expertiza@localhost;&lt;br /&gt;
grant all on pg_test.to expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Install javascript libraries&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
sudo npm install bower&lt;br /&gt;
bower install&lt;br /&gt;
&lt;br /&gt;
#Download the expertiza scrubbed library (https://drive.google.com/file/d/0B2vDvVjH76uEMDJhNjZVOUFTWmM/view) &lt;br /&gt;
&lt;br /&gt;
#Load this sql file into pg_development database created using the method mentioned here.&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:test:prepare&lt;br /&gt;
&lt;br /&gt;
#Run rails s&lt;br /&gt;
&lt;br /&gt;
#Open browser and test localhost:3000&lt;br /&gt;
&lt;br /&gt;
#Login credentials&lt;br /&gt;
Username - instructor6&lt;br /&gt;
Password - password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Our Implementation''' ==&lt;br /&gt;
There is a partial coverage of suggstion_controller using feature test and also the email functionality wasn't working. We have fixed the email functionality and also refactored parts of the code. As per our knowledge we couldn't find any code in accordance to Ruby 2 syntax. &lt;br /&gt;
&lt;br /&gt;
==='''Refactoring''' ===&lt;br /&gt;
Refactoring that was done for this project is:&lt;br /&gt;
* There were lot of trailing spaces in the code, which are removed. &lt;br /&gt;
* Few lines were too long and one had to scroll right to go through that line. This was taken care of as shown below. &lt;br /&gt;
[[File:Oss_1.PNG]]&lt;br /&gt;
* We have edited the flash messages making them more intuitive. Also, the subject of the email that is sent has been modified to keep it more self-explanatory.&lt;br /&gt;
* An unused method, &amp;quot;confirm_save&amp;quot; has been removed.&lt;br /&gt;
* Comments were added for future readability.&lt;br /&gt;
&lt;br /&gt;
Note that there was nothing more in terms of refactoring, as the code has been already refactored.&lt;br /&gt;
&lt;br /&gt;
=== '''Email functionality''' ===&lt;br /&gt;
The email functionality which wasn't working before has been fixed. These are the cases considered:&lt;br /&gt;
Instructor starts a new assignment with some topics&lt;br /&gt;
* Student signs up for one topic, suggests a new one but doesn't want to work on it. Then the student receives a mail once the instructor approves.&lt;br /&gt;
* Student doesn't sign up for a topic and suggests a new one. If the student opts to work on it, then on approval, a mail is sent. If the student doesn't want to work on it, then no mail is sent even on approval. &lt;br /&gt;
* It is a team project - if there is already a team and they come up with a new topic and want to work on it, then a mail is sent on approval. If there isn't a team and a student suggests a new topic, a topic is assigned on approval and also a team of students who choose that topic. In this case, there is no email notification.&lt;br /&gt;
* A team project - there is a team and they suggest a topic but choose not to work on it and also they haven't signed up for a topic. In this case, upon the acceptance of topic by the instructor, there is no email sent and they are supposed to sign up for a topic from the given set.&lt;br /&gt;
&lt;br /&gt;
Irrespective of teams and topic, if someone suggests a topic anonymously, there won't be any email notification on approval of the topic. The key point here is there should be a signup preference that should be set for the notification. &lt;br /&gt;
&lt;br /&gt;
We have used the following accounts for testing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* Login ID - instructor6                Password - password&lt;br /&gt;
* Student1 ID - student5432             Password - password&lt;br /&gt;
* Student2 Id - student5404             Password - password&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The implementation can be seen in the video, where we covered few cases mentioned above.&lt;br /&gt;
&lt;br /&gt;
=== '''Testing''' ===&lt;br /&gt;
We were tasked with writing integration test cases for suggestion_controller. We came up with 6 end-to-end test cases to test “integration” of suggestion controller with other models, controllers and views. The test script can be found [https://github.com/anubhabMajumdar/expertiza/blob/amajumd/spec/features/topic_suggestion2_spec.rb here].&lt;br /&gt;
&lt;br /&gt;
==== Prerequisite ====&lt;br /&gt;
All the scenarios uses the following:&lt;br /&gt;
* Instructor6&lt;br /&gt;
* Student2064&lt;br /&gt;
* Assignment 1&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1 - Check suggested topics====&lt;br /&gt;
This automatic test case checks the following steps:&lt;br /&gt;
* User (Instructor6) logins in.&lt;br /&gt;
* On successful login, the instructor clicks the tab for Suggestions list for a particular assignment (Assignment 1).&lt;br /&gt;
* On visiting that tab, a page with content &amp;quot;Suggested topics for Assignment 1&amp;quot; is rendered with the topic name.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scenario &amp;quot;allow instructor to log in and view suggestions (suggestions should be empty) for Assignment 1&amp;quot; do	&lt;br /&gt;
   user = User.find_by_name('instructor6')&lt;br /&gt;
   stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
   visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
   expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot; &lt;br /&gt;
   expect(page).to have_no_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 2 - New Suggestion====&lt;br /&gt;
&lt;br /&gt;
We have considered Student2064 for this case. We test for all the following cases:&lt;br /&gt;
* Student2064 logs in, visits Assignment 1, clicks on new suggestion and submits a new topic. Upon submitting the topic, a page with the content saying &amp;quot;Thank you for your suggestion! Suggested topics for Assignment 1, &amp;quot;Topic title&amp;quot; initiated&amp;quot;,   should be rendered. &lt;br /&gt;
* And if view is clicked, a page with the content &amp;quot;View Suggested topic Computer Vision&amp;quot; is displayed. &lt;br /&gt;
* Adding a comment - Tests the case when a student submits the comment and whether a page with successful submission is resulted.&lt;br /&gt;
* Blank comment - In case a blank comment is added, an error should be generated. &lt;br /&gt;
* Edit title and description - Tests if changing the title and description and submitting, renders the page with the changed title and description. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create new suggestion (Computer Vision)&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion'&lt;br /&gt;
select &amp;quot;N&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Thank you for your suggestion!&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Initiated&amp;quot;	&lt;br /&gt;
		&lt;br /&gt;
# View the suggestion&lt;br /&gt;
find_link('View').click&lt;br /&gt;
expect(page).to have_content &amp;quot;View Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add comment&lt;br /&gt;
fill_in 'suggestion_comment_comments', with: 'Student2064 commenting on Computer Vision'&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Student2064 commenting on Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try adding blank comment&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;There was an error adding your comment.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Edit title and description&lt;br /&gt;
find_link('Edit').click&lt;br /&gt;
expect(page).to have_content &amp;quot;Edit Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision 2'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion 2'&lt;br /&gt;
select &amp;quot;Y&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision 2&amp;quot;	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 3 - Suggestion Accepted====&lt;br /&gt;
This scenario accounts for the testing the following:&lt;br /&gt;
* Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1. &lt;br /&gt;
* Instructor6 logs in and checks on Assignment 1. &lt;br /&gt;
* After logging in, instructor checks that “Computer Vision” is submitted by student2064 &lt;br /&gt;
* Also the comment by the student can be viewed. &lt;br /&gt;
* After looking at the topic, the instructor approves the suggestion. &lt;br /&gt;
* Then, when the Student2064 logs in and visits Assignment 1, he/she can check that the suggestion “Computer Vision” has been accepted.&lt;br /&gt;
&lt;br /&gt;
==== Scenario 4 - Suggestion Rejected====&lt;br /&gt;
The steps mentioned below are tested in this scenario:&lt;br /&gt;
* Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1. &lt;br /&gt;
* The Instructor6 logs in to check that “Computer Vision” is submitted by student2064 for Assignment 1. &lt;br /&gt;
* After checking the comment by student2064, Instructor6 rejects the suggestion. &lt;br /&gt;
* The Student2064 logs in, visits Assignment 1 to find out that the suggestion “Computer Vision” has been rejected.&lt;br /&gt;
&lt;br /&gt;
==== Scenario 5 - Suggestion Voted ====&lt;br /&gt;
This scenario accounts for testing the following steps:&lt;br /&gt;
* Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1. &lt;br /&gt;
* Instructor6 logs in and should be able to check that “Computer Vision” is submitted by student2064 for Assignment 1. &lt;br /&gt;
* After checking the comment by student2064, Instructor votes for the suggestion. &lt;br /&gt;
* Then the Student2064 logs in, visits Assignment 1 to check that Instructor6 has voted for the suggestion.&lt;br /&gt;
&lt;br /&gt;
==== Scenario 6 - Suggestion with no Signup approved ====&lt;br /&gt;
The scenario comprises of testing the following steps:&lt;br /&gt;
* The Student2064 logs in and visits Assignment 1 to suggest “Computer Vision” topic. &lt;br /&gt;
* After suggesting, the student selects “No” for suggestion signup preference and submits suggestion. &lt;br /&gt;
* The Instructor6 logs in, visits Assignment 1 suggestions to approve the suggestion “Computer Vision”. &lt;br /&gt;
* On approving the suggestion, a page saying &amp;quot;suggestion approved successfully&amp;quot; is rendered for the instructor.&lt;br /&gt;
&lt;br /&gt;
=== Why these scenarios? ===&lt;br /&gt;
&lt;br /&gt;
The scenarios are carefully designed to fulfill the following criteria:&lt;br /&gt;
*Test the integration of core functionalities of suggestion controller&lt;br /&gt;
*Have maximum code coverage&lt;br /&gt;
*Not to repeat scenarios developed by another contributor in topic_suggestion_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''' We have submitted two links to show the working of email functionality and the other one to show the tests. As suggested by the professor, this is done as an alternative to deployment. ''''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Working in UI ===&lt;br /&gt;
The steps are given as follows:&lt;br /&gt;
# Sign in Expertiza using the instructor account (login credentials mentioned above)&lt;br /&gt;
# Go to Manage tab, then click Assignments, and click New Public Assignment&lt;br /&gt;
# Give all the necessary details (Name of assignment, rubrics, due dates etc..) '''Do not forget to click on Allow students to suggest topic'''&lt;br /&gt;
# Go to Manage assignments tab, and in the assignment you just created, click on add participants and select copy from course &lt;br /&gt;
# Login from student credentials (mentioned earlier) and go to the assignment that was created&lt;br /&gt;
# Either sign up for the topic or suggest a new one directly&lt;br /&gt;
# Now to instructor account and view suggestions against the assignment created&lt;br /&gt;
# The instructor can approve or decline&lt;br /&gt;
# Open the gmail account (id: expertiza.development@gmail.com, password: qwer@1234) and look for mail if approved&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
=== What we learnt ===&lt;br /&gt;
* How to read existing codebases&lt;br /&gt;
* Understand other people’s code before contributing&lt;br /&gt;
* Refactor existing code without breaking existing functionalities&lt;br /&gt;
* Write integration test cases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What’s next? ===&lt;br /&gt;
&lt;br /&gt;
“'''Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.'''” - Edsger Dijkstra&lt;br /&gt;
&lt;br /&gt;
Thus, the best way to uncover bugs lurking in our code is to come up with more scenarios and implement them. We have tested the most business critical scenarios and few edge cases were covered by creators of topic_suggestion_spec.rb. They only show the absence of bugs in the routes we are following to reach from point A to point B. However, many such scenarios exists which are not yet covered. We hope to extend our work further in future to cover many such scenarios.&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=104127</id>
		<title>CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=104127"/>
		<updated>2016-10-31T06:00:25Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1643. Refactor and Test Suggestion Controller'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the OSS project of refactoring and testing the suggestion controller of Expertiza.&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites. &lt;br /&gt;
&lt;br /&gt;
== '''Motivation''' ==&lt;br /&gt;
This provides a great opportunity for the students to learn through collaboration. It provides a chance to contribute to an open source project. One would take back experience of working on Rails, and testing environments like RSpec. Being one of the primary user of Expertiza, students would enhance the functionalities according to their experiences using it and can view their changes implemented real-time.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
Our files to be modified are: &lt;br /&gt;
* app/views/mailer/suggested_topic_approved_message.html.erb&lt;br /&gt;
* spec/features/topic_suggestion2_spec.rb&lt;br /&gt;
&lt;br /&gt;
The current folder of suggestion_controller.rb provides a chance to suggest a new topic to work on for a project. There is also an option for the student to not work on it. One can also submit the suggestion anonymously. Once a student submits the topic, the instructor can check that in the view suggestions tab, and can either approve or reject. Once the instructor approves, the student gets a mail regarding the approval. This mail is sent only if the student doesn’t submit the topic anonymously. In the process of assigning the given suggestion as a project topic to the student, it automatically gets assigned to the whole team if the student is part of a team. &lt;br /&gt;
&lt;br /&gt;
Our problem statement includes:&lt;br /&gt;
&lt;br /&gt;
1. Modifying the code in accordance to rails 4 syntax&lt;br /&gt;
&lt;br /&gt;
2. Send email code which was duplicated needs to be replaced by a single method&lt;br /&gt;
&lt;br /&gt;
3. Fix and test the working of email functionality (an email is sent to the student who suggested the topic once the instructor approves, unless he/she sends it anonymously)&lt;br /&gt;
&lt;br /&gt;
4. Write integration tests for each method in suggestion_controller.rb (including some edge cases)&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Before starting off with working on the Expertiza project, we need to fork the existing code from [https://github.com/expertiza/expertiza expertiza/master branch]. We are provided with 3 methods of setting up Expertiza: Docker, setting it up locally and using Expertiza image. We are describing the first two methods (the ones we used) below.&lt;br /&gt;
&lt;br /&gt;
=== Docker ===&lt;br /&gt;
&lt;br /&gt;
The Docker has been setup on a Windows PC and steps are given below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Docker on Windows&lt;br /&gt;
&lt;br /&gt;
docker run --expose 3000 -p 3000:3000 -v //c//Users//Srikar//Expertiza://c//Users//Srikar//Expertiza -it winbobob/expertiza-fall2016&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysql start   &lt;br /&gt;
mysql -uroot -p           &lt;br /&gt;
show databases;  &lt;br /&gt;
quit&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/srikarpotta/expertiza.git&lt;br /&gt;
cd expertiza&lt;br /&gt;
cp config/database.yml.example config/database.yml&lt;br /&gt;
cp config/secrets.yml.example config/secrets.yml&lt;br /&gt;
&lt;br /&gt;
bundle install&lt;br /&gt;
rake db:migrate&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
npm install -g bower&lt;br /&gt;
&lt;br /&gt;
sudo rm /usr/bin/node&lt;br /&gt;
sudo ln –s /usr/bin/nodejs /usr/bin/node&lt;br /&gt;
bower install --allow-root&lt;br /&gt;
thin start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On a Local Machine ===&lt;br /&gt;
We have used MacOS, so the following steps are in regard to MacOS.&lt;br /&gt;
The following steps will help you setup Expertiza project in your local machine. The steps are comprehensive amalgamation of steps mentioned in [http://wiki.expertiza.ncsu.edu/index.php/Development:Setup:OSX Development Setup], the [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit?pli=1 document]provided and also few steps that were missed in both. The order we followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Fork the git repository mentioned above&lt;br /&gt;
&lt;br /&gt;
#Clone the repository to your local machine&lt;br /&gt;
Install [http://brew.sh/ Homebrew]&lt;br /&gt;
&lt;br /&gt;
#Install RBENV&lt;br /&gt;
brew update&lt;br /&gt;
brew install rbenv&lt;br /&gt;
brew install ruby-build&lt;br /&gt;
&lt;br /&gt;
#Install dependencies&lt;br /&gt;
brew install aspell gcc47 libxml2 libxslt graphviz&lt;br /&gt;
&lt;br /&gt;
#Install gems&lt;br /&gt;
export JAVA_HOME=/etc/alternatives/java_sdk&lt;br /&gt;
bundle install&lt;br /&gt;
&lt;br /&gt;
#Change yml files&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename secrets.yml.example to secrets.yml&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename database.yml.example to database.yml&lt;br /&gt;
&lt;br /&gt;
#Edit database.yml to include the root password for your local MySQL in the “password” field&lt;br /&gt;
&lt;br /&gt;
#Install mysql (https://gist.github.com/nrollr/a8d156206fa1e53c6cd6) &lt;br /&gt;
&lt;br /&gt;
#Log into MySql as root (mysql is generally present in /usr/local/mysql/bin/)&lt;br /&gt;
mysql -uroot -p&lt;br /&gt;
&lt;br /&gt;
#Create expertiza user&lt;br /&gt;
create user expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Create the databases&lt;br /&gt;
create database pg_development;&lt;br /&gt;
create database pg_test;&lt;br /&gt;
&lt;br /&gt;
#Set privileges for expertiza user&lt;br /&gt;
grant all on pg_development.to expertiza@localhost;&lt;br /&gt;
grant all on pg_test.to expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Install javascript libraries&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
sudo npm install bower&lt;br /&gt;
bower install&lt;br /&gt;
&lt;br /&gt;
#Download the expertiza scrubbed library (https://drive.google.com/file/d/0B2vDvVjH76uEMDJhNjZVOUFTWmM/view) &lt;br /&gt;
&lt;br /&gt;
#Load this sql file into pg_development database created using the method mentioned here.&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:test:prepare&lt;br /&gt;
&lt;br /&gt;
#Run rails s&lt;br /&gt;
&lt;br /&gt;
#Open browser and test localhost:3000&lt;br /&gt;
&lt;br /&gt;
#Login credentials&lt;br /&gt;
Username - instructor6&lt;br /&gt;
Password - password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Our Implementation''' ==&lt;br /&gt;
There is a partial coverage of suggstion_controller using feature test and also the email functionality wasn't working. We have fixed the email functionality and also refactored parts of the code. As per our knowledge we couldn't find any code in accordance to Ruby 2 syntax. &lt;br /&gt;
&lt;br /&gt;
=== '''Testing''' ===&lt;br /&gt;
We were tasked with writing integration test cases for suggestion_controller. We came up with 6 end-to-end test cases to test “integration” of suggestion controller with other models, controllers and views. The test script can be found [https://github.com/anubhabMajumdar/expertiza/blob/amajumd/spec/features/topic_suggestion2_spec.rb here].&lt;br /&gt;
&lt;br /&gt;
==== Prerequisite ====&lt;br /&gt;
All the scenarios uses the following:&lt;br /&gt;
* Instructor6&lt;br /&gt;
* Student2064&lt;br /&gt;
* Assignment 1&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1 ====&lt;br /&gt;
Instructor6 logs in and visits assignment 1 to check suggested topics (currently empty)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scenario &amp;quot;allow instructor to log in and view suggestions (suggestions should be empty) for Assignment 1&amp;quot; do	&lt;br /&gt;
   user = User.find_by_name('instructor6')&lt;br /&gt;
   stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
   visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
   expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot; &lt;br /&gt;
   expect(page).to have_no_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 2 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in -&amp;gt; Visits on Assignment 1 -&amp;gt; Clicks on new suggestion -&amp;gt; Submits new topic called “Computer Vision” -&amp;gt; Checks submission is successful -&amp;gt; Adds comment -&amp;gt; Submits comment -&amp;gt; Checks successful submission of comment -&amp;gt; Tries submitting blank comment -&amp;gt; Checks unsuccessful submission of blank comment -&amp;gt; Tries editing suggestion title and suggestion description -&amp;gt; Checks edit is successful -&amp;gt; Logs out successfully&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create new suggestion (Computer Vision)&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion'&lt;br /&gt;
select &amp;quot;N&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Thank you for your suggestion!&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Initiated&amp;quot;	&lt;br /&gt;
		&lt;br /&gt;
# View the suggestion&lt;br /&gt;
find_link('View').click&lt;br /&gt;
expect(page).to have_content &amp;quot;View Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add comment&lt;br /&gt;
fill_in 'suggestion_comment_comments', with: 'Student2064 commenting on Computer Vision'&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Student2064 commenting on Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try adding blank comment&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;There was an error adding your comment.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Edit title and description&lt;br /&gt;
find_link('Edit').click&lt;br /&gt;
expect(page).to have_content &amp;quot;Edit Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision 2'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion 2'&lt;br /&gt;
select &amp;quot;Y&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision 2&amp;quot;	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other scenarios that were tested are given below&lt;br /&gt;
&lt;br /&gt;
==== Scenario 3 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 approves the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; &lt;br /&gt;
Checks suggestion “Computer Vision” is accepted&lt;br /&gt;
&lt;br /&gt;
==== Scenario 4 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 rejects the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks suggestion “Computer Vision” is rejected&lt;br /&gt;
&lt;br /&gt;
==== Scenario 5 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt;Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064  -&amp;gt; Instructor votes for the suggestion  -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks Instructor6 has voted for the suggestion&lt;br /&gt;
&lt;br /&gt;
==== Scenario 6 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in and visits Assignment 1 -&amp;gt; Suggests “Computer Vision” -&amp;gt; Select “No” for suggestion signup preference -&amp;gt; Submits suggestion -&amp;gt; Instructor6 logs in and visits Assignment 1 suggestions -&amp;gt; Approves suggestion “Computer Vision” -&amp;gt; Checks suggestion approved successfully&lt;br /&gt;
&lt;br /&gt;
=== Why these scenarios? ===&lt;br /&gt;
&lt;br /&gt;
The scenarios are carefully designed to fulfil the following criteria:&lt;br /&gt;
*Test the integration of core functionalities of suggestion controller&lt;br /&gt;
*Have maximum code coverage&lt;br /&gt;
*Not to repeat scenarios developed by another contributor in topic_suggestion_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
=== What we learnt ===&lt;br /&gt;
* How to read existing codebases&lt;br /&gt;
* Understand other people’s code before contributing&lt;br /&gt;
* Refactor existing code without breaking existing functionalities&lt;br /&gt;
* Write integration test cases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What’s next? ===&lt;br /&gt;
&lt;br /&gt;
“'''Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.'''” - Edsger Dijkstra&lt;br /&gt;
&lt;br /&gt;
Thus, the best way to uncover bugs lurking in our code is to come up with more scenarios and implement them. We have tested the most business critical scenarios and few edge cases were covered by creators of topic_suggestion_spec.rb. They only show the absence of bugs in the routes we are following to reach from point A to point B. However, many such scenarios exists which are not yet covered. We hope to extend our work further in future to cover many such scenarios.&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=104022</id>
		<title>CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=104022"/>
		<updated>2016-10-30T14:59:31Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1643. Refactor and Test Suggestion Controller'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the OSS project of refactoring and testing the suggestion controller of Expertiza.&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites. &lt;br /&gt;
&lt;br /&gt;
== '''Motivation''' ==&lt;br /&gt;
This provides a great opportunity for the students to learn through collaboration. It provides a chance to contribute to an open source project. One would take back experience of working on Rails, and testing environments like RSpec. Being one of the primary user of Expertiza, students would enhance the functionalities according to their experiences using it and can view their changes implemented real-time.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
Our files to be modified are: &lt;br /&gt;
* app/views/mailer/suggested_topic_approved_message.html.erb&lt;br /&gt;
* spec/features/topic_suggestion2_spec.rb&lt;br /&gt;
&lt;br /&gt;
The current folder of suggestion_controller.rb provides a chance to suggest a new topic to work on for a project. There is also an option for the student to not work on it. One can also submit the suggestion anonymously. Once a student submits the topic, the instructor can check that in the view suggestions tab, and can either approve or reject. Once the instructor approves, the student gets a mail regarding the approval. This mail is sent only if the student doesn’t submit the topic anonymously. In the process of assigning the given suggestion as a project topic to the student, it automatically gets assigned to the whole team if the student is part of a team. &lt;br /&gt;
&lt;br /&gt;
Our problem statement includes:&lt;br /&gt;
&lt;br /&gt;
1. Modifying the code in accordance to rails 4 syntax&lt;br /&gt;
&lt;br /&gt;
2. Send email code which was duplicated needs to be replaced by a single method&lt;br /&gt;
&lt;br /&gt;
3. Fix and test the working of email functionality (an email is sent to the student who suggested the topic once the instructor approves, unless he/she sends it anonymously)&lt;br /&gt;
&lt;br /&gt;
4. Write integration tests for each method in suggestion_controller.rb (including some edge cases)&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Before starting off with working on the Expertiza project, we need to fork the existing code from [https://github.com/expertiza/expertiza expertiza/master branch]. We are provided with 3 methods of setting up Expertiza: Docker, setting it up locally and using Expertiza image. We are describing the first two methods (the ones we used) below.&lt;br /&gt;
&lt;br /&gt;
=== Docker ===&lt;br /&gt;
&lt;br /&gt;
The Docker has been setup on a Windows PC and steps are given below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Docker on Windows&lt;br /&gt;
&lt;br /&gt;
docker run --expose 3000 -p 3000:3000 -v //c//Users//Srikar//Expertiza://c//Users//Srikar//Expertiza -it winbobob/expertiza-fall2016&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysql start   &lt;br /&gt;
mysql -uroot -p           &lt;br /&gt;
show databases;  &lt;br /&gt;
quit&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/srikarpotta/expertiza.git&lt;br /&gt;
cd expertiza&lt;br /&gt;
cp config/database.yml.example config/database.yml&lt;br /&gt;
cp config/secrets.yml.example config/secrets.yml&lt;br /&gt;
&lt;br /&gt;
bundle install&lt;br /&gt;
rake db:migrate&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
npm install -g bower&lt;br /&gt;
&lt;br /&gt;
sudo rm /usr/bin/node&lt;br /&gt;
sudo ln –s /usr/bin/nodejs /usr/bin/node&lt;br /&gt;
bower install --allow-root&lt;br /&gt;
thin start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On a Local Machine ===&lt;br /&gt;
We have used MacOS, so the following steps are in regard to MacOS.&lt;br /&gt;
The following steps will help you setup Expertiza project in your local machine. The steps are comprehensive amalgamation of steps mentioned in [http://wiki.expertiza.ncsu.edu/index.php/Development:Setup:OSX Development Setup], the [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit?pli=1 document]provided and also few steps that were missed in both. The order we followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Fork the git repository mentioned above&lt;br /&gt;
&lt;br /&gt;
#Clone the repository to your local machine&lt;br /&gt;
Install [http://brew.sh/ Homebrew]&lt;br /&gt;
&lt;br /&gt;
#Install RBENV&lt;br /&gt;
brew update&lt;br /&gt;
brew install rbenv&lt;br /&gt;
brew install ruby-build&lt;br /&gt;
&lt;br /&gt;
#Install dependencies&lt;br /&gt;
brew install aspell gcc47 libxml2 libxslt graphviz&lt;br /&gt;
&lt;br /&gt;
#Install gems&lt;br /&gt;
export JAVA_HOME=/etc/alternatives/java_sdk&lt;br /&gt;
bundle install&lt;br /&gt;
&lt;br /&gt;
#Change yml files&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename secrets.yml.example to secrets.yml&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename database.yml.example to database.yml&lt;br /&gt;
&lt;br /&gt;
#Edit database.yml to include the root password for your local MySQL in the “password” field&lt;br /&gt;
&lt;br /&gt;
#Install mysql (https://gist.github.com/nrollr/a8d156206fa1e53c6cd6) &lt;br /&gt;
&lt;br /&gt;
#Log into MySql as root (mysql is generally present in /usr/local/mysql/bin/)&lt;br /&gt;
mysql -uroot -p&lt;br /&gt;
&lt;br /&gt;
#Create expertiza user&lt;br /&gt;
create user expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Create the databases&lt;br /&gt;
create database pg_development;&lt;br /&gt;
create database pg_test;&lt;br /&gt;
&lt;br /&gt;
#Set privileges for expertiza user&lt;br /&gt;
grant all on pg_development.to expertiza@localhost;&lt;br /&gt;
grant all on pg_test.to expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Install javascript libraries&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
sudo npm install bower&lt;br /&gt;
bower install&lt;br /&gt;
&lt;br /&gt;
#Download the expertiza scrubbed library (https://drive.google.com/file/d/0B2vDvVjH76uEMDJhNjZVOUFTWmM/view) &lt;br /&gt;
&lt;br /&gt;
#Load this sql file into pg_development database created using the method mentioned here.&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:test:prepare&lt;br /&gt;
&lt;br /&gt;
#Run rails s&lt;br /&gt;
&lt;br /&gt;
#Open browser and test localhost:3000&lt;br /&gt;
&lt;br /&gt;
#Login credentials&lt;br /&gt;
Username - instructor6&lt;br /&gt;
Password - password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Our Implementation''' ==&lt;br /&gt;
There weren't any test cases before and also the email functionality wasn't working. We have fixed the email functionality and also refactored parts of the code. As per our knowledge we couldn't find any code in accordance to Ruby 2 syntax. &lt;br /&gt;
&lt;br /&gt;
=== '''Testing''' ===&lt;br /&gt;
We were tasked with writing integration test cases for suggestion_controller. We came up with 6 end-to-end test cases to test “integration” of suggestion controller with other models, controllers and views. The test script can be found [https://github.com/anubhabMajumdar/expertiza/blob/amajumd/spec/features/topic_suggestion2_spec.rb here].&lt;br /&gt;
&lt;br /&gt;
==== Prerequisite ====&lt;br /&gt;
All the scenarios uses the following:&lt;br /&gt;
* Instructor6&lt;br /&gt;
* Student2064&lt;br /&gt;
* Assignment 1&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1 ====&lt;br /&gt;
Instructor6 logs in and visits assignment 1 to check suggested topics (currently empty)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scenario &amp;quot;allow instructor to log in and view suggestions (suggestions should be empty) for Assignment 1&amp;quot; do	&lt;br /&gt;
   user = User.find_by_name('instructor6')&lt;br /&gt;
   stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
   visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
   expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot; &lt;br /&gt;
   expect(page).to have_no_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 2 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in -&amp;gt; Visits on Assignment 1 -&amp;gt; Clicks on new suggestion -&amp;gt; Submits new topic called “Computer Vision” -&amp;gt; Checks submission is successful -&amp;gt; Adds comment -&amp;gt; Submits comment -&amp;gt; Checks successful submission of comment -&amp;gt; Tries submitting blank comment -&amp;gt; Checks unsuccessful submission of blank comment -&amp;gt; Tries editing suggestion title and suggestion description -&amp;gt; Checks edit is successful -&amp;gt; Logs out successfully&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create new suggestion (Computer Vision)&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion'&lt;br /&gt;
select &amp;quot;N&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Thank you for your suggestion!&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Initiated&amp;quot;	&lt;br /&gt;
		&lt;br /&gt;
# View the suggestion&lt;br /&gt;
find_link('View').click&lt;br /&gt;
expect(page).to have_content &amp;quot;View Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add comment&lt;br /&gt;
fill_in 'suggestion_comment_comments', with: 'Student2064 commenting on Computer Vision'&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Student2064 commenting on Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try adding blank comment&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;There was an error adding your comment.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Edit title and description&lt;br /&gt;
find_link('Edit').click&lt;br /&gt;
expect(page).to have_content &amp;quot;Edit Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision 2'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion 2'&lt;br /&gt;
select &amp;quot;Y&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision 2&amp;quot;	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other scenarios that were tested are given below&lt;br /&gt;
&lt;br /&gt;
==== Scenario 3 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 approves the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; &lt;br /&gt;
Checks suggestion “Computer Vision” is accepted&lt;br /&gt;
&lt;br /&gt;
==== Scenario 4 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 rejects the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks suggestion “Computer Vision” is rejected&lt;br /&gt;
&lt;br /&gt;
==== Scenario 5 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt;Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064  -&amp;gt; Instructor votes for the suggestion  -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks Instructor6 has voted for the suggestion&lt;br /&gt;
&lt;br /&gt;
==== Scenario 6 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in and visits Assignment 1 -&amp;gt; Suggests “Computer Vision” -&amp;gt; Select “No” for suggestion signup preference -&amp;gt; Submits suggestion -&amp;gt; Instructor6 logs in and visits Assignment 1 suggestions -&amp;gt; Approves suggestion “Computer Vision” -&amp;gt; Checks suggestion approved successfully&lt;br /&gt;
&lt;br /&gt;
=== Why these scenarios? ===&lt;br /&gt;
&lt;br /&gt;
The scenarios are carefully designed to fulfil the following criteria:&lt;br /&gt;
*Test the integration of core functionalities of suggestion controller&lt;br /&gt;
*Have maximum code coverage&lt;br /&gt;
*Not to repeat scenarios developed by another contributor in topic_suggestion_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
=== What we learnt ===&lt;br /&gt;
* How to read existing codebases&lt;br /&gt;
* Understand other people’s code before contributing&lt;br /&gt;
* Refactor existing code without breaking existing functionalities&lt;br /&gt;
* Write integration test cases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What’s next? ===&lt;br /&gt;
&lt;br /&gt;
“'''Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.'''” - Edsger Dijkstra&lt;br /&gt;
&lt;br /&gt;
Thus, the best way to uncover bugs lurking in our code is to come up with more scenarios and implement them. We have tested the most business critical scenarios and few edge cases were covered by creators of topic_suggestion_spec.rb. They only show the absence of bugs in the routes we are following to reach from point A to point B. However, many such scenarios exists which are not yet covered. We hope to extend our work further in future to cover many such scenarios.&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=103622</id>
		<title>CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=103622"/>
		<updated>2016-10-29T01:55:35Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: minor edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1643. Refactor and Test Suggestion Controller'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the OSS project of refactoring and testing the suggestion controller of Expertiza.&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites. &lt;br /&gt;
&lt;br /&gt;
== '''Motivation''' ==&lt;br /&gt;
This provides a great opportunity for the students to learn through collaboration. It provides a chance to contribute to an open source project. One would take back experience of working on Rails, and testing environments like RSpec. Being one of the primary user of Expertiza, students would enhance the functionalities according to their experiences using it and can view their changes implemented real-time.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
Our files to be modified are: app/views/mailer/suggested_topic_approved_message.html.erb, suggestion_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The current folder of suggestion_controller.rb provides a chance to suggest a new topic to work on for a project. There is also an option for the student to not work on it. One can also submit the suggestion anonymously. Once a student submits the topic, the instructor can check that in the view suggestions tab, and can either approve or reject. Once the instructor approves, the student gets a mail regarding the approval. This mail is sent only if the student doesn’t submit the topic anonymously. In the process of assigning the given suggestion as a project topic to the student, it automatically gets assigned to the whole team if the student is part of a team. &lt;br /&gt;
&lt;br /&gt;
Our problem statement includes:&lt;br /&gt;
&lt;br /&gt;
1. Modifying the code in accordance to rails 4 syntax&lt;br /&gt;
&lt;br /&gt;
2. Send email code which was duplicated needs to be replaced by a single method&lt;br /&gt;
&lt;br /&gt;
3. Fix and test the working of email functionality (an email is sent to the student who suggested the topic once the instructor approves, unless he/she sends it anonymously)&lt;br /&gt;
&lt;br /&gt;
4. Write integration tests for each method in suggestion_controller.rb (including some edge cases)&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Before starting off with working on the Expertiza project, we need to fork the existing code from [https://github.com/expertiza/expertiza expertiza/master branch]. We are provided with 3 methods of setting up Expertiza: Docker, setting it up locally and using Expertiza image. We are describing the first two methods (the ones we used) below.&lt;br /&gt;
&lt;br /&gt;
=== Docker ===&lt;br /&gt;
&lt;br /&gt;
The Docker has been setup on a Windows PC and steps are given below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Docker on Windows&lt;br /&gt;
&lt;br /&gt;
docker run --expose 3000 -p 3000:3000 -v //c//Users//Srikar//Expertiza://c//Users//Srikar//Expertiza -it winbobob/expertiza-fall2016&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysql start   &lt;br /&gt;
mysql -uroot -p           &lt;br /&gt;
show databases;  &lt;br /&gt;
quit&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/srikarpotta/expertiza.git&lt;br /&gt;
cd expertiza&lt;br /&gt;
cp config/database.yml.example config/database.yml&lt;br /&gt;
cp config/secrets.yml.example config/secrets.yml&lt;br /&gt;
&lt;br /&gt;
bundle install&lt;br /&gt;
rake db:migrate&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
npm install -g bower&lt;br /&gt;
&lt;br /&gt;
sudo rm /usr/bin/node&lt;br /&gt;
sudo ln –s /usr/bin/nodejs /usr/bin/node&lt;br /&gt;
bower install --allow-root&lt;br /&gt;
thin start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On a Local Machine ===&lt;br /&gt;
We have used MacOS, so the following steps are in regard to MacOS.&lt;br /&gt;
The following steps will help you setup Expertiza project in your local machine. The steps are comprehensive amalgamation of steps mentioned in [http://wiki.expertiza.ncsu.edu/index.php/Development:Setup:OSX Development Setup], the [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit?pli=1 document]provided and also few steps that were missed in both. The order we followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Fork the git repository mentioned above&lt;br /&gt;
&lt;br /&gt;
#Clone the repository to your local machine&lt;br /&gt;
Install [http://brew.sh/ Homebrew]&lt;br /&gt;
&lt;br /&gt;
#Install RBENV&lt;br /&gt;
brew update&lt;br /&gt;
brew install rbenv&lt;br /&gt;
brew install ruby-build&lt;br /&gt;
&lt;br /&gt;
#Install dependencies&lt;br /&gt;
brew install aspell gcc47 libxml2 libxslt graphviz&lt;br /&gt;
&lt;br /&gt;
#Install gems&lt;br /&gt;
export JAVA_HOME=/etc/alternatives/java_sdk&lt;br /&gt;
bundle install&lt;br /&gt;
&lt;br /&gt;
#Change yml files&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename secrets.yml.example to secrets.yml&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename database.yml.example to database.yml&lt;br /&gt;
&lt;br /&gt;
#Edit database.yml to include the root password for your local MySQL in the “password” field&lt;br /&gt;
&lt;br /&gt;
#Install mysql (https://gist.github.com/nrollr/a8d156206fa1e53c6cd6) &lt;br /&gt;
&lt;br /&gt;
#Log into MySql as root (mysql is generally present in /usr/local/mysql/bin/)&lt;br /&gt;
mysql -uroot -p&lt;br /&gt;
&lt;br /&gt;
#Create expertiza user&lt;br /&gt;
create user expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Create the databases&lt;br /&gt;
create database pg_development;&lt;br /&gt;
create database pg_test;&lt;br /&gt;
&lt;br /&gt;
#Set privileges for expertiza user&lt;br /&gt;
grant all on pg_development.to expertiza@localhost;&lt;br /&gt;
grant all on pg_test.to expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Install javascript libraries&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
sudo npm install bower&lt;br /&gt;
bower install&lt;br /&gt;
&lt;br /&gt;
#Download the expertiza scrubbed library (https://drive.google.com/file/d/0B2vDvVjH76uEMDJhNjZVOUFTWmM/view) &lt;br /&gt;
&lt;br /&gt;
#Load this sql file into pg_development database created using the method mentioned here.&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:test:prepare&lt;br /&gt;
&lt;br /&gt;
#Run rails s&lt;br /&gt;
&lt;br /&gt;
#Open browser and test localhost:3000&lt;br /&gt;
&lt;br /&gt;
#Login credentials&lt;br /&gt;
Username - instructor6&lt;br /&gt;
Password - password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Our Implementation''' ==&lt;br /&gt;
There weren't any test cases before and also the email functionality wasn't working. We have fixed the email functionality and also refactored parts of the code. As per our knowledge we couldn't find any code in accordance to Ruby 2 syntax. &lt;br /&gt;
&lt;br /&gt;
=== '''Testing''' ===&lt;br /&gt;
We were tasked with writing integration test cases for suggestion_controller. We came up with 6 end-to-end test cases to test “integration” of suggestion controller with other models, controllers and views. The test script can be found [https://github.com/anubhabMajumdar/expertiza/blob/amajumd/spec/features/topic_suggestion2_spec.rb here].&lt;br /&gt;
&lt;br /&gt;
==== Prerequisite ====&lt;br /&gt;
All the scenarios uses the following:&lt;br /&gt;
* Instructor6&lt;br /&gt;
* Student2064&lt;br /&gt;
* Assignment 1&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1 ====&lt;br /&gt;
Instructor6 logs in and visits assignment 1 to check suggested topics (currently empty)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scenario &amp;quot;allow instructor to log in and view suggestions (suggestions should be empty) for Assignment 1&amp;quot; do	&lt;br /&gt;
   user = User.find_by_name('instructor6')&lt;br /&gt;
   stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
   visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
   expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot; &lt;br /&gt;
   expect(page).to have_no_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 2 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in -&amp;gt; Visits on Assignment 1 -&amp;gt; Clicks on new suggestion -&amp;gt; Submits new topic called “Computer Vision” -&amp;gt; Checks submission is successful -&amp;gt; Adds comment -&amp;gt; Submits comment -&amp;gt; Checks successful submission of comment -&amp;gt; Tries submitting blank comment -&amp;gt; Checks unsuccessful submission of blank comment -&amp;gt; Tries editing suggestion title and suggestion description -&amp;gt; Checks edit is successful -&amp;gt; Logs out successfully&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create new suggestion (Computer Vision)&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion'&lt;br /&gt;
select &amp;quot;N&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Thank you for your suggestion!&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Initiated&amp;quot;	&lt;br /&gt;
		&lt;br /&gt;
# View the suggestion&lt;br /&gt;
find_link('View').click&lt;br /&gt;
expect(page).to have_content &amp;quot;View Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add comment&lt;br /&gt;
fill_in 'suggestion_comment_comments', with: 'Student2064 commenting on Computer Vision'&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Student2064 commenting on Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try adding blank comment&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;There was an error adding your comment.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Edit title and description&lt;br /&gt;
find_link('Edit').click&lt;br /&gt;
expect(page).to have_content &amp;quot;Edit Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision 2'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion 2'&lt;br /&gt;
select &amp;quot;Y&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision 2&amp;quot;	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other scenarios that were tested are given below&lt;br /&gt;
&lt;br /&gt;
==== Scenario 3 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 approves the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; &lt;br /&gt;
Checks suggestion “Computer Vision” is accepted&lt;br /&gt;
&lt;br /&gt;
==== Scenario 4 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 rejects the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks suggestion “Computer Vision” is rejected&lt;br /&gt;
&lt;br /&gt;
==== Scenario 5 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt;Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064  -&amp;gt; Instructor votes for the suggestion  -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks Instructor6 has voted for the suggestion&lt;br /&gt;
&lt;br /&gt;
==== Scenario 6 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in and visits Assignment 1 -&amp;gt; Suggests “Computer Vision” -&amp;gt; Select “No” for suggestion signup preference -&amp;gt; Submits suggestion -&amp;gt; Instructor6 logs in and visits Assignment 1 suggestions -&amp;gt; Approves suggestion “Computer Vision” -&amp;gt; Checks suggestion approved successfully&lt;br /&gt;
&lt;br /&gt;
=== Why these scenarios? ===&lt;br /&gt;
&lt;br /&gt;
The scenarios are carefully designed to fulfil the following criteria:&lt;br /&gt;
*Test the integration of core functionalities of suggestion controller&lt;br /&gt;
*Have maximum code coverage&lt;br /&gt;
*Not to repeat scenarios developed by another contributor in topic_suggestion_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
=== What we learnt ===&lt;br /&gt;
* How to read existing codebases&lt;br /&gt;
* Understand other people’s code before contributing&lt;br /&gt;
* Refactor existing code without breaking existing functionalities&lt;br /&gt;
* Write integration test cases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What’s next? ===&lt;br /&gt;
&lt;br /&gt;
“'''Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.'''” - Edsger Dijkstra&lt;br /&gt;
&lt;br /&gt;
Thus, the best way to uncover bugs lurking in our code is to come up with more scenarios and implement them. We have tested the most business critical scenarios and few edge cases were covered by creators of topic_suggestion_spec.rb. They only show the absence of bugs in the routes we are following to reach from point A to point B. However, many such scenarios exists which are not yet covered. We hope to extend our work further in future to cover many such scenarios.&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=103620</id>
		<title>CSC/ECE 517 Fall 2016/E1643. Refactor Suggestion controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2016/E1643._Refactor_Suggestion_controller&amp;diff=103620"/>
		<updated>2016-10-29T01:54:22Z</updated>

		<summary type="html">&lt;p&gt;Amajumd: minor edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''E1643. Refactor and Test Suggestion Controller'''&lt;br /&gt;
&lt;br /&gt;
This page gives a detail of the OSS project of refactoring and testing the suggestion controller of Expertiza.&lt;br /&gt;
&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
Expertiza is a Ruby on Rails based open source project. The main motive of this project is to make learning more effective through peer review. This website is a result of combined effort of both students and faculty at NC State, and is used not just by this university but also in many other universities. The website allows students to form teams and work on various projects listed by the instructor and also suggest new topics that seem interesting, though they can opt not to work on them. It also makes it easy for the instructor to add a new topic to an assignment/project, create a new project and add students to it. The time spent by TAs and instructor is greatly reduced. The key feature is peer review, where the students can review the work of others and provide feedback. This helps in improving the existing work and also provides a new way to learn. There isn’t any restriction on the format of submission as it accepts any form of submission varying from URL to wiki pages, which isn’t a common feature in other websites. &lt;br /&gt;
&lt;br /&gt;
== '''Motivation''' ==&lt;br /&gt;
This provides a great opportunity for the students to learn through collaboration. It provides a chance to contribute to an open source project. One would take back experience of working on Rails, and testing environments like RSpec. Being one of the primary user of Expertiza, students would enhance the functionalities according to their experiences using it and can view their changes implemented real-time.&lt;br /&gt;
&lt;br /&gt;
== '''Problem Statement''' ==&lt;br /&gt;
Our files to be modified are: app/views/mailer/suggested_topic_approved_message.html.erb, suggestion_controller_spec.rb&lt;br /&gt;
&lt;br /&gt;
The current folder of suggestion_controller.rb provides a chance to suggest a new topic to work on for a project. There is also an option for the student to not work on it. One can also submit the suggestion anonymously. Once a student submits the topic, the instructor can check that in the view suggestions tab, and can either approve or reject. Once the instructor approves, the student gets a mail regarding the approval. This mail is sent only if the student doesn’t submit the topic anonymously. In the process of assigning the given suggestion as a project topic to the student, it automatically gets assigned to the whole team if the student is part of a team. &lt;br /&gt;
&lt;br /&gt;
Our problem statement includes:&lt;br /&gt;
&lt;br /&gt;
1. Modifying the code in accordance to rails 4 syntax&lt;br /&gt;
&lt;br /&gt;
2. Send email code which was duplicated needs to be replaced by a single method&lt;br /&gt;
&lt;br /&gt;
3. Fix and test the working of email functionality (an email is sent to the student who suggested the topic once the instructor approves, unless he/she sends it anonymously)&lt;br /&gt;
&lt;br /&gt;
4. Write integration tests for each method in suggestion_controller.rb (including some edge cases)&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Before starting off with working on the Expertiza project, we need to fork the existing code from [https://github.com/expertiza/expertiza expertiza/master branch]. We are provided with 3 methods of setting up Expertiza: Docker, setting it up locally and using Expertiza image. We are describing the first two methods (the ones we used) below.&lt;br /&gt;
&lt;br /&gt;
=== Docker ===&lt;br /&gt;
&lt;br /&gt;
The Docker has been setup on a Windows PC and steps are given below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Start Docker on Windows&lt;br /&gt;
&lt;br /&gt;
docker run --expose 3000 -p 3000:3000 -v //c//Users//Srikar//Expertiza://c//Users//Srikar//Expertiza -it winbobob/expertiza-fall2016&lt;br /&gt;
&lt;br /&gt;
/etc/init.d/mysql start   &lt;br /&gt;
mysql -uroot -p           &lt;br /&gt;
show databases;  &lt;br /&gt;
quit&lt;br /&gt;
&lt;br /&gt;
git clone https://github.com/srikarpotta/expertiza.git&lt;br /&gt;
cd expertiza&lt;br /&gt;
cp config/database.yml.example config/database.yml&lt;br /&gt;
cp config/secrets.yml.example config/secrets.yml&lt;br /&gt;
&lt;br /&gt;
bundle install&lt;br /&gt;
rake db:migrate&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
npm install -g bower&lt;br /&gt;
&lt;br /&gt;
sudo rm /usr/bin/node&lt;br /&gt;
sudo ln –s /usr/bin/nodejs /usr/bin/node&lt;br /&gt;
bower install --allow-root&lt;br /&gt;
thin start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== On a Local Machine ===&lt;br /&gt;
We have used MacOS, so the following steps are in regard to MacOS.&lt;br /&gt;
The following steps will help you setup Expertiza project in your local machine. The steps are comprehensive amalgamation of steps mentioned in [http://wiki.expertiza.ncsu.edu/index.php/Development:Setup:OSX Development Setup], the [https://docs.google.com/document/d/1TFC0G3zW-xkJYuloh_BmvWnj3dGZB23GOIYuikNRf_I/edit?pli=1 document]provided and also few steps that were missed in both. The order we followed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#Fork the git repository mentioned above&lt;br /&gt;
&lt;br /&gt;
#Clone the repository to your local machine&lt;br /&gt;
Install [http://brew.sh/ Homebrew]&lt;br /&gt;
&lt;br /&gt;
#Install RBENV&lt;br /&gt;
brew update&lt;br /&gt;
brew install rbenv&lt;br /&gt;
brew install ruby-build&lt;br /&gt;
&lt;br /&gt;
#Install dependencies&lt;br /&gt;
brew install aspell gcc47 libxml2 libxslt graphviz&lt;br /&gt;
&lt;br /&gt;
#Install gems&lt;br /&gt;
export JAVA_HOME=/etc/alternatives/java_sdk&lt;br /&gt;
bundle install&lt;br /&gt;
&lt;br /&gt;
#Change yml files&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename secrets.yml.example to secrets.yml&lt;br /&gt;
&lt;br /&gt;
#Go to expertiza/config and rename database.yml.example to database.yml&lt;br /&gt;
&lt;br /&gt;
#Edit database.yml to include the root password for your local MySQL in the “password” field&lt;br /&gt;
&lt;br /&gt;
#Install mysql (https://gist.github.com/nrollr/a8d156206fa1e53c6cd6) &lt;br /&gt;
&lt;br /&gt;
#Log into MySql as root (mysql is generally present in /usr/local/mysql/bin/)&lt;br /&gt;
mysql -uroot -p&lt;br /&gt;
&lt;br /&gt;
#Create expertiza user&lt;br /&gt;
create user expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Create the databases&lt;br /&gt;
create database pg_development;&lt;br /&gt;
create database pg_test;&lt;br /&gt;
&lt;br /&gt;
#Set privileges for expertiza user&lt;br /&gt;
grant all on pg_development.to expertiza@localhost;&lt;br /&gt;
grant all on pg_test.to expertiza@localhost;&lt;br /&gt;
&lt;br /&gt;
#Install javascript libraries&lt;br /&gt;
sudo apt-get install npm&lt;br /&gt;
sudo npm install bower&lt;br /&gt;
bower install&lt;br /&gt;
&lt;br /&gt;
#Download the expertiza scrubbed library (https://drive.google.com/file/d/0B2vDvVjH76uEMDJhNjZVOUFTWmM/view) &lt;br /&gt;
&lt;br /&gt;
#Load this sql file into pg_development database created using the method mentioned here.&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:migrate&lt;br /&gt;
&lt;br /&gt;
#Run bundle exec rake db:test:prepare&lt;br /&gt;
&lt;br /&gt;
#Run rails s&lt;br /&gt;
&lt;br /&gt;
#Open browser and test localhost:3000&lt;br /&gt;
&lt;br /&gt;
#Login credentials&lt;br /&gt;
Username - instructor6&lt;br /&gt;
Password - password&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Our Implementation''' ==&lt;br /&gt;
There weren't any test cases before and also the email functionality wasn't working. We have fixed the email functionality and also refactored parts of the code. As per our knowledge we couldn't find any code in accordance to Ruby 2 syntax. &lt;br /&gt;
&lt;br /&gt;
=== '''Testing''' ===&lt;br /&gt;
We were tasked with writing integration test cases for suggestion_controller. We came up with 6 end-to-end test cases to test “integration” of suggestion controller with other models, controllers and views. The test script can be found [https://github.com/anubhabMajumdar/expertiza/blob/amajumd/spec/features/topic_suggestion2_spec.rb here].&lt;br /&gt;
&lt;br /&gt;
==== Prerequisite ====&lt;br /&gt;
All the scenarios uses the following:&lt;br /&gt;
* Instructor6&lt;br /&gt;
* Student2064&lt;br /&gt;
* Assignment 1&lt;br /&gt;
&lt;br /&gt;
==== Scenario 1 ====&lt;br /&gt;
Instructor6 logs in and visits assignment 1 to check suggested topics (currently empty)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scenario &amp;quot;allow instructor to log in and view suggestions (suggestions should be empty) for Assignment 1&amp;quot; do	&lt;br /&gt;
   user = User.find_by_name('instructor6')&lt;br /&gt;
   stub_current_user(user, user.role.name, user.role)&lt;br /&gt;
   visit '/suggestion/list?id=1&amp;amp;type=Assignment'&lt;br /&gt;
   expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot; &lt;br /&gt;
   expect(page).to have_no_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Scenario 2 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in -&amp;gt; Visits on Assignment 1 -&amp;gt; Clicks on new suggestion -&amp;gt; Submits new topic called “Computer Vision” -&amp;gt; Checks submission is successful -&amp;gt; Adds comment -&amp;gt; Submits comment -&amp;gt; Checks successful submission of comment -&amp;gt; Tries submitting blank comment -&amp;gt; Checks unsuccessful submission of blank comment -&amp;gt; Tries editing suggestion title and suggestion description -&amp;gt; Checks edit is successful -&amp;gt; Logs out successfully&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Create new suggestion (Computer Vision)&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion'&lt;br /&gt;
select &amp;quot;N&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Thank you for your suggestion!&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision&amp;quot;	&lt;br /&gt;
expect(page).to have_content &amp;quot;Initiated&amp;quot;	&lt;br /&gt;
		&lt;br /&gt;
# View the suggestion&lt;br /&gt;
find_link('View').click&lt;br /&gt;
expect(page).to have_content &amp;quot;View Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Add comment&lt;br /&gt;
fill_in 'suggestion_comment_comments', with: 'Student2064 commenting on Computer Vision'&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;Your comment has been successfully added.&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Student2064 commenting on Computer Vision&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try adding blank comment&lt;br /&gt;
click_button 'Submit comment'&lt;br /&gt;
expect(page).to have_content &amp;quot;There was an error adding your comment.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Edit title and description&lt;br /&gt;
find_link('Edit').click&lt;br /&gt;
expect(page).to have_content &amp;quot;Edit Suggested topic Computer Vision&amp;quot;&lt;br /&gt;
fill_in 'suggestion_title', with: 'Computer Vision 2'&lt;br /&gt;
fill_in 'suggestion_description', with: 'This is a Computer Vision suggestion 2'&lt;br /&gt;
select &amp;quot;Y&amp;quot;, :from =&amp;gt; &amp;quot;suggestion_signup_preference&amp;quot;&lt;br /&gt;
click_button 'Submit'&lt;br /&gt;
expect(page).to have_content &amp;quot;Suggested topics for Assignment 1&amp;quot;&lt;br /&gt;
expect(page).to have_content &amp;quot;Computer Vision 2&amp;quot;	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Other scenarios that were tested are given below&lt;br /&gt;
&lt;br /&gt;
==== Scenario 3 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 approves the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; &lt;br /&gt;
Checks suggestion “Computer Vision” is accepted&lt;br /&gt;
&lt;br /&gt;
==== Scenario 4 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt; Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064 -&amp;gt; Instructor6 rejects the suggestion -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks suggestion “Computer Vision” is rejected&lt;br /&gt;
&lt;br /&gt;
==== Scenario 5 ====&lt;br /&gt;
Student2064 logs in and suggests a topic (Computer Vision) under Assignment 1 -&amp;gt;Instructor6 logs in and checks on Assignment 1 -&amp;gt; Checks that “Computer Vision” is submitted by student2064 -&amp;gt; Checks comment by student2064  -&amp;gt; Instructor votes for the suggestion  -&amp;gt; Student2064 logs in -&amp;gt; Visits Assignment 1 -&amp;gt; Checks Instructor6 has voted for the suggestion&lt;br /&gt;
&lt;br /&gt;
==== Scenario 6 ====&lt;br /&gt;
&lt;br /&gt;
Student2064 logs in and visits Assignment 1 -&amp;gt; Suggests “Computer Vision” -&amp;gt; Select “No” for suggestion signup preference -&amp;gt; Submits suggestion -&amp;gt; Instructor6 logs in and visits Assignment 1 suggestions -&amp;gt; Approves suggestion “Computer Vision” -&amp;gt; Checks suggestion approved successfully&lt;br /&gt;
&lt;br /&gt;
=== Why these scenarios? ===&lt;br /&gt;
&lt;br /&gt;
The scenarios are carefully designed to fulfil the following criteria:&lt;br /&gt;
*Test the integration of core functionalities of suggestion controller&lt;br /&gt;
*Have maximum code coverage&lt;br /&gt;
*Not to repeat scenarios developed by another contributor in topic_suggestion_spec.rb&lt;br /&gt;
&lt;br /&gt;
== Conclusions ==&lt;br /&gt;
&lt;br /&gt;
=== What we learnt ===&lt;br /&gt;
* How to read existing codebases&lt;br /&gt;
* Understand other people’s code before contributing&lt;br /&gt;
* Refactor existing code without breaking existing functionalities&lt;br /&gt;
* Write integration test cases &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== What’s next? ===&lt;br /&gt;
&lt;br /&gt;
“Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence.” - Edsger Dijkstra&lt;br /&gt;
&lt;br /&gt;
Thus, the best way to uncover bugs lurking in our code is to come up with more scenarios and implement them. We have tested the most business critical scenarios and few edge cases were covered by creators of topic_suggestion_spec.rb. They only show the absence of bugs in the routes we are following to reach from point A to point B. However, many such scenarios exists which are not yet covered. We hope to extend our work further in future to cover many such scenarios.&lt;/div&gt;</summary>
		<author><name>Amajumd</name></author>
	</entry>
</feed>