OOMD Using UML Case Study: Online Examination System Object Oriented Modeling And Design Using UML Practical 11-Group Case Study Online Examination System - Prepared By: Aniket V. Raut – 244 Vikas V. Shetty – 250 Jayprakash Yadav - 260 RGIT, Mumbai Page 1 Dept-MCA (Sem IV)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
OOMD Using UML Case Study: Online Examination System
Object Oriented Modeling And Design
Using UML
Practical 11-Group Case Study
Online Examination System
- Prepared By:
Aniket V. Raut – 244
Vikas V. Shetty – 250
Jayprakash Yadav - 260
RGIT, Mumbai Page 1 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
OOMD Using UML Case Study: Online Examination System
Context Level DFD
Fig 3.1 Context Level DFD
RGIT, Mumbai Page 9 Dept-MCA (Sem IV)
Teacher
Management
Exam Cat
Level
Test Record
Qts Bank & Test Qts1
Student Test & Result 2
Report 3
Teacher
Student
Question Bank & Test Creation Qts Bank & Test Created
Test Paper & Result Display
Test Paper & Result Display
Management
Test Report
Enrollment Report Request
Enrollment Report Display
Store
Retrieve
Store
Retrieve
Store
Retrieve
Retrieve
Store
Store
StoreStore
Retrieve
Retrieve
Result
OOMD Using UML Case Study: Online Examination System
DFD FRAGMENTS
Fig 3.2 DFD Level-1
RGIT, Mumbai Page 10 Dept-MCA (Sem IV)
Viewer
Qts BankQts Bank
ResultResult
TestTest
Trial Test & Result4 ViewerAppearing for Trial Test Test Paper & Result Display
Selected Qts TestName
Test details
OOMD Using UML Case Study: Online Examination System
Fig 3.3 DFD Level-1
RGIT, Mumbai Page 11 Dept-MCA (Sem IV)
Teacher
Qts Bank
Exam Cat
Level
Test
Creation of Qts Bank1.1
Creation of Test1.2
Teacher
Question Bank CreationQuestion Bank Created
Test Creation
Test Created
Assign
Assign
Assign
Selected
Prepared
OOMD Using UML Case Study: Online Examination System
Fig 3.4 DFD Level-2 (Process 1)
RGIT, Mumbai Page 12 Dept-MCA (Sem IV)
Student
Teacher
Management
Qts Bank
Student
Test
Test Record
Enrollment
Generation Student Result2.2
Get Student Info2.3
Display Test 2.1
Student
Test Paper Display
Enrollment Report
Result Display
Test Paper Display
Result Display
Enrollment Receipt
Appearing For Test
Submit Test
Enrollment
Qts Selected
Paper created
Summary
Test Info
Retrive
Store
Receipt
Id Generated
OOMD Using UML Case Study: Online Examination System
Fig 3.5 DFD Level-2 (Process 2)
RGIT, Mumbai Page 13 Dept-MCA (Sem IV)
Management
Result
Test
Enrollment
EnrollmentReport
3.1
Test Report3.2
Management
Request Enrollment Report
Request Test Report
Report Display
Report Display
Summery
Summery
Summery
Summery
OOMD Using UML Case Study: Online Examination System
Fig 3.6 DFD Level-2 (Process 3)
RGIT, Mumbai Page 14 Dept-MCA (Sem IV)
Viewer
Qts Bank
Result
Test
Generation of Result4.2
Trial Test Display4.1
Viewer
Appearing for Trial Test
Result DisplaySubmit Test
Qts Selected
Paper created
Store
Retrieve
OOMD Using UML Case Study: Online Examination System
Fig 3.7 DFD Level-2 (Process 4)
RGIT, Mumbai Page 15 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
4. Activity Diagram
An Activity diagram is a visual representation of any system's activities and flows of data or decisions
between activities.
• Activity diagrams provide a very broad view of a business process.• They represent the dynamics of a system.• They are flow charts that are used to show the work flow of a system. • They show the flow of control from activity to activity in the system.• They show what activities can be done in parallel, and any alternative paths through the flow. • Purpose
• Model business workflows• Model operations
• Activity diagrams commonly contain• Activity states and action states• Transitions• Objects
Action States and Activity States
• Action states are atomic and cannot be decomposedWork of the action state is not interrupted
• Activity states can be further decomposedTheir activity being represented by other activity diagrams
They may be interrupted
• Represented in UML by a rounded rectangle.
• Activity represents the performance of some behavior in the work flow.
Branching
• When modeling the workflow of a system, it is often necessary to show where the flow of control branches based on a decision point.
• The transition from a decision point contain a guard condition.• The guard condition is used to determine which path from the decision point is taken.• Decisions along with their guard conditions allow you to show alternative paths through a work flow.
RGIT, Mumbai Page 16 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
A branch specifies alternate paths taken based on some Boolean expression A branch may have one incoming transition and two or more outgoing ones
Admin Entered Admin Login
Login
Y
Teacher Login
N
Assign Teacher Defined Exam Category & Exam Level
Teacher Entered Teacher
Details
Student Details
YN
Issue IDTeacher
AuthorisedYN
Create Qts Bank Modify Or Delete
Qts BankY
N
Qts Bank Created
Create Test
Test Created & Confirm
YN
Viewer ID Issued
Student ID Issued
Issue Student ID
YN
Appear Demo Exam & Issue Result
Y
N
Attempt Final Exam
Enrollment Issue Receipt & Enrollment ID
NY
Issue Fail Result
N
Y
Enter Enrollment ID
Attempt Exam
Modify Or Delete Teat
ID ValidationAttending Test
PaperN Y
Time Out
Submit Paper
NY Y
Display & Print Result
YN
Fig 4.1 The Activity Diagram for Online Examination system
RGIT, Mumbai Page 17 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
5. Use Case Diagram :
The use-case concept was introduced by Ivar Jacobson in the object-oriented software engineering (OOSE) method.
A use-case diagram is a graph of actors, a set of use cases enclosed by a system boundary, communication (participation) associations between the actors and the use cases, and generalization among the cases.
Use case diagrams show how users interact with the system.
Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is on what a system does rather than how.
Use case diagrams are closely connected to scenarios. A scenario is an example of what happens when someone interacts with the system. Here is a scenario for a medical clinic.
"A patient calls the clinic to make an appointment for a yearly checkup. The receptionist finds the nearest empty time slot in the appointment book and schedules the appointment for that time slot. "
Used during requirements elicitation to represent external behavior Actors represent roles, that is, a type of user of the system Use cases represent a sequence of interaction for a type of functionality The use case model is the set of all use cases. It is a complete description of the functionality of the
system and its environment
Actors
An actor models an external entity which communicates with the system: User External system Physical environment
An actor has a unique name and an optional description. Examples:
Passenger: A person in the train GPS satellite: Provides the system with GPS coordinates
RGIT, Mumbai Page 18 Dept-MCA (Sem IV)
Passenger
OOMD Using UML Case Study: Online Examination System
Use Cases
A use case represents a class of functionality provided by the system as an event flow.
A use case consists of:
Unique name Participating actors Pre-conditions Entry conditions (triggers) Flow of events Exit conditions (success ‘guarantees’) Special requirements
RGIT, Mumbai Page 19 Dept-MCA (Sem IV)
Purchase Ticket
OOMD Using UML Case Study: Online Examination System
Fig 5.1 Use case diagram for Online Examination System
USE CASE DESCRIPTION :
Actors:
A. Administrator
B. Student
C. Teacher
D. viewer
RGIT, Mumbai Page 20 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Use cases:
1. Creating question bank
2. Creation of test
3. Enrolling student
4. Student test
5. Generating result
6. Trail test
7. report
1. creating question bank
Question bank is created by the Authorized Teacher only.
2. Creation of test
Authorized teacher will create a test paper from the question bank previously prepared.
3. Enrolling student
Student has to clear the demo test. After which her will be enrolled and given a Enrollment ID.
4. Student Test
After receiving the Enrollment ID the particular student has to give the exam online on the
prescheduled date and time
5. Generating results
The exam is of fixed duration after which the paper would be auto submitted and the result of the
candidate would be generated.
6. Trail Test
Any unregistered user or first time user is a Viewer. He has to clear a demo test in order to
receive the enrollment ID which in turn will be used to appear for the Final Examination.
RGIT, Mumbai Page 21 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
7 Report
At the end of the Examination, a detailed combine result of the Enrolled students would be
documented as a report
6. UML Interaction Diagram (Sequence And Collaboration Diagram) .
Sequence diagrams :
A sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page. The objects involved in the operation are listed from left to right according to when they take part in the message sequence.
Sequence diagrams contain the following:
– Class roles (subsystem/object/class, actor, and external system roles in the interaction). These are (usually) drawn across the top of the diagram.
– Lifelines (subsystem/object/class existence). These (usually) extend down the diagram.
– Activations (show when the subsystem/object/class is doing something)
Messages (communication between roles
RGIT, Mumbai Page 22 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Teacher : TeacherQts Bank : Class
Enter Questions
Questions Added
Modify Questions
Questions Modified
Delete Questions
Questions Deleted
Select Exam Category & Level
Exam Category & Level Selected
Fig 6.1 Sequence Diagram For Creating Qts Bank
Qts Bank : Class
Test : ClassTeacher : Teacher
Enter Question
Question Added
Modify Questions
Question Modified
Delete Question
Question Deleted
Question Send
Request for Questions
Fig 6.2 Sequence Diagram For Creating Test
RGIT, Mumbai Page 23 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Student : Student Management : Management
Enrollment : Class
Enrolling for Test
Enter Test Name
Test Name Entered
Fees Details
Payment of Fees
Receipt_ID Issued
Display ScheduleEnrollment Report
Fig 6.3 Sequence Diagram For Enrollment
Test : Class Test Record : ClassResult : Class
Question & Answer Submitted
Wrong Answer
Marks (-1)
Correct Answer
Marks (2)
Final Marks
Fig 6.4 Sequence Diagram For Generation of Result
RGIT, Mumbai Page 24 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Enrollment : Class
Management : Management
Result : Class
Enrollment Report
Weekly Report
Monthly Report
Yearly Report
Summary Report
Fig 6.5 Sequence Diagram For Report
Viewer : Viewer
: Trial Test : Class
Teacher : Teacher
Attempt Test
Display Result
Request for Test
Request send
Request Approved
Request Grant
Fig6.6 Sequence Diagram for Trial Test
RGIT, Mumbai Page 25 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Student : Student
Test : Class
Teacher : Teacher
Result : Class
Request For Test
Demand For Recept_ID
Enter Receipt_ID
Invalid Receipt_ID
ReEnter Receipt_ID
Receipt_ID Valid
Display Test
Attempting Test
Submit Paper
Marks Stored
Display & print Result
Display & print Result
Fig 6.7 Sequence Diagram For Student Test
Collaboration diagrams :
RGIT, Mumbai Page 26 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Collaboration diagrams are also interaction diagrams. They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. In a sequence diagram, object roles are the vertices and messages are the connecting links.
Collaboration diagrams show (used to model) how objects interact and their roles. They are very similar to sequence diagrams. Actually they are considered as a cross between class
and sequence diagram. Sequence Diagrams are arranged according to Time. Collaboration Diagrams represent the structural organization of object. [Both sequence and collaboration diagrams are called interaction diagrams]
Forms a context for interactions
– May realize use cases– May be associated with operations– May describe the static structure of classes
Collaboration diagrams contain the following:
– Class roles (subsystems/objects/classes/actors/ external systems) as before.– Association roles (pathways or links over which messages flow)– Message flows (messages sent between class roles)
OOMD Using UML Case Study: Online Examination System
Test : Class
Test Record : Class
Result : Class
1: Question & Answer Submitted
2: Wrong Answer4: Correct Answer
6: Final Marks
3: Marks (-1)5: Marks (2)
6.11 Collaboration Diagram For Generation of Result
Management : Management
Enrollment : Class
Result : Class
1: Enrollment Report
2: Weekly Report3: Monthly Report4: Yearly Report
5: Summary Report
6.12 Collaboration Diagram For Report
RGIT, Mumbai Page 29 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Student : Student
Test : Class
Teacher : Teacher
Result : Class
1: Request For Test3: Enter Receipt_ID
5: ReEnter Receipt_ID8: Attempting Test9: Submit Paper
2: Demand For Recept_ID4: Invalid Receipt_ID6: Receipt_ID Valid
7: Display Test
10: Marks Stored
12: Display & print Result
11: Display & print Result
6.13 Collaboration Diagram For Student Test
Viewer : Viewer
: Trial Test : Class
Teacher : Teacher
4: Request Grant6: Display Result
5: Attempt Test1: Request for Test
2: Request send
3: Request Approved
6.14 Collaboration Diagram For Viewer Test
RGIT, Mumbai Page 30 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
7. Statechart Diagram:
The name of the diagram itself clarifies the purpose of the diagram and other details. It describes
different states of a component in a system. The states are specific to a component/object of a system.
A Statechart diagram describes a state machine. Now to clarify it state machine can be defined as a
machine which defines different states of an object and these states are controlled by external or internal
events.
Purpose:
Statechart diagram is one of the five UML diagrams used to model dynamic nature of a system.
They define different states of an object during its lifetime. And these states are changed by events. So
Statechart diagrams are useful to model reactive systems. Reactive systems can be defined as a system
that responds to external or internal events.
Statechart diagram describes the flow of control from one state to another state. States are defined as a
condition in which an object exists and it changes when some event is triggered. So the most important
purpose of Statechart diagram is to model life time of an object from creation to termination.
Following are the main purposes of using Statechart diagrams:
To model dynamic aspect of a system.To model life time of a reactive system.To describe different states of an object during its life time.Define a state machine to model states of an object.
Notation :
State The State notation marks a mode of the entity, and
is indicated using a rectange with rounded corners,
and the state name written inside.
Transition A Transition marks the changing of the object State,
caused by an event. The notation for a Transition is
an arrow, with the Event Name written above,
below, or alongside the arrow.
RGIT, Mumbai Page 31 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Initial State The Initial State is the state of an object before any
transitions. For objects, this could be the state when
instantiated. The Initial State is marked using a solid
circle. Only one initial state is allowed on a
diagram.
Final State End States mark the destruction of the object who's
state we are modeling. These states are drawn using
a solid circle with a surrounding circle.
Admin Login
Teacher Assign
Create Qts Bank
Create Test
Student Enrollment
Issue Exam ID
Appearing Test
Display & Print Result
Appearing Demo Exam
Alloting Teacher For Specific Test Create Qts
Select Qts Form QtsBank
Pay Fees
Finish Test
Finish Test
Enrolling Student for
Test
Display Test
When Student==Viewer
Fig 7.1 Statechart Diagram For Online Examination System
RGIT, Mumbai Page 32 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
8. CLASS DIAGRAM :
The class diagram is a static diagram. It represents the static view of an application. Class diagram is
not only used for visualizing, describing and documenting different aspects of a system but also for
constructing executable code of the software application.
The class diagram describes the attributes and operations of a class and also the constraints imposed on
the system. The class diagrams are widely used in the modelling of object oriented systems because they
are the only UML diagrams which can be mapped directly with object oriented languages.
The class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. It
is also known as a structural diagram.
Purpose:
The purpose of the class diagram is to model the static view of an application. The class diagrams
are the only diagrams which can be directly mapped with object oriented languages and thus widely used
at the time of construction.
The UML diagrams like activity diagram, sequence diagram can only give the sequence flow of the
application but class diagram is a bit different. So it is the most popular UML diagram in the coder
community.
So the purpose of the class diagram can be summarized as:
Analysis and design of the static view of an application.Describe responsibilities of a system.Base for component and deployment diagrams.Forward and reverse engineering.
Notation:
RGIT, Mumbai Page 33 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Class Classes are the building blocks in object-oriented
programming. A Class is depicted using a
rectangle divided into three sections. The top
section is the name of the Class. The middle
section defines the properties of the Class. The
bottom section lists the methods of the class.
Association An Association is a generic relationship between
two classes, and is modeled by a line connecting
the two classes. This line can be qualified with the
type of relationship, and can also feature
multiplicity rules (eg. one-to-one, one-to-many,
many-to-many) for the relationship.
Composition If a class cannot exist by itself, and instead must
be a member of another class, then that class has a
Composition relationship with the containing
class. A Composition relationship is indicated by a
line with a filled diamond.
Dependency When a class uses another class, perhaps as a
member variable or a parameter, and so "depends"
on that class, a Dependency relationship is formed.
A Dependency relationship is indicated by a dotted
arrow.
Aggregation Aggregations indicate a whole-part relationship,
and are known as "has-a" relationships. An
Aggregation relationship is indicated by a line
with a hollow diamond.
Generalization A Generalization relationship is the equivalent of
an inheritance relationship in object-oriented
terms (an "is-a" relationship). A Generalization
RGIT, Mumbai Page 34 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
relationship is indicated by an arrow with a hollow
arrowhead pointing to the base, or "parent", class.
Fig 8.1 Class Diagram for Online Examination System
RGIT, Mumbai Page 35 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
9. Component Diagram :
Component diagrams are different in terms of nature and behavior. Component diagrams are used to
model physical aspects of a system.
Physical aspects are the elements like executables, libraries, files, documents etc which resides in a node.
So component diagrams are used to visualize the organization and relationships among components in a
system. These diagrams are also used to make executable systems.
Purpose:
Component diagram is a special kind of diagram in UML. The purpose is also different from all
other diagrams discussed so far. It does not describe the functionality of the system but it describes the
components used to make those functionalities.
So from that point component diagrams are used to visualize the physical components in a system. These
components are libraries, packages, files etc.
Component diagrams can also be described as a static implementation view of a system. Static
implementation represents the organization of the components at a particular moment.
A single component diagram cannot represent the entire system but a collection of diagrams are used to
represent the whole.
So the purpose of the component diagram can be summarized as:
Visualize the components of a system.Construct executables by using forward and reverse engineering.Describe the organization and relationships of the components.
Notation :
RGIT, Mumbai Page 36 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Component A component represents a software entity in a system.
Examples include source code files, programs, documents,
and resource files. A component is represented using a
rectangular box, with two rectangles protruding from the left
side, as seen in the image to the right.
Dependency A Dependency is used to model the relationship between two
components. The notation for a dependency relationship is a
dotted arrow, pointing from a component to the component it
depends on.
Component Diagram :
Java Application
<<GUI>>
Online Examination System
<<INFRASTRUCTURE>>
Oracle
Fig 9.1 Component Diagram For Online Examination System
10. Deployment Diagram :
Deployment diagrams are used to visualize the topology of the physical components of a system
where the software components are deployed.
RGIT, Mumbai Page 37 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
So deployment diagrams are used to describe the static deployment view of a system. Deployment
diagrams consist of nodes and their relationships.
Purpose:
The name Deployment itself describes the purpose of the diagram. Deployment diagrams are used
for describing the hardware components where software components are deployed. Component diagrams
and deployment diagrams are closely related.
Component diagrams are used to describe the components and deployment diagrams shows how they are
deployed in hardware.
UML is mainly designed to focus on software artifacts of a system. But these two diagrams are special
diagrams used to focus on software components and hardware components.
So most of the UML diagrams are used to handle logical components but deployment diagrams are made
to focus on hardware topology of a system. Deployment diagrams are used by the system engineers.
The purpose of deployment diagrams can be described as:
Visualize hardware topology of a system.Describe the hardware components used to deploy software components.Describe runtime processing nodes.
Notation :
Componen
t
A component represents a software entity in a system.
Examples include source code files, programs, documents,
and resource files. On a deployment diagram, components
are placed within nodes to identify their deployed location.
A component is represented using a rectangular box, with
two rectangles protruding from the left side, as seen in the
image to the right.
RGIT, Mumbai Page 38 Dept-MCA (Sem IV)
OOMD Using UML Case Study: Online Examination System
Node A node represents a piece of hardware in the system. This
entity is represented by a three-dimensional cube.
Association An association, drawn as a solid line between two Nodes,
indicates a line of communication between the hardware
elements.
Deployment Diagram:
Client Computer Teacher Server Administrator Server
Database
Printer
Java Application
Test.Sql Report.Sql
Oracle
FTP
FTPJDBC
FTP
FTP
FTP
Fig 10.1 Deployment Diagram For Online Examination System