<?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=Payyapp</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=Payyapp"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Payyapp"/>
	<updated>2026-06-03T22:44:06Z</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_2011/ch4_5a_sp&amp;diff=54767</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54767"/>
		<updated>2011-11-06T01:39:59Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Basic Object Oriented Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design that revolves around the basic entity called [http://en.wikipedia.org/wiki/Object_(computer_science) object]. An object contains data and procedures grouped together to represent an entity(class). Object-oriented design is the discipline of defining the objects and their interactions to solve a problem that was identified and documented during object-oriented analysis.&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Class_(computer_programming) Class]:  A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data.A class defines constituent members which enable these class instances to have state and behavior.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, we need to make sure that the class name,&lt;br /&gt;
&lt;br /&gt;
#is a singular noun,&lt;br /&gt;
#does not really have the same functionality as some other class,&lt;br /&gt;
#is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
''Requirements for the Flight Reservation System ''&amp;lt;br&amp;gt;&lt;br /&gt;
*	The mission is to allow round-trip airline ''tickets'' to be bought over the Web.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Each ''customer'' specifies an origination ''airport'', a destination airport, and dates for outbound and return ''flights''.&amp;lt;br&amp;gt;&lt;br /&gt;
*	The customer reserves one ''outbound flight'' and one ''return flight'' from a menu presented by the system.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Each choice that the system presents consists of one or more flight ''segments'' (there may be a change of planes).&amp;lt;br&amp;gt;&lt;br /&gt;
*	The customer may buy tickets for one or more ''passengers''.&amp;lt;br&amp;gt;&lt;br /&gt;
*	No more tickets can be sold for a flight than there are ''seats'' on the ''plane''.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Each passenger is assigned to a specific seat. &amp;lt;br&amp;gt;&lt;br /&gt;
*	The system calculates the total ''cost'' of the tickets by adding the cost of the individual segments.&amp;lt;br&amp;gt;&lt;br /&gt;
*If dissatisfied with the cost, the customer may select ''alternate flights''.&amp;lt;br&amp;gt;&lt;br /&gt;
*	After a customer has bought a ticket, (s)he will be e-mailed a ''confirmation''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some class names for the present scenario are &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Customer&amp;lt;br&amp;gt;&lt;br /&gt;
Flight&amp;lt;br&amp;gt;&lt;br /&gt;
Airport&amp;lt;br&amp;gt;	&lt;br /&gt;
Segment&amp;lt;br&amp;gt;&lt;br /&gt;
Ticket&amp;lt;br&amp;gt;&lt;br /&gt;
Cost&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some nouns that are not classes are &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Seats &amp;lt;br&amp;gt;&lt;br /&gt;
Alternate Flights &amp;lt;br&amp;gt;&lt;br /&gt;
Outbound Flight&amp;lt;br&amp;gt;&lt;br /&gt;
Inbound Flight&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the responsibilities of the Customer class and their collaborators are &amp;lt;br&amp;gt;&lt;br /&gt;
* to make payment(R)      shopping cart(C)&lt;br /&gt;
* to choose the flight(R) Flight Segment(C)&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
Requirements Statements &amp;lt;br&amp;gt;&lt;br /&gt;
The software to be designed is a program that can be used to maintain an address book. An address book holds a collection of entries, each recording a person's first and last names, address, city, state, zip, and phone number.&lt;br /&gt;
&lt;br /&gt;
It must be possible to add a new person to an address book, to edit existing information about a person (except the person's name), and to delete a person. It must be possible to sort the entries in the address book alphabetically by last name (with ties broken by first name if necessary), or by ZIP code (with ties broken by name if necessary). It must be possible to print out all the entries in the address book in &amp;quot;mailing label&amp;quot; format.&lt;br /&gt;
&lt;br /&gt;
It must be possible to create a new address book, to open a disk file containing an existing address book to close an address book, and to save an address book to a disk file, using standard New, Open, Close, Save and Save As ... File menu options. The program's File menu will also have a Quit option to allow closing all open address books and terminating the program.&lt;br /&gt;
&lt;br /&gt;
The initial requirements call for the program to only be able to work with a single address book at a time; therefore, if the user chooses the New or Open menu option, any current address book will be closed before creating/opening a new one. A later extension might allow for multiple address books to be open, each with its own window which can be closed separately, with closing the last open window resulting in terminating the program. In this case, New and Open will result in creating a new window, without affecting the current window.&lt;br /&gt;
&lt;br /&gt;
The program will keep track of whether any changes have been made to an address book since it was last saved, and will offer the user the opportunity to save changes when an address book is closed either explicitly or as a result of choosing to create/open another or to quit the program.&lt;br /&gt;
&lt;br /&gt;
The program will keep track of the file that the current address book was read from or most recently saved to, will display the file's name as the title of the main window, and will use that file when executing the Save option. When a New address book is initially created, its window will be titled &amp;quot;Untitled&amp;quot;, and a Save operation will be converted to Save As ... - i.e. the user will be required to specify a file.&amp;lt;ref name=&amp;quot;Address Book Example&amp;quot;&amp;gt;[http://www.cs.gordon.edu/courses/cs211/AddressBookExample/Requirements.html Address Book Example]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class names for the present scenario are &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
User&amp;lt;br&amp;gt;&lt;br /&gt;
AddressBook&amp;lt;br&amp;gt;&lt;br /&gt;
FileSystem&amp;lt;br&amp;gt;&lt;br /&gt;
AddressBookController&amp;lt;br&amp;gt;&lt;br /&gt;
Person&amp;lt;br&amp;gt;&lt;br /&gt;
AddressBookGUI&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The responsibilities of some of the classes and their collaborators are &amp;lt;br&amp;gt;&lt;br /&gt;
'''Person'''&amp;lt;br&amp;gt;&lt;br /&gt;
Responsibilities&amp;lt;br&amp;gt;&lt;br /&gt;
*Create a new object,given an individual's name,address,city,state,ZIP, and phone&amp;lt;br&amp;gt;&lt;br /&gt;
*Furnish the individual's first name&amp;lt;br&amp;gt;&lt;br /&gt;
*Furnish the individual's last name&amp;lt;br&amp;gt;&lt;br /&gt;
*Furnish the individual's address&amp;lt;br&amp;gt;&lt;br /&gt;
*Update the stored information(except the name) about an individual&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are no collaborators for this class&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''File System'''&amp;lt;br&amp;gt;&lt;br /&gt;
Responsibilities&amp;lt;br&amp;gt;&lt;br /&gt;
Read a stored address book from a file,given its file name&amp;lt;br&amp;gt;&lt;br /&gt;
Save an adddress book to a file,given its file name&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The collaborator for both the responsibilities is&amp;lt;br&amp;gt;&lt;br /&gt;
AddressBook&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
''Requirements for the Course Registration System'' &amp;lt;br&amp;gt;&lt;br /&gt;
*	The mission is to automate registration of students for courses at a university.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Each ''student'' takes one or more courses, which are identified by name and course number.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Each ''course'' is worth one or more ''credit hours''.&amp;lt;br&amp;gt;&lt;br /&gt;
*	A student can register for up to 21 credit hours.&amp;lt;br&amp;gt;&lt;br /&gt;
*	For each course that is taught, the students are placed into ''sections'', which may meet at different times and be taught by different instructors.&amp;lt;br&amp;gt;&lt;br /&gt;
*	If more than 50 students want to take the same ''class'', another section will be added.&amp;lt;br&amp;gt;&lt;br /&gt;
*	If fewer than 5 students register for a section, it will be canceled.&amp;lt;br&amp;gt;&lt;br /&gt;
*	If no ''instructor'' can be persuaded (or hired) to teach a class, it will be canceled.&amp;lt;br&amp;gt;&lt;br /&gt;
*	Students may specify alternate courses or sections, in case of a time ''conflict'', or if their first-choice class is canceled.&amp;lt;br&amp;gt;&lt;br /&gt;
*	After a student has registered for courses, (s)he will be e-mailed a class ''schedule''.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some class names for the present scenario are &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Instructor&amp;lt;br&amp;gt;&lt;br /&gt;
Student&amp;lt;br&amp;gt;&lt;br /&gt;
schedule&amp;lt;br&amp;gt;&lt;br /&gt;
class&amp;lt;br&amp;gt;&lt;br /&gt;
Course&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the responsibilities of the Customer class and their collaborators are&lt;br /&gt;
&lt;br /&gt;
Instructor(C)	offer course(sections)(R)&lt;br /&gt;
&lt;br /&gt;
Student(C)	takesCourse(R)	Course(Colloborators)&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
''Requirements for the bus navigator system'':&amp;lt;br&amp;gt;&lt;br /&gt;
* The mission is to allow ''students'' to plan trips around NCSU and Raleigh by bus.&amp;lt;br&amp;gt;&lt;br /&gt;
* Each ''rider'' specifies an origination ''stop'' and a destination ''stop'' .&amp;lt;br&amp;gt;&lt;br /&gt;
* The system presents a list of departure times, arrival times, and transfer points, and a ''map'' of the ''trip''.&amp;lt;br&amp;gt;&lt;br /&gt;
* Each item on the list consists of one or more of trip ''segments''.&amp;lt;br&amp;gt;&lt;br /&gt;
* Each trip segment consists of a ''departure point'' and ''time'', and an ''arrival point'' and ''time''.&amp;lt;br&amp;gt;&lt;br /&gt;
* If it would significantly reduce the time of the trip, the system may suggest ''walking'' between two nearby stops.&amp;lt;br&amp;gt;&lt;br /&gt;
* Each segment may be on a ''Wolfline bus'', a ''CAT bus'', or a ''TTA bus''.&amp;lt;br&amp;gt;&lt;br /&gt;
* Each bus has a ''schedule'', which is a set of ''trips'', with each trip consisting of a set of ''stops'' and ''times''.&amp;lt;br&amp;gt;&lt;br /&gt;
* The ''fare'' is 0 on a Wolfline bus, $1 on a CAT bus, and $2 ($2.50 for express) on a TTA bus.&amp;lt;br&amp;gt;&lt;br /&gt;
* The system calculates the total ''cost'' of the trip by adding the cost of the individual segments.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class names for the present scenario are &amp;lt;br&amp;gt;&lt;br /&gt;
stop&amp;lt;br&amp;gt;&lt;br /&gt;
map&amp;lt;br&amp;gt;&lt;br /&gt;
segment&amp;lt;br&amp;gt;&lt;br /&gt;
walk&amp;lt;br&amp;gt;&lt;br /&gt;
bus&amp;lt;br&amp;gt;&lt;br /&gt;
Trip&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The responsibilities of the Trip class and their collaborators are &amp;lt;br&amp;gt;&lt;br /&gt;
Know your Stops(R)&lt;br /&gt;
Know your Stopping Times(R)&lt;br /&gt;
&lt;br /&gt;
Stop(C)&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54362</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54362"/>
		<updated>2011-10-30T14:40:26Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Need for Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design that revolves around the basic entity called [http://en.wikipedia.org/wiki/Object_(computer_science) object]. An object contains data and procedures grouped together to represent an entity(class). Object-oriented design is the discipline of defining the objects and their interactions to solve a problem that was identified and documented during object-oriented analysis.&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, we need to make sure that the class name,&lt;br /&gt;
&lt;br /&gt;
#is a singular noun,&lt;br /&gt;
#does not really have the same functionality as some other class,&lt;br /&gt;
#is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54361</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54361"/>
		<updated>2011-10-30T14:40:10Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design that revolves around the basic entity called [http://en.wikipedia.org/wiki/Object_(computer_science) object]. An object contains data and procedures grouped together to represent an entity(class). Object-oriented design is the discipline of defining the objects and their interactions to solve a problem that was identified and documented during object-oriented analysis.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, we need to make sure that the class name,&lt;br /&gt;
&lt;br /&gt;
#is a singular noun,&lt;br /&gt;
#does not really have the same functionality as some other class,&lt;br /&gt;
#is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54359</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54359"/>
		<updated>2011-10-30T14:36:31Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, we need to make sure that the class name,&lt;br /&gt;
&lt;br /&gt;
#is a singular noun,&lt;br /&gt;
#does not really have the same functionality as some other class,&lt;br /&gt;
#is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54357</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54357"/>
		<updated>2011-10-30T14:36:14Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, we need to make sure that the class name,&lt;br /&gt;
&lt;br /&gt;
 • is a singular noun,&lt;br /&gt;
 • does not really have the same functionality as some other class,&lt;br /&gt;
 • is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54355</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54355"/>
		<updated>2011-10-30T14:35:02Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
The use of small card minimizes the complexity of the design. It forces the designer to refrain from giving the class too many responsibilities. These cards are portable and thus can easily be laid out on a table and re-arranged while discussing the design with other people.&lt;br /&gt;
&lt;br /&gt;
A specification for the program being designed is studied and then the cards that need to be created are designed. The cards contain the class names(generally nouns) along with the responsibilities(verbs) and the collaborators associated with the class. When choosing classes, make sure that what you identify …&lt;br /&gt;
• is a singular noun,&lt;br /&gt;
• does not really have the same functionality as some other class,&lt;br /&gt;
• is not simply a primitive type,(because u need not write code for primitive types)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54353</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54353"/>
		<updated>2011-10-30T14:27:38Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Principles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Open/closed_principle Open Close Principle]: This principle states that software entities like classes, modules and functions should be open for extension but closed for modifications.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle]: This principle states that high-level modules should not depend on low-level modules and both should depend on abstractions.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Interface_segregation_principle Interface Segregation Principle]: This principle states that clients should not be forced to depend upon interfaces that they do not use.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Single_responsibility_principle Single Responsibility Principle]: This principle states that a class should have only reason to change.&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Liskov_substitution_principle Liskov's Substitution Principle]: This principle states that derived types must be completely substitutable for their base types.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54352</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54352"/>
		<updated>2011-10-30T14:20:56Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
=Design Principles =&lt;br /&gt;
Listed below are the main principles that need to be followed for building an effective design solution&amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.oodesign.com/design-principles.html Object Oriented Design Principles]&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54351</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54351"/>
		<updated>2011-10-30T14:15:22Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Identifying attributes for each class/entity.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt; to solve  a problem that can be used in many different situations and/or applications.&lt;br /&gt;
&lt;br /&gt;
* Identifying persistent objects i.e. to know objects that last longer than a single runtime.&lt;br /&gt;
&lt;br /&gt;
* Identify the [http://en.wikipedia.org/wiki/Application_framework application framework] to take advantage of the existing code and reuse whatever possible.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54350</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54350"/>
		<updated>2011-10-30T14:11:09Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54349</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54349"/>
		<updated>2011-10-30T14:10:43Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma], Design Patterns&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54348</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54348"/>
		<updated>2011-10-30T14:10:12Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Design Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma], Design Patterns Elements of Reusable Object Oriented Software by Erich Gamma&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54347</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54347"/>
		<updated>2011-10-30T14:09:35Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Criteria for Elegant Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= Design Concepts =&lt;br /&gt;
Listed below are the major components for building a design solution for a problem:&lt;br /&gt;
* Defining objects, creating [http://en.wikipedia.org/wiki/Class_diagram class diagram] from conceptual models and map the entities to classes.&lt;br /&gt;
&lt;br /&gt;
* Use [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design patterns] &amp;lt;ref name=&amp;quot;Design Patterns&amp;quot;&amp;gt;[http://www.uml.org.cn/c++/pdf/DesignPatterns.pdf Design Patterns], Design Patterns&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54346</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54346"/>
		<updated>2011-10-30T13:58:23Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language. They can be considered as the general vocabulary required to implement an object oriented design solution &amp;lt;ref name=&amp;quot;OOD vocabulary&amp;quot;&amp;gt;[http://www.beroux.com/english/articles/oop_uml_and_rup.php OOD Vocabulary], OOD Vocabulary&amp;lt;/ref&amp;gt;.  These terms are explained in brief:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54345</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54345"/>
		<updated>2011-10-30T13:44:51Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Basic Object Oriented Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: Interface can be defined as the ability to defer the implementation of a ''method'' or the process to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54344</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54344"/>
		<updated>2011-10-30T13:43:54Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Basic Object Oriented Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A ''class'' is a tight coupling or association of data structures with the methods or functions that act on the data. An ''object'' is an instance of the class serving a separate function. An object is defined by its properties.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities i.e. protecting parts of the program from extensive modification if the design decision is changed. This is achieved by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: inheritance is a way to reuse code of existing objects and thus ability for a ''class'' to extend or override functionality of another ''class''. Inheritance is realized by establishing a subtype from an existing object, or both, depending upon programming language support. &lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54343</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54343"/>
		<updated>2011-10-30T13:37:20Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Basic Object Oriented Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Object_(computer_science) Object]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Information_hiding Information Hiding/Encapsulation]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming Polymorphism]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(computer_science) Interface]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54342</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54342"/>
		<updated>2011-10-30T05:44:59Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54341</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54341"/>
		<updated>2011-10-30T05:43:50Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
CRC cards are created from [http://en.wikipedia.org/wiki/Index_card index card]s on which are written:&lt;br /&gt;
&lt;br /&gt;
# The class name&lt;br /&gt;
# Its Super and Sub classes (if applicable)&lt;br /&gt;
# The responsibilities of the class.&lt;br /&gt;
# The names of other classes with which the class will collaborate to fulfill its responsibilities.&lt;br /&gt;
# Author&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54340</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54340"/>
		<updated>2011-10-30T05:42:21Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card classes] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54339</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54339"/>
		<updated>2011-10-30T05:41:59Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the classes[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card class] needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54338</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54338"/>
		<updated>2011-10-30T05:41:24Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* OOD: The CRC Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class-Responsibility-Collaboration card] is a very useful tool for software design that determine the classes needed along with the types of interactions.&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54337</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54337"/>
		<updated>2011-10-30T05:09:06Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Need for Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Basic Object Oriented Concepts =&lt;br /&gt;
The five basic concepts of object-oriented design are the implementation level features that are built into the programming language.  These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
*[[Object (computer science)|Object/Class]]: A tight coupling or association of data structures with the methods or functions that act on the data. This is called a ''class'', or ''object'' (an object is created based on a class).  Each object serves a separate function.  It is defined by its properties, what it is and what it can do.  An object can be part of a class, which is a set of objects that are similar.&lt;br /&gt;
&lt;br /&gt;
*[[Information hiding]]: The ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as ''private'' or ''protected'' to the owning ''class''.&lt;br /&gt;
*[[Inheritance (computer science)|Inheritance]]: The ability for a ''class'' to extend or override functionality of another ''class''.  The so-called ''subclass'' has a whole section that is derived (inherited) from the ''superclass'' and then it has its own set of functions and data.&lt;br /&gt;
*[[Interface (computer science)|Interface]]: The ability to defer the implementation of a ''method''. The ability to define the ''functions'' or ''methods'' signatures without implementing them. &lt;br /&gt;
*[[Polymorphism in object-oriented programming|Polymorphism]]: The ability to replace an ''object'' with its ''subobjects''. The ability of an ''object-variable'' to contain, not only that ''object'', but also all of its ''subobjects''.&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54336</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54336"/>
		<updated>2011-10-30T04:59:17Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Criteria for Elegant Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54335</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54335"/>
		<updated>2011-10-30T04:58:47Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Criteria for Elegant Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54334</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54334"/>
		<updated>2011-10-30T04:58:06Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Criteria for Elegant Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability]: Usability can be measured by the ease of use for the client.&lt;br /&gt;
'''Completeness''': A software program/application is complete if it solves all the client needs.&lt;br /&gt;
'''Robustness''': A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
'''Efficiency''': The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
'''Scalability''': An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
'''Readability''': If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
'''Modifiability''': If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
'''Reusability''': Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
'''Simplicity''': The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54333</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54333"/>
		<updated>2011-10-30T04:55:24Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Usability */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
Listed below are the different criteria for elegant software design. There are nine different design considerations, out of which the first five address correctness of the software and the rest consider the performance.&lt;br /&gt;
== Usability ==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability] can be measured by the ease of use for the client.&lt;br /&gt;
== Completeness ==&lt;br /&gt;
A software program/application is complete if it solves all the client needs.&lt;br /&gt;
== Robustness ==&lt;br /&gt;
A good design is one that can deal with unusual situations gracefully and avoid crashing.&lt;br /&gt;
== Efficiency ==&lt;br /&gt;
The application performs the necessary computations in a reasonable amount of time.&lt;br /&gt;
== Scalability ==&lt;br /&gt;
An application is scalable if it performs correctly and efficiently when the problems grow in size by several orders of magnitude.&lt;br /&gt;
== Readability ==&lt;br /&gt;
If it is easy for another programmer to read and understand the design and code, the design is readable.&lt;br /&gt;
== Modifiability==&lt;br /&gt;
If the software can easily be enhanced or restricted by adding new features or removing old features without breaking existing code, the design is modifiable.&lt;br /&gt;
== Reusability ==&lt;br /&gt;
Resuability checks the ability to be reused in another completely different setting.&lt;br /&gt;
== Simplicity ==&lt;br /&gt;
The simplicity criteria check if the design and/or the implementation unnecessarily complex.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54332</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54332"/>
		<updated>2011-10-30T04:40:15Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Criteria for Elegant Software Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
== Usability ==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Usability Usability] can be measured by the ease of use for the client.&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54184</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54184"/>
		<updated>2011-10-25T20:58:47Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
= Need for Design =&lt;br /&gt;
&lt;br /&gt;
= Criteria for Elegant Software Design =&lt;br /&gt;
&lt;br /&gt;
= OOD: The CRC Method =&lt;br /&gt;
&lt;br /&gt;
== Example 1: Flight reservation system ==&lt;br /&gt;
&lt;br /&gt;
== Example 2: Address Book ==&lt;br /&gt;
&lt;br /&gt;
== Example 3: Course Registration ==&lt;br /&gt;
&lt;br /&gt;
== Example 4: Other Example ==&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54183</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54183"/>
		<updated>2011-10-25T20:39:49Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting objects' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54182</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54182"/>
		<updated>2011-10-25T20:39:27Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
Object-oriented design can be defined as the process of planning a 'system of interacting [[Object-oriented programming|objects]]' for the purpose of solving a software problem. It is one approach to software design.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54181</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54181"/>
		<updated>2011-10-25T20:35:51Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] including the basics of OOD principles along with the design criteria and the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54180</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54180"/>
		<updated>2011-10-25T20:31:01Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered various aspects of the [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] in general and explained the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] tool for design.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54179</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54179"/>
		<updated>2011-10-25T19:12:00Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered topics of [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design] in general and explained the [http://en.wikipedia.org/wiki/Class-Responsibility-Collaboration_card Class Responsibility Collaboration card] method in detail.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54178</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54178"/>
		<updated>2011-10-25T19:08:33Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered topics of [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54177</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54177"/>
		<updated>2011-10-25T19:07:39Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
Lecture 14 &amp;lt;ref name=&amp;quot;CSC517&amp;quot;&amp;gt;[http://courses.ncsu.edu/csc517//common/lectures/notes/lec14.pdf OOD], CSC 517 Lecture14&amp;lt;/ref&amp;gt; of CSC 517 covered topics of [http://en.wikipedia.org/wiki/Object-oriented_design object oriented design].&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54176</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54176"/>
		<updated>2011-10-25T19:03:11Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54175</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54175"/>
		<updated>2011-10-25T19:03:03Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Introduction to Object Oriented Design(OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54174</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54174"/>
		<updated>2011-10-25T19:02:53Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Introduction to Object Oriented Design(OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=54173</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=54173"/>
		<updated>2011-10-25T19:02:09Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Testing Frameworks for Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-1.0.6&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-1.0.6...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-1.0.6...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For more elaborated examples one can refer to the [http://cukes.info/ Cucumber site].&lt;br /&gt;
&lt;br /&gt;
== Other Testing Frameworks==&lt;br /&gt;
This sections lists more tools that are available for testing in Ruby. The frameworks and the relevant links to reading material are listed below:-&lt;br /&gt;
&lt;br /&gt;
=== Riot===&lt;br /&gt;
Riot is a unit testing framework that results in terse tests and tries to strike a balance between Shoulda and RSpec. [http://alexyoung.org/2009/10/26/riot-testing/ Riot]&lt;br /&gt;
&lt;br /&gt;
=== Capybara===&lt;br /&gt;
Capybara is an integration testing framework for Rack applications. [https://github.com/jnicklas/capybara Capybara]&lt;br /&gt;
&lt;br /&gt;
=== Minitest ===&lt;br /&gt;
It is part of test::unit, but including minitest::unit has a contextual RSpec-esque syntax. [http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html Minitest]&lt;br /&gt;
&lt;br /&gt;
=== Jasmine===&lt;br /&gt;
Jasmine gem is a developer package used to develop Ruby web-based projects(eg. Rails, Sinatra, etc.). [https://github.com/pivotal/jasmine-gem Jasmine].&lt;br /&gt;
&lt;br /&gt;
===Minispec===&lt;br /&gt;
Minispec is a unit testing framework. [http://flanders.co.nz/2008/05/13/using-the-mini-spec-framework-that-comes-with-ironruby/ Minispec]&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup &amp;lt;ref&amp;gt;http://nested-layouts.rubyforge.org/&amp;lt;/ref&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on number of [https://github.com/ Github] views suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54172</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54172"/>
		<updated>2011-10-25T19:01:50Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Introduction to Object Oriented Design(OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54171</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54171"/>
		<updated>2011-10-25T19:01:36Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Introduction to Object Oriented Design(OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54170</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54170"/>
		<updated>2011-10-25T19:01:23Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54169</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54169"/>
		<updated>2011-10-25T18:55:58Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Introduction to Object Oriented Design(OOD)'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the concepts covered in Lecture14- [http://en.wikipedia.org/wiki/Object-oriented_design Introduction to Object Oriented Design(OOD)].&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54168</id>
		<title>CSC/ECE 517 Fall 2011/ch4 5a sp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch4_5a_sp&amp;diff=54168"/>
		<updated>2011-10-25T18:53:37Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: Created page with &amp;quot;This page serves as a knowledge source for understanding the concepts covered in Lecture14- Introduction to Object Oriented Design(OOD)&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page serves as a knowledge source for understanding the concepts covered in Lecture14- Introduction to Object Oriented Design(OOD)&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51578</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51578"/>
		<updated>2011-09-30T20:25:42Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Riot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-1.0.6&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-1.0.6...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-1.0.6...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For more elaborated examples one can refer to the [http://cukes.info/ Cucumber site].&lt;br /&gt;
&lt;br /&gt;
== Other Testing Frameworks==&lt;br /&gt;
This sections lists more tools that are available for testing in Ruby. The frameworks and the relevant links to reading material are listed below:-&lt;br /&gt;
&lt;br /&gt;
=== Riot===&lt;br /&gt;
Riot is a unit testing framework that results in terse tests and tries to strike a balance between Shoulda and RSpec. [http://alexyoung.org/2009/10/26/riot-testing/ Riot]&lt;br /&gt;
&lt;br /&gt;
=== Capybara===&lt;br /&gt;
Capybara is an integration testing framework for Rack applications. [https://github.com/jnicklas/capybara Capybara]&lt;br /&gt;
&lt;br /&gt;
=== Minitest ===&lt;br /&gt;
It is part of test::unit, but including minitest::unit has a contextual RSpec-esque syntax. [http://www.rubyinside.com/a-minitestspec-tutorial-elegant-spec-style-testing-that-comes-with-ruby-5354.html Minitest]&lt;br /&gt;
&lt;br /&gt;
=== Jasmine===&lt;br /&gt;
Jasmine gem is a developer package used to develop Ruby web-based projects(eg. Rails, Sinatra, etc.). [https://github.com/pivotal/jasmine-gem Jasmine].&lt;br /&gt;
&lt;br /&gt;
===Minispec===&lt;br /&gt;
Minispec is a unit testing framework. [http://flanders.co.nz/2008/05/13/using-the-mini-spec-framework-that-comes-with-ironruby/ Minispec]&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup &amp;lt;ref&amp;gt;http://nested-layouts.rubyforge.org/&amp;lt;/ref&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on number of [https://github.com/ Github] views suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51577</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51577"/>
		<updated>2011-09-30T20:18:32Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Riot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-1.0.6&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-1.0.6...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-1.0.6...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For more elaborated examples one can refer to the [http://cukes.info/ Cucumber site].&lt;br /&gt;
&lt;br /&gt;
== Other Testing Frameworks==&lt;br /&gt;
This sections lists more tools that are available for testing in Ruby. The frameworks and the relevant links to reading material are listed below:-&lt;br /&gt;
&lt;br /&gt;
=== Riot===&lt;br /&gt;
Riot is a unit testing framework that results in terse tests and tries to strike a balance between Shoulda and RSpec. [http://alexyoung.org/2009/10/26/riot-testing/ Riot]&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup &amp;lt;ref&amp;gt;http://nested-layouts.rubyforge.org/&amp;lt;/ref&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on number of [https://github.com/ Github] views suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51576</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51576"/>
		<updated>2011-09-30T20:18:22Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Other Testing Frameworks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-1.0.6&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-1.0.6...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-1.0.6...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For more elaborated examples one can refer to the [http://cukes.info/ Cucumber site].&lt;br /&gt;
&lt;br /&gt;
== Other Testing Frameworks==&lt;br /&gt;
This sections lists more tools that are available for testing in Ruby. The frameworks and the relevant links to reading material are listed below:-&lt;br /&gt;
&lt;br /&gt;
=== Riot===&lt;br /&gt;
Riot is a unit testing framework that results in terse tests and tries to strike a balance between Shoulda and RSpec. [http:http://alexyoung.org/2009/10/26/riot-testing/ Riot]&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup &amp;lt;ref&amp;gt;http://nested-layouts.rubyforge.org/&amp;lt;/ref&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on number of [https://github.com/ Github] views suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51575</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=51575"/>
		<updated>2011-09-30T20:12:05Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-1.0.6&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-1.0.6...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-1.0.6...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For more elaborated examples one can refer to the [http://cukes.info/ Cucumber site].&lt;br /&gt;
&lt;br /&gt;
== Other Testing Frameworks==&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup &amp;lt;ref&amp;gt;http://nested-layouts.rubyforge.org/&amp;lt;/ref&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on number of [https://github.com/ Github] views suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=50163</id>
		<title>CSC/ECE 517 Fall 2011/ch2 2e gp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2011/ch2_2e_gp&amp;diff=50163"/>
		<updated>2011-09-22T03:02:15Z</updated>

		<summary type="html">&lt;p&gt;Payyapp: /* Comparison */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;='''Testing Frameworks for Ruby'''=&lt;br /&gt;
&lt;br /&gt;
This page serves as a knowledge source for understanding the different Testing Frameworks available for [http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby].&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
= Introduction =&lt;br /&gt;
No code is perfect from the word go! Testing plays an important role in System Development Life Cycle. During testing, one follows a taxonomic procedure to uncover defects at various stages. A test framework provides various Test Types, Test Phases, Test Models, Test Metrics and acts as a guideline as to how to perform effective testing &amp;lt;ref&amp;gt; http://www.scribd.com/doc/15909730/Software-Testing-Framework &amp;lt;/ref&amp;gt;. Various testing tools are available for [http://en.wikipedia.org/wiki/Ruby Ruby]language, each having some unique features over others. Here is a brief introduction and feature comparisons of popular testing frameworks.&lt;br /&gt;
&lt;br /&gt;
== Testing Approaches ==&lt;br /&gt;
[[File:Capture5.JPG‎|thumb|right|200px|flow of test driven developmental approach]]&lt;br /&gt;
Before delving into testing for Ruby, in general, these are the followed approaches in industry today&lt;br /&gt;
&lt;br /&gt;
=== Test Driven Development ===&lt;br /&gt;
&lt;br /&gt;
This strategy, (abbreviated as TDD) &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Test-driven_development &amp;lt;/ref&amp;gt;, though cumbersome due to its methodology develops efficient code. First a unit test is written for a function, even before the code for that function is developed. Based on this test minimal code is developed to ensure the test succeeds; if not the code is modified until test run successfully. In this iterative approach, effort is made to ensure flawless code is developed.&lt;br /&gt;
&lt;br /&gt;
=== Behavior Driven Development ===&lt;br /&gt;
BDD &amp;lt;ref&amp;gt; http://en.wikipedia.org/wiki/Behavior_Driven_Development &amp;lt;/ref&amp;gt; as its popularly know, upholds the traditional iterative workflow of Test Driven Development, but it focuses on defining behaviors that is easy to understand to naive people (with no programming background) by writing tests in natural language. This approach focuses more on looking at code development from a behavioral abstraction. For example testing the code for a recipe belonging to a category of a cookbook, in BDD would be something like 'A recipe can't be without a category'&lt;br /&gt;
&lt;br /&gt;
= Unit Testing =&lt;br /&gt;
[http://en.wikipedia.org/wiki/Unit_testing Unit Testing] is a method by which one can isolate and test a unit functionality of the program, typically individual methods during and long after the code is written.&lt;br /&gt;
== Test::Unit ==&lt;br /&gt;
[[File:Capture4.JPG‎|thumb|right|400px|screen capture of TestUnit console in [http://en.wikipedia.org/wiki/RubyMine RubyMine IDE]]]&lt;br /&gt;
&lt;br /&gt;
The in-built, ready to use unit testing mechanism for Ruby is called [http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html Test::Unit].It belongs to the XUnit family unit testing framework. It has a setup method for initialization, a teardown method for cleanup and the actual test methods itself. The tests are bundled separately in a test class in the code it is aimed to test.&lt;br /&gt;
=== Features ===&lt;br /&gt;
This salient features of the Test::Unit Framework are:-&lt;br /&gt;
==== Assertions ====&lt;br /&gt;
One can use Test::Unit to make [http://en.wikipedia.org/wiki/Assertion_(computing) assertions]. The test is successful if the assertion is true and  fails if the assertion is false. All the assertion methods provided by test::unit can be found at [http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/Assertions.html Test::Unit::Assertions].&lt;br /&gt;
&lt;br /&gt;
{|border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| assert( boolean, [message] ) &lt;br /&gt;
| True if ''boolean''&lt;br /&gt;
|- &lt;br /&gt;
| assert_equal( expected, actual, [message] )&amp;lt;br&amp;gt;assert_not_equal( expected, actual, [message] )&lt;br /&gt;
| True if ''expected == actual''&lt;br /&gt;
|-&lt;br /&gt;
| assert_raise( Exception,... ) {block}&amp;lt;br&amp;gt;assert_nothing_raised( Exception,...) {block} &lt;br /&gt;
| True if the block raises (or doesn't) one of the listed exceptions.&lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Test-Fixtures ====&lt;br /&gt;
Using a test fixture, one can initialize (and cleanup) the common set of data for two or more tests hence eliminating unnecessary duplication. Fixtures are written in the setup() and teardown() methods.&lt;br /&gt;
==== Test-Suite ====&lt;br /&gt;
As unit tests increase in number for a given project, it becomes tough running them one at a time. It is hence useful to combine a bunch of related test cases and run them as batch. Test::Unit provides a class called TestSuite for this purpose&amp;lt;ref&amp;gt;http://www.ensta-paristech.fr/~diam/ruby/online/ruby-doc-stdlib/libdoc/test/unit/rdoc/classes/Test/Unit/TestSuite.html&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The &amp;lt;i&amp;gt;Test::Unit::TestCase&amp;lt;/i&amp;gt; class  is the main class and the  &amp;lt;i&amp;gt;BinarySearchTest&amp;lt;/i&amp;gt; is the subclass, it overrides &amp;lt;i&amp;gt;setup&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;teardown&amp;lt;/i&amp;gt; methods. All test methods start with 'test_' prefix thus differentiating helper methods from main methods. The Test::Unit::TestCase class makes the test methods into tests, wrapping them into a suite and running the individual tests. The results are collected into &amp;lt;i&amp;gt;Test::Unit::TestResult&amp;lt;/i&amp;gt; object.&lt;br /&gt;
&lt;br /&gt;
    require 'test/unit'&lt;br /&gt;
    require 'english_french'&lt;br /&gt;
    class EnglishFrenchTest &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    include EnglishFrenchTranslator&lt;br /&gt;
    def test_simple_word&lt;br /&gt;
        s = translate(&amp;quot;house&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;mason&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_word_beginning_with_vowel&lt;br /&gt;
        s = translate(&amp;quot;apple&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;pomme&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
    def test_two_consonant_word&lt;br /&gt;
        s = translate(&amp;quot;stupid&amp;quot;)&lt;br /&gt;
        assert_equal(&amp;quot;stupides&amp;quot;, s)&lt;br /&gt;
    end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
The tests are run by running the file test_english_french.rb.Sample results for the above test is shown below. &lt;br /&gt;
 &lt;br /&gt;
  $ ruby test_english_french.rb&lt;br /&gt;
  Loaded suite test_english_french&lt;br /&gt;
  Started&lt;br /&gt;
  FFF&lt;br /&gt;
  Finished in 0.01091 seconds.&lt;br /&gt;
  &lt;br /&gt;
  3 tests, 3 assertions, 0 failures, 0 errors&lt;br /&gt;
&lt;br /&gt;
== Shoulda ==&lt;br /&gt;
Shoulda is a library rather than a framework which gives the flexibility to write better and easy to understand tests for the Ruby application being tested. Shoulda compliments Test::Unit and RSpec in the sense that it can be used within both of them. Using Shoulda one can provide context to tests so that, tests can be grouped according to a specific feature or scenario.&lt;br /&gt;
===Features===&lt;br /&gt;
&lt;br /&gt;
[[File:Capture1.JPG‎|thumb|left|170px|components of Shoulda]]&lt;br /&gt;
&lt;br /&gt;
Shoulda consist of matchers, test-helpers and assertions&amp;lt;ref&amp;gt;http://rubydoc.info/gems/shoulda/2.11.3/frames&amp;lt;/ref&amp;gt; -&lt;br /&gt;
&lt;br /&gt;
'''Matchers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Matchers (or more popularly simply [http://en.wikipedia.org/wiki/Macro_(computer_science)#Text_substitution_macros macros]) are Test::Unit- and RSpec-compatible one-liners that test common Rails functionality. The task of developing cumbersome, complex and often erroneous code is made simple with the help of matchers.&lt;br /&gt;
&lt;br /&gt;
'''Helpers'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Helpers like ''#context'' and ''#should'' not only gives ''RSpec'' like test blocks in ''Test::Unit'' but also in addition to these, one gets nested contexts and a much more readable syntax.&lt;br /&gt;
&lt;br /&gt;
'''Assertions'''&amp;lt;br&amp;gt;	&lt;br /&gt;
Many common Rails testing idioms have been distilled into a set of useful assertions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
Shoulda for can be installed for [http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done| Rails 3.0] version by including the following in the [http://gembundler.com/gemfile.html Gemfile]&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  group :test do&lt;br /&gt;
    gem &amp;quot;shoulda&amp;quot;&lt;br /&gt;
    gem &amp;quot;rspec-rails&amp;quot;, &amp;quot;2.0.0.beta.12&amp;quot;&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
===Example===&lt;br /&gt;
&lt;br /&gt;
As far as usage of shoulda is concerned, one can write matchers as follows-&lt;br /&gt;
&lt;br /&gt;
Suppose one is testing for the class ''Post'' on a blog, heres how it is achieved using shoulda::Macthers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Post_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should belong_to(:user)&lt;br /&gt;
    should have_many(:tags).through(:taggings)&amp;lt;br&amp;gt;&lt;br /&gt;
    should validate_uniqueness_of(:title)&lt;br /&gt;
    should validate_presence_of(:title)&lt;br /&gt;
    should validate_numericality_of(:user_id)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly the test for class ''Users'' can be &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class Users_Test &amp;lt; Test::Unit::TestCase&lt;br /&gt;
    should have_many(:posts)&amp;lt;br&amp;gt;    #checking validity of e-mail id&amp;lt;br&amp;gt;&lt;br /&gt;
    should_not allow_value(&amp;quot;blah&amp;quot;).for(:email)&lt;br /&gt;
    should allow_value(&amp;quot;a@b.com&amp;quot;).for(:email)&lt;br /&gt;
    should_not allow_mass_assignment_of(:password)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As can be seen, writing test case for TDD becomes much more elegant and less error prone.&lt;br /&gt;
&lt;br /&gt;
Similarly shoulda::helpers can be written as shown - &lt;br /&gt;
&lt;br /&gt;
Suppose one wants to check the validity of getter method presence for an object, simply an should_have helper can be written like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  context &amp;quot;the create action&amp;quot; do&lt;br /&gt;
    setup do&lt;br /&gt;
      @attributes = Posts.attributes_for(:item)&lt;br /&gt;
      post :create, :item =&amp;gt; @attributes&lt;br /&gt;
    end&amp;lt;br&amp;gt;&lt;br /&gt;
    should_create_row Item do |item|&lt;br /&gt;
      assert_has_attributes @attributes, item  #''assert_has_attributes'' -  simply a helper method that makes sure the object has getter methods and values corresponding to the key/value pairs in the hash.&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this tests are run one gets the some similar following results&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    Loaded suite C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample&lt;br /&gt;
      Started&lt;br /&gt;
      ...F...&lt;br /&gt;
      Finished in 0.001000 seconds.&amp;lt;br&amp;gt;&lt;br /&gt;
      1) Failure:&lt;br /&gt;
        test: Users_Test Functions should Fail Test. (Post Test) [C:/Users/Girish/Desktop/CSC517/Workspace/Ruby/Wikiexample.rb:33]:&lt;br /&gt;
       &amp;lt;1&amp;gt; expected but was&lt;br /&gt;
       &amp;lt;nil&amp;gt;.&amp;lt;br&amp;gt;&lt;br /&gt;
      1 tests, 1 assertions, 1 failures, 0 errors, 0 skips &amp;lt;br&amp;gt;&lt;br /&gt;
      Test run options: --seed 25476    &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most interesting part of shoulda is the assertions which make writing test code efficient. An example of shoulda::Assertion can be seen as below &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  assert_same_elements([:a, :b, :c], [:c, :a, :b]) #checks whether array has same entries&lt;br /&gt;
  assert_contains(['a', '1'], /\d/) #checks for presence of a digit&lt;br /&gt;
  assert_contains(['a', '1'], 'a') #checks for presence of letter ''a''&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== RSpec ==&lt;br /&gt;
[[File:Capture3.JPG‎|thumb|left|400px|flow of logic in R-Spec]]&lt;br /&gt;
&lt;br /&gt;
RSpec is a Behavioral Driven development tool,created by Dave Astels and Steven Bake &amp;lt;ref&amp;gt;http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial&amp;lt;/ref&amp;gt; aimed as test driven development.&lt;br /&gt;
&lt;br /&gt;
RSpec is merging of two projects into one - &lt;br /&gt;
&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;application level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Story Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;i&amp;gt;&amp;lt;b&amp;gt;object level&amp;lt;/b&amp;gt;&amp;lt;/i&amp;gt; behaviour described by a &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;Spec Framework&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The primary aim of RSpec is to drift the focus from unit testing to behavioral testing, i.e. to check if the desired functionality is achieved. It is also used to check for redundancy in code and helps refactoring our code without having to re-write every test.&lt;br /&gt;
===Installation===&lt;br /&gt;
In order to install RSpec, open a command shell, go to /bin folder in Ruby directory and type&lt;br /&gt;
 &amp;gt; gem install rspec&lt;br /&gt;
&lt;br /&gt;
===Features===&lt;br /&gt;
==== RSpec Story ====&lt;br /&gt;
A Story describes the functionality of a specific software feature, and it describes it in a way that is easy to understand from the point of view of a client. In fact a story can be thought of as a conversation between a client and a programmer over some feature of the software. The key points of a story are:- &amp;lt;i&amp;gt;Title, Narrative, Scenario, Givens, Details&amp;lt;/i&amp;gt;&amp;lt;sup&amp;gt;[http://blog.emson.co.uk/2008/06/understanding-rspec-stories-a-tutorial/]&amp;lt;/sup&amp;gt;&lt;br /&gt;
==== Message Expectations ====&lt;br /&gt;
A message expectation (a.k.a. mock method)&amp;lt;ref&amp;gt;http://rspec.info&amp;lt;/ref&amp;gt; is an expectation that an object should receive a specific message during the execution of an example. This is similar to &amp;quot;Assertions&amp;quot; in test::unit.&lt;br /&gt;
==== Group ====&lt;br /&gt;
More than one executable example can be grouped into one file.&lt;br /&gt;
==== Spec File====&lt;br /&gt;
A spec file is a file that contains one or more group examples.&lt;br /&gt;
==== describe() and it() methods ====&lt;br /&gt;
The describe() method takes an arbitrary number of arguments and returns a sub-class of Spec::Example::ExampleGroup. The it() method takes a single String, an optional Hash and an optional block.&lt;br /&gt;
&lt;br /&gt;
=== Example Test ===&lt;br /&gt;
The below code is an example for testing using rspec. The spec file, ruby file and the output are shown. It can be seen that code can be added to the spec file for different test conditions and expectations.&lt;br /&gt;
&lt;br /&gt;
  # archery_spec.rb&lt;br /&gt;
  require 'archery'&lt;br /&gt;
  describe Archery, &amp;quot;#score&amp;quot; do&lt;br /&gt;
   it &amp;quot;returns 0 for all mock games&amp;quot; do&lt;br /&gt;
    archery = Archery.new&lt;br /&gt;
    20.times { archery.hit(0) }&lt;br /&gt;
    archery.score.should == 0&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
   # archery.rb&lt;br /&gt;
     class Archery&lt;br /&gt;
     def hit(arrows)&lt;br /&gt;
     end&lt;br /&gt;
     def score&lt;br /&gt;
      0&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
  $ spec archery_spec.rb --format nested&lt;br /&gt;
    Archery#score&lt;br /&gt;
    returns 0 for all mock games&lt;br /&gt;
    Finished in 0.006535 seconds&lt;br /&gt;
    1 example, 0 failures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Cucumber ==&lt;br /&gt;
Cucumber is a testing tool that follows the BDD approach of testing. Cucumber written itself in Ruby programming language allows the execution of feature documentation written in natural language often termed as [http://en.wikipedia.org/wiki/User_story user stories]&lt;br /&gt;
=== Features of Cucumber ===&lt;br /&gt;
&lt;br /&gt;
==== Terminology of Cucumber==== &lt;br /&gt;
There are few taxonomy terms related to Cucumber &amp;lt;ref&amp;gt;http://cuke4ninja.com/sec_cucumber_jargon.html&amp;lt;/ref&amp;gt; as follows-&lt;br /&gt;
[[File:Capture.JPG‎|thumb|left|200px|major components of Cucumber]]&lt;br /&gt;
'''Stakeholder''' - A person who gets some value out of the system like an administrator&amp;lt;br&amp;gt;'''Feature''' - A feature is a piece of system functionality that delivers value to one or more stakeholders&amp;lt;br&amp;gt;'''User story''' - It is a rough description of scope for future work used as planning tools. Most common format for the stories are - ''&amp;quot;in order to...&amp;quot;'',''&amp;quot;as a...&amp;quot;'',''&amp;quot;I want&amp;quot;''&amp;lt;br&amp;gt;'''Feature file''' - It describes a feature or a part of feature with illustrative example of expected results&amp;lt;br&amp;gt;'''Key Example''' - Each feature is illustrated with Key Examples which show what are expected in a given test case&amp;lt;br&amp;gt;'''Scenario''' - Scenario captures one key example for a feature file. It represents how stakeholder gets some value from that system. Example of good scenarios for checking login module includes ''user not signed up'', ''password has expired''&amp;lt;br&amp;gt;'''Step''' - Steps are domain language phrases which can be combined to write scenarios. They combine a GWT directive with a regular expression to evaluate something and add a simple ruby code which tells the step what should be done further.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
==== Pattern ==== &lt;br /&gt;
Cucumber follows a GWT (Given-When-Then) pattern for developing test cases. In the scenarios written for Cucumber, one states what a ''given'' scenario is, ''when'' one is presented with information and ''then'' what should happen so that the logic of information can be validated.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
Cucumber is a high-level testing tool that defines the feature specs. An typical [[http://www.ultrasaurus.com/sarahblog/2008/12/rails-2-day-3-behavior-driven-development/#spec example]] for a Cucumber Scenario is shown below - &lt;br /&gt;
First one need to install the Cucumber gem on Ruby using this simple command &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $gem install cucumber-rails&lt;br /&gt;
          Successfully installed cucumber-rails-0.3.0&lt;br /&gt;
          1 gem installed&lt;br /&gt;
          Installing ri documentation for cucumber-rails-0.3.0...&lt;br /&gt;
          Installing RDoc documentation for cucumber-rails-0.3.0...&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When installed, a basic Cucumber test is generated using [http://en.wikipedia.org/wiki/Generator_(computer_programming) generator] script&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/generate rspec&lt;br /&gt;
      $script/generate cucumber&lt;br /&gt;
            force  config/database.yml &lt;br /&gt;
            create  config/cucumber.yml &lt;br /&gt;
            create  config/environments/cucumber.rb &lt;br /&gt;
            create  script/cucumber &lt;br /&gt;
            create  features/step_definitions &lt;br /&gt;
            create  features/step_definitions/web_steps.rb &lt;br /&gt;
            create  features/support &lt;br /&gt;
            create  features/support/paths.rb &lt;br /&gt;
            create  features/support/env.rb &lt;br /&gt;
            exists  lib/tasks &lt;br /&gt;
            create  lib/tasks/cucumber.rake&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
A feature file is next created with name ''feature_name.featrue'' . the Feature is described in  the Feature: directive, followed by the story. The story is written in the format shown in the code: &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;''As a &amp;lt;role&amp;gt; , I want &amp;lt;feature&amp;gt; , So that &amp;lt;business Value&amp;gt;.&amp;lt;/font&amp;gt;''&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $ nano tasklist.feature&amp;lt;br&amp;gt; &lt;br /&gt;
      Feature: Tasks&amp;lt;br&amp;gt;&lt;br /&gt;
      In order to keep track of tasks&lt;br /&gt;
      People should be able to&lt;br /&gt;
      Create a list of tasks&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Each feature can have multiple scenario. One such scenario for the login feature is as shown below&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      Scenario: List Tasks&lt;br /&gt;
      Given that I have created a task &amp;quot;task 1&amp;quot;&lt;br /&gt;
      When I go to the tasks page&lt;br /&gt;
      Then I should see &amp;quot;task 1&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
When a scenario is ready following command is issued &lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      $script/cucumber features/tasklist.feature&lt;br /&gt;
            0 scenarios&lt;br /&gt;
            0 steps&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Steps can be added to scenarios, which are combination of a GWT directive, a [http://en.wikipedia.org/wiki/Regular_expression regular expression] and a block of ruby code which states what this step does&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
      /features/step_definitions$nano tasklist_steps.rb&amp;lt;br&amp;gt;&lt;br /&gt;
            Given /^that I have created a task &amp;quot;(.*)&amp;quot;$/ do |desc|&lt;br /&gt;
              Task.create!(:description =&amp;gt; desc)&lt;br /&gt;
            end&lt;br /&gt;
            When /^I go to the tasks page$/ do&lt;br /&gt;
              visit &amp;quot;/tasks&amp;quot;&lt;br /&gt;
            end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Comparison =&lt;br /&gt;
Now that the major frameworks have been explained briefly, here is a comparison among them based on few criteria/metrics&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: 95%; text-align: center; width: auto;; &amp;quot;cellspacing=&amp;quot;0&amp;quot;; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Metric&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Test::Unit&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Shoulda&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|RSpec&lt;br /&gt;
!style=&amp;quot;width:20%&amp;quot;|Cucumber&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Framework &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Test Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;It is an extension to Test::Unit. It has more capabilities and simpler readable syntax compared to Test::Unit.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Behavior Driven Development framework.&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Version&amp;lt;ref&amp;gt;http://ruby-toolbox.com/categories/testing_frameworks.html&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.2.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.11.3&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;2.6.0&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;1.0.6&amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Website &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://test-unit.rubyforge.org/ Test::Unit] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [https://github.com/thoughtbot/shoulda Github -Shoulda] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://rspec.info/ RSpec] &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; [http://cukes.info/ Cucumber] &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Base Library &amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Unit-testing_frameworks_for_Ruby_(programming_language)&amp;lt;/ref&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Allows nested setup&amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; No &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Yes &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt;Opaqueness/Expressiveness &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Opaque to a certain extent, low level coding required  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More descriptive &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More expressive compared to Unit::test and shoulda &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Run Times &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Faster than RSpec because it has fewer features and hence lesser code to run &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; More features but comes at a cost, run time slower than shoulda and test::unit. &amp;lt;/p&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; General Use &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing  &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing especially on the Rails framework &amp;lt;sup&amp;gt;[http://www.linuxjournal.com/magazine/forge-testing-rails-applications-shoulda]&amp;lt;/sup&amp;gt; &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Unit testing &amp;lt;/p&amp;gt;&lt;br /&gt;
| &amp;lt;p align=&amp;quot;justify&amp;quot;&amp;gt; Integration testing &amp;lt;/p&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Conclusion =&lt;br /&gt;
The case as to which is the best framework, depends on scenario for which that testing framework is used. In general,[http://ruby-toolbox.com/categories/testing_frameworks.html stats] based on [https://github.com/ Github] downloads suggests, Cucumber is the industry favored testing framework for Ruby. The reason to this accounts for easy-to-use and easy-to-understand syntax and the ability to focus on only one test at a time. RSpec comes second (again in terms of [http://ruby-toolbox.com/categories/testing_frameworks.html popularity and Github views]) followed by others.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Payyapp</name></author>
	</entry>
</feed>