Case Lab Manual
Case Lab Manual
2012-13
Alwar (Rajasthan)
Lab Manual
COMPUTER AIDED SOFTWARE ENGINEERING LAB
Program:
B.Tech
Semester
Session:
2012-2013
IV sem
Subject
Code
4CS10
Name of Subject
Exam
Hrs.
4
M.M.
Sessional/
Mid term
60
M.M.
End
Term
40
Total
M.M.
100
Assessment criteria
A. Internal Assessment:
60
In continuous evaluation system of the university, a student is evaluated throughout semester. His/her
performance in the lab, attendance, practical knowledge, problem solving skill, written work in practical file and
behavior are main criteria to evaluate student performance. Apart from that a lab quiz will be organize to see
program programming skill and knowledge about the proposed subject.
B.
External Assessment:
40
At the end of the semester a lab examination will be scheduled to check overall programming skill, in which
student will need to solve 2 programming problems in time span of 3 hours.
C. Total Marks:
60+40=100
Describe: Relevance of CASE tools, high end and low end CASE
tools, automated support for data dictionaries, DFD, ER diagrams.
BEYOND CURRICULUM:
1. State diagram of the systems under UML Diagrams.
2. Implementation Diagrams of the systems under software designing.
i.
Component and deployment diagrams
3. ATM System.
4. Testing Codes
Department of Computer Science & Engineering
EXPERIMENT NAME
PAGE NO.
7-8
9-11
12-13
14-16
17-19
20-22
27-29
30-31
32-34
32-34
40-41
20-22
35-37
38-39
2
3
designing.
ii.
ii.
iii.
iv.
v.
Every laboratory sessions begins SHARP at the specied time in the schedule.
ii.
Each lab session is two hours long. Students are advised to bring their practical file
iii.
iv.
v.
Food, drinks and cell phone are not allowed inside the laboratory.
Get familiar with UML (modeling language for analysis and design).
3. CASE Tools
No tools are used for this lab.
4. In-Class Example
Some examples of problem definition will be presented in the class.
5. Exercises
Form groups of 3 students (with one of them as a leader).
Brainstorm and list 5 suitable project titles.
Present these to the class.
Choose one of the projects from your list.
Try to write (a hypothetical) project definition for it.
Present it to the instructor/class.
6. Deliverables
Form teams of 4 students for the term project.
Submit their IDs, names, section by email within this week.
Suggest / research a project and write a project definition/problem statement.
With VSS you can go back to an earlier bug-free version of the source code to try to
track down where the bug was introduced, compare versions of a document and
recover a copy of the document that you saved weeks or months ago.
3.1 How Does It Work?
In order for Visual Source Safe to manage your documents, you must first check them
in to VSS. When you first check a file in to VSS, the program records the contents of
this original version. The document then becomes read-only to prevent you from
making changes that VSS cannot track. When you want to edit a document that is
under source control, you must check the document out of VSS to get a writable copy.
When you are finished editing the document, you save the document and then check it
back in to VSS. VSS will then contain two "versions" of the document: the original
and the new edit. In reality, VSS does not keep two full copies. It keeps the original
document, and a small file describing the differences between the original and the
edited version. If you edit the document 100 times over the course of a year, you will
have access to all 100 versions in VSS, without having to use all of the disk space that
100 copies of the document would occupy.
3.2 Why Is It Useful?
VSS lets you view any version of your document, or check out any version for further
editing. It also lets you pick any two versions-- say, draft 6 and draft 31-- and compare
them with the Diff utility. This comparison shows the two documents side by side,
with the differences highlighted and color-coded. VSS also enables you to attach
comments to each revision; these comments may or may not appear in the document
itself, depending on how you configure the program. But the comments can be viewed
independently of the documents themselves.
Another very useful feature of VSS is labeling. Labeling provides a simple way of
knowing which versions of which documents belong together in a group. VSS was
designed for environments in which multiple users are editing the same documents. It
permits only one user at a time to edit each document, thereby guaranteeing that only
one authoritative "latest version" of a document exists at any given time.
4. In-Class Demo
A demonstration will be given show the basic functions of VSS in order to manage
your files. These features include:
a. Creating a new project.
b. Checking files in and out.
c. Labeling files.
d. Viewing revision history.
e. Using Diff to show differences.
f. Using Search to find documents.
For more information on software processes and VSS tutorial please refer to Lab 2
slides which contain an overview of software processes and VSS tutorial slides.
5. Exercises
Create a project and add some java files to it (at least 3 files).
Label the existing files.
Department of Computer Science & Engineering
system's intended functions (use cases), its surroundings (actors), and relationships
between the use cases and actors (use case diagrams).
2.5 Actors
Are NOT part of the system they represent anyone or anything that must
interact with the system.
Only input information to the system.
Only receive information from the system.
Both input to and receive information from the system.
Represented in UML as a stickman.
2.6 Use Case
A sequence of transactions performed by a system that yields a
measurable result of values for a particular actor
A use case typically represents a major piece of functionality
that is complete from beginning to end. A use case must
deliver something of value to an actor.
2.7 Use Case Relationships
Between actor and use case.
Association / Communication.
Arrow can be in either or both directions; arrow indicates who initiates
communication.
Between use cases (generalization):
Uses
Where multiple use cases share pieces of same functionality.
Extends
Optional behavior.
Behavior only runs under certain conditions (such as alarm).
Several different flows run based on the users selection.
3. CASE Tools
The Rational Rose product family is designed to provide the software developer with
a complete set of visual modeling tools for development of robust, efficient solutions
to real business needs in the client/server, distributed enterprise and real-time systems
environments. Rational Rose products share a common universal standard, making
modeling accessible to nonprogrammers wanting to model business processes as well
as to programmers modeling applications logic.
4. In-Class Example
Now you will learn how to apply the above-mentioned methods to draw use case
diagrams from the problem statement. Please refer to Lab 5 slides which explain the
process in detail with some examples.
5. Exercises
Read carefully the following problem statement
We are after a system that controls a recycling machine for returnable bottles and
cans. The machine will allow a customer to return bottles or cans on the same
occasion.
When the customer returns an item, the system will check what type has been
returned. The system will register how many items each customer returns and, when
the customer asks for a receipt, the system will print out what he deposited, the value
of the returned items and the total return sum that will be paid to the customer.
The system is also be used by an operator. The operator wants to know how many
items of each type have been returned during the day. At the end of the day, the
operator asks for a printout of the total number of items that have been deposited in
the machine on that particular day. The operator should also be able to change
information in the system, such as the deposit values of the items. If something is
amiss, for example if a can gets stuck or if the receipt roll is finished, the operator will
be called by a special alarm signal.
After reading the above problem statement, find:
1. Actors
2. Use cases with each actor
3. Find extended or uses use cases (if applicable)
4. Finally : draw the main use case diagram:
6. Deliverables
You should submit the solutions for the previous exercises.
You should use these techniques to draw use case diagrams for your term project
using Rational Rose.
Relationship
Process
Data flow
Control flow
Data store
1.1 Preconditions
Create course offerings sub-flow of the maintain course information use case must
execute before this use case begins.
1.2 Main Flow
This use case begins when the professor logs onto the registration system and enters
his/her password. The system verifies that the password is valid (E-1) and prompts the
professor to select the current semester or a future semester (E-2). The professor
enters the desired semester. The system prompts the Professor to select the desired
activity: ADD, DELETE, REVIEW, PRINT, or QUIT.
If the activity selected is ADD, the S-1: add a course offering sub-flow is performed.
If the activity selected is DELETE, the S-2: delete a course offering sub-flow is
performed.
If the activity selected is REVIEW, the S-3: review schedule sub-flow is performed.
If the activity selected is PRINT, the S-4: print a schedule sub-flow is performed.
If the activity selected is QUIT, the use case ends.
1.3 Sub-flows
S-1: Add a Course Offering:
The system displays the course screen containing a field for a course name and
number. The professor enters the name and number of a course (E-3). The system
displays the course offerings for the entered course (E-4). The professor selects a
course offering. The system links the professor to the selected course offering (E-5).
The use case then begins again.
S-2: Delete a Course Offering:
The system displays the course offering screen containing a field for a course offering
name and number. The professor enters the name and number of a course offering (E6). The system removes the link to the professor (E-7). The use case then begins
again.
S-3: Review a Schedule:
The system retrieves (E-8) and displays the following information for all course
offerings for which the professor is assigned: course name, course number, course
offering number, days of the week, time, and location. When the professor indicates
that he or she is through reviewing, the use case begins again.
Department of Computer Science & Engineering
Decision- show where the flow of control branches based on a decision point:
o Guard condition is used to determine which path from the decision
point is taken.
Synchronization-what activities are done concurrently? What activities must
be completed before processing may continue (join).
3. CASE Tools
Rational Rose/Visio Microsoft
4. In-Class Example
Now you will learn how to apply the above mentioned methods to write flow of
events and drawing activity diagrams from the use case(s) flow of events. Please refer
to Lab 7 slides which explain the process in detail with some examples.
5. Exercises
1. Take two of the use cases from recycling machine problem (Lab 5) and write
flow of events for those. You should work in groups of three to solve this
problem.
2. Practice activity diagram from the example in PPT (Lab 7) for course catalog
creation.
6. Deliverables
You should submit the solutions for the previous exercises.
You should use these techniques to write flow of events and draw activity diagrams
for your term project.
Noun Phrase Approach: Examine the requirements and underline each noun.
Each noun is a candidate class; divide the list of candidate classes into:
Relevant classes: part of the application domain; occur frequently in
requirements.
Irrelevant classes: outside of application domain
Fuzzy classes: unable to be declared relevant with confidence; require
additional analysis
2.4.2
2.4.3
Use Case Driven Method: The scenarios - use cases that are fundamental to
the system operation are enumerated. Going over each scenario leads to the
identification of the objects, the responsibilities of each object, and how these
objects collaborate with other objects.
2.4.4
2.4.5
Long, narrow rectangles can be placed over the lifeline of objects to show
when the object is active. These rectangles are called activation lines.
6. Deliverables
You should submit the solutions for the previous exercises.
Also you should use specifying class attributes, methods and the relationship
with other classes you learned in your term project.
The operations associated with the state are listed in the lowest compartment
of the state box.
In the operations part, we usually use one of the following reserved words:
o Entry: a specific action performed on the entry to the state.
o Do: an ongoing action performed while in the state.
o On: a specific action performed while in the state.
o Exit: a specific action performed on exiting the state.
There are two special states added to the state transition diagram- start state
and end state.
Notation of start state is a solid black circle and for the end state a bulls eye is
used.
3. CASE Tools
Rational Rose/Visio Microsoft
4. In-Class Example
Now you will learn how to apply the above mentioned methods of drawing state
transition diagrams (STD). Please refer to Lab 11 slides which explain the process of
finding dynamic classes and creating STD with some examples.
5. Exercises
Here is what happens in a microwave oven:
1. The oven is initially in an idle state with door open, where the light is turned
on.
2. When the door is closed it is now in idle with door closed, but the light is
turned off.
3. If a button is pressed, then it moves to initial cooking stage, where the timer
is set and lights are on, and heating starts
4. At any moment the door may be opened, the cooking is interrupted, the timer
is cleared, and heating stops.
5. Also while cooking, another button can be pushed and extended cooking
state starts, where the timer gets more minutes. At any moment door can be
opened here also.
6. If the time times out, then cooking is complete, heating stops, lights are off,
and it sounds a beep.
7. When the door is open, again the oven is in idle state with the door open.
Draw a state transition diagram for the microwave oven.
6. Deliverables
You should submit the solutions for the previous exercises.
You should use these techniques to create state transition diagrams for your term
project.
JUnit is an open-source project to provide a better solution for unit testing in Java. It can be
integrated with many Java IDEs.
Central idea: create a separate Java testing class for each class youre creating, and then provide
a means to easily integrate the testing class with the tested class for unit testing.
3.1 Unit Terminology
A unit test: is a test of a single class.
A test case: tests the response of a single method to a particular set of inputs.
A test suite: is a collection of test cases.
A test runner: is software that runs tests and reports results.
A test fixture: sets up the data (both objects and primitives) that are needed to run tests.
For example if you are testing code that updates an employee record, you need an
employee record to test it on.
3.2 How JUnit Works
Define a subclass of TestCase.
Override the setUp() & tearDown() methods.
Define one or more public testXXX()methods
o Exercise the object(s) under test.
o Asserts the expected results.
Define a static suite() factory method
o Create a TestSuite containing all the tests.
Optionally define main() to run the TestCase in batch mode.
4. In-Class Demo
A tutorial on how to use JUnit with some example will be presented. Please refer to Lab 13 slides
for an overview of software testing and JUnit tutorial with some examples.
5. Exercises
Write a JUnit test class for testing
6. Deliverables
You should submit the solutions for the previous exercise.
Also, if you are building your project using Java, you should use JUnit for testing.