CS8582 Object-Oriented-Analysis-and-Design-Lab-Manual PDF
CS8582 Object-Oriented-Analysis-and-Design-Lab-Manual PDF
2. Book bank
3. Exam Registration
6. E-ticketing
10.Recruitment system
OBJECTIVE:
EXNO:
DATE:
UML stands for Unified Modeling Language. This object-oriented system of notation has
evolved from the work of Grady Booch, James Rumbaugh, Ivar Jacobson, and the Rational Software
Corporation. These renowned computer scientists fused their respective technologies into a single,
standardized model. Today, UML is accepted by the Object Management Group (OMG) as the standard
for modeling object oriented programs. Each UML diagram is designed to let developers and customers
view a software system from a different perspective and in varying degrees of abstraction
UML defines nine types of diagrams: class, object, use case, sequence, collaboration, statechart,
activity.
Class Diagrams
Class diagrams are the backbone of almost every object oriented method, including UML. They describe
the static structure of a system. Shows a collection of static model elements such as classes and types,
their contents, and their relationships.
Use case diagrams model the functionality of system using actors and use cases. Shows use cases, actors,
and their interrelationships
Sequence Diagrams
Sequence diagrams describe interactions among classes in terms of an exchange of messages over time.
Models the sequential logic, in effect the time ordering of messages between classifiers.
Collaboration Diagrams
Statechart Diagrams
Statechart diagrams describe the dynamic behavior of a system in response to external stimuli. Statechart
diagrams are especially useful in modeling reactive objects whose states are triggered by specific events.
Activity Diagrams
Activity diagrams illustrate the dynamic nature of a system by modeling the flow of control from
activity to activity. An activity represents an operation on some class in the system that results in a
change in the state of the system. Typically, activity diagrams are used to model workflow or business
processes and internal operation.
Ex.No: 01
DATE:
ATM SYSTEM
MODULE 1
MODULE 2
MODULE 3
Read Card
Validate Card
Enter Pin
Validate Pin
Enter Amount
Dispense Amount
ACTIVITY DIAGRAM
User selects
withdrawal
System verifies
pin
Yes
Enter amount
Give amount
COLLABORATION DIAGRAM
2: Boot up
1: Switch On
4: Enter amount
UI ATM
Server
3: get Cash Amount
6: Open Connection
7: Checking Account
8: Validate Amount
5: Set Cash Amount
9: Give amoubnt
Cash Bank
Dispenser Network
SEQUENCE DIAGRAM
Switch On
Boot up
Enter amount
Open Connection
Checking Account
Validate Amount
Give amoubnt
COMPONENT DIAGRAM
Server
DBMS
Server
DEPLOYMENT DIAGRAM
Withdraw
Printer
UI
Print receipt
RESULT:
The above modules for the ATM System have been designed and verified.
Ex.No: 02
DATE:
MODULE 1
MODULE 2
MODULE 3
• Display the colleges, whose required cutoff is less than or equal to the student’s total cutoff
mark.
• The student must choose his preferred college.
• Display the available courses in the selected college.
• The student must now choose his preferred course.
MODULE 4
• The student must finally be informed that he has been registered successfully.
ACTIVITY DIAGRAM
Enter RegNo
No
Is the no valid?
Yes
Enter CutOff
Cut off
Compare Cut off with Cutoffs
of available colleges
Is cut off>=requirement
of college?
Yes
Add to Available
Coll List
Select Course
Register Student
Save
COLLABORATION DIAGRAM
2: Verify
1: Enter ID
4: Enter desired course
S:Student Course Maintenance
System
3: Request Selection
6:
5: addStudent()
7: Save()
C: Courses
SEQUENCE DIAGRAM
Enter ID
Verify
Request Selection
addStudent()
Save()
USE CASE DIAGRAM
Verify ID
Enter Cut-Off
StudentReg
Select Course
Register Student
CLASS DIAGRAM
College
Course
Student_Details Coll_ID
course_ID
RegNo name
Selects has name
DOB cutoff
seats_Available
getCutoff() selectCourse()
register()
addStudent()
DEPLOYMENT DIAGRAM
COMPONENT DIAGRAM
STATE CHART DIAGRAM
Get
Register no
Compare
cuttoff
Add to available
college list
Enter
course
Register
Student
RESULT:
The above modules for the Course Registration System have been designed and verified.
Ex.No: 03 EXPERT SYSTEM
DATE:
MODULE 1:
• The user logs into the system with the user login id and password.
• The connection is made with the EQ database where a random set of 10 questions along
with their choices are selected.
• The questions are selected in such a way that the same set is not repeated for the same
login id.
MODULE 2:
MODULE 3:
MODULE 4:
• The EQ value is connected to the EQ database in which the characteristic matching the
EQ value is displayed.
MODULE 5:
• Again, the EQ value is compared with the database for displaying the users’ drawbacks
and ways of improvement.
MODULE 6:
• If the user is interested then provide an interface for entering personal details with EQ for
future reference.
• The details are stored in the EQ database and can be accessed only through entering the
correct password.
CLASS DIAGRAM
EQ Marks
EQ Questions
transfers selectedchoices
selectques
choices valuatechoices()
calculates
EQ System
choicevalue
sum1()
ACTIVITY DIAGRAM
Start the
application
Verify username
and password
Enter into
system
Read the
Enter personal question
details
Select the
View past answers
records
Submit answers
Save your
current EQ
View the result
Save settings
Log out
COLLABORATION DIAGRAM
2: verify username and password
User EQ Database
Interface
EQ System
SEQUENCE DIAGRAM
pose question
select answer
calculate result
give EQ result
display EQ
STATECHART DIAGRAM
Enter login
details
Verify
details
Enter user
details
Look through
past records
Log out of
the system
USECASE DIAGRAM
Creation
Log-in
Administrator
User
Answer questions
View marks
Personal Details
Maintenance
COMPONENT DIAGRAM
Server
DBMS
Server
DEPLOYMENT DIAGRAM
Get question
Printer
UI
Print result
RESULT:
The above modules for the Expert System have been designed and verified.
Ex.No: 4 LIBRARY MANAGEMENGT SYSTEM
DATE:
MODULE 1
• Provide a user interface for getting the user’s login details.
MODULE 2
• Provide a search mechanism to search for a particular book.
MODULE 3
• Get the book details from the database.
MODULE 4
• Allow the user to select the book for checking out.
Student library
Librarian Administrator
Verify Authentication
Verify Authentication
Grant Permission/Deny
Display results
CLASS DIAGRAM
Software Entry
Issue() DOI.
Return()
Return ()
Renewal()
Issue()
COLLABORATION DIAGRAM
Librarian
Student
2: Verify Authentication
5: Verify Authentication
8: Search the book Administrator
System
Student Librarian
ACTIVITY DIAGRAM
Enter login
name
Verify
Grant
permission
Enter book
name
STATECHART DIAGRAM
Enter login Verify Grant
name permission
Enter the
book name
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
Client Web Server
Processor
RESULT:
The above modules for the Library Management System have been designed and verified.
Ex.No: 5 ONLINE TICKET RESERVATION SYSTEM
DATE:
MODULE 1
MODULE 2
MODULE 3
MODULE 4
Display
payment details
Get user's
payment details
No
If complete
Print ticket
CLASS DIAGRAM
USECASE DIAGRAM
Check availability
Booking Server
Enter details
Customer
Request booking
Make payment
Bank System
Confirm booking
SEQUENCE DIAGRAM
Check availability
Yes
If no, reschedule
Enter information
Reconfirm booking
Payment
Confirm payment
Get ticket
COLLABORATION DIAGRAM
2: Yes
1: Check availability
4: Enter information
Customer Server
3: If no, reschedule
5: Reconfirm booking
8: Get ticket
7: Confirm payment
6: Payment
Bank
Check availability
Displaying
payment details
User's payment
details
Print Ticket
COMPONENT DIAGRAM
Bank
Online
Booking Server
Customer
DEPLOYMENT DIAGRAM
Server Update
Railway
Database
User PC
RESULT:
The above modules for the Online Ticket Reservation System have been designed and verified.
DATE:
MODULE 1:
• Obtain HRA,DA,PF.
MODULE 2:
MODULE 3:
• Calculate the number of days taken leave.
net salary
SEQUENCE DIAGRAM
employer database salary employee
calculation
Enter employee details
obtain hra,da,ta
calculate salary
store
COLLABORATION DIAGRAM
1: Enter employee details
database
employer
5: calculate salary
6: store
salary
calculation
employee
CLASS DIAGRAM
Employee Designation
emp_ID type
emp_name basicpay
date_of_join 1 1..* netdeductions
salary hra
dept pf
designation da
getDetails() calculateSalary()
Leave
casualLeave
earnLeave
no_of_years_worked
medicalLeave
calculateLeave()
ACTIVITY DIAGRAM
provide employee
details
netpay=basic netpay=basic
pay-deductions pay+ (hra,da,pf)
provide salary
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
Node 1:Registrar
Update
Node 2:PC
Get employee
details
Get basic
pay
Basic Salary
pay-deductions
RESULT:
The above modules for the Payroll System have been designed and verified.
Ex.No:7 QUIZ SYSTEM
DATE:
MODULE 1
MODULE 2
MODULE 3
MODULE 4
Reg For
NAME
Ask Question
No Answer
Calculate The
Participant Score
Is It High
Score
Won The Game
Admin
ID
Password
registration()
calculation()
CentralSystemManagement()
user compiler
user name namelist
ID question
Password answer
plays() askquestion()
sign up() keepsmark()
compilers()
COLLABORATION DIAGRAM
1:Register
6:No Answer
Switch Over
Participant The Question
2:Ask Question
7:Switch To Next Question
10:Won The Game
11:Lose The Game
player name
player id
player password
sign up
administrator
generates question
selecting options
timings
player
system
switch over sections
login
YES
Selecting
Option
NO Switch To Next
If Answered
Question
YES
Marks Added
YES
Won The
Game
STATE CHART DIAGRAM
Log in
Enter the
system
Select
option
Next
question
Add marks
End game
COMPONENT DIAGRAM
Server
DBMS
Server
DEPLOYMENT DIAGRAM
Get question
Printer
UI
Print result
RESULT:
The above modules for the Quiz System have been designed and verified.
Ex.No:8 REAL TIME SCHEDULER
DATE:
• To add a schedule, the user must enter the name, time and location of the appointment.
• The user should be alerted if the schedule is made after 5 PM.
• If the user is busy at the selected time, he can reschedule.
• The user can also delete an appointment using the delete option.
MODULE 4-RESCHEDULE
• To reschedule, the user must first check whether he is free at the specified time or not.
• If yes, he can proceed with the rescheduling process.
• Otherwise, he must again check for an alternate time.
MODULE 5
• The user must finally be informed that his schedule has been successfully created.
USE CASE DIAGRAM
View Schedule
Add Schedule
Delete Schedule
Person_Details System
Reschedule
Check Availability
SEQUENCE DIAGRAM
View schedule
Add appointment
Check availability
If yes, create appointment
No
Reschedule
Confirm appointment
CLASS DIAGRAM
Person
Schedule
Person_Name Availability
Activity
Person_ID
makes Time needs New_time
Phone_No
Location New_location
Password
DeleteSchedule() CheckAvailability()
ViewSchedule()
Reschedule()
EditSchedule()
ACTIVITY DIAGRAM
Enter details
Available?
Yes
no
Reschedule
appointment
Confirm
schedule
COLLABORATION DIAGRAM
1: View schedule
2: Add appointment
Person Appointment Control
5: No
Appointment
STATECHART DIAGRAM
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
RESULT:
The above modules for the Real Time Scheduler System have been designed and
verified.
MODULE 1
MODULE 2
MODULE 3
• Provide order form and let the customer to fill out payment and shipping details.
• Store the order in database.
• Review the order and check whether the items are available.
• Email the order details to the customers email id.
MODULE 4
5: Submit order
1: Open new
2: Accept config 8: Link payment
7: Link customer
Customer Payment
CLASS DIAGRAM
Customer
name Configuration
address
item type
ph no
item descp
email
Order
od num Payment
date
payment method
address
date received
total
amt received
status
sales pname
USE CASE DIAGRAM
customer
warehouse
Update order status
Salesperson
Print invoice
Open new
Submit order
Store order
Link customer
Link payment
ACTIVITYDIAGRAM
Dispaly
purchase form
[time out]
[incomplete]
Get purchase
details Store order
[OK]
Email order
details
STATE CHART DIAGRAM
Pending
New order Stock not Back order Ready to
ship
Available
COMPONENT DIAGRAM
Customer
Online
shopping
Order
DEPLOYMENT DIAGRAM
RESULT:
The above modules for the Remote Procedure Call System have been designed and verified.
Ex.No:10
STOCK MAINTANENCE SYSTEM
DATE:
MODULE 2: (selection)
After signing in the customer can select particular product and a detailed description of it is
displayed.
The customer can also select the option compare to see the features of different available
products.
After analyzing the various features ,the best of all the products is chosen.
MODULE 3: (transaction)
The customer in order to buy the product uses his credit card by entering the necessary details.
MODULE 4: (delivery)
Once the customer enters the necessary details and when the SUBMIT button is clicked, the
acknowledgement is sent and the selected product is delivered.
CLASS DIAGRAM
USE CASE DIAGRAM
SEQUENCE DIAGRAM
login
selecting product
login
entering login
details
log in
selection of
the product
payment through
credit card
COMPONENT DIAGRAM
DEPLOYMENT DIAGRAM
RESULT:
The above modules for the Stock Maintenance System have been designed and
verified.
Content Beyond Syllabus
Browse Catlog
Select Item
Software
Issue Details
Issue
Authorization
Banking
Check for
validity
Deliever Goods
Dealer
ONLINE PURCHASE CLASS DIAGRAM
Customer
ShoppingCard
Attributes
Attributes
private string addrtoship
public float subtotal private string name
public float salesmoney private string addrtobill
public float totalmoney private string emailadd
Operations private int creditrating
public ShoppingCard() Operations
public float getSubtotal() public Customer()
public void setSubtotal(float val ) public string getAddrtoship()
public float getSalesmoney() public void setAddrtoship(string val )
mCustomer
public void setSalesmoney(float val ) public string getName()
public float getTotalmoney() * 1
public void setName(string val )
public void setTotalmoney(float val ) public string getAddrtobill()
public void placeOrder() public void setAddrtobill(string val )
public void removeOrder() public string getEmailadd()
public Customervoid[0..*] getCustomer() public void setEmailadd(string val )
public void setCustomer(Customer val[0..*] ) public int getCreditrating()
public CreditCardvoid[0..*] getCreditCard() public void setCreditrating(int val )
public void setCreditCard(CrdeitCard val[0..*] ) public void displayCategory()
mCustomer
public Customer[0..*] getCustomer() public void selectItem()
public void setCustomer(Customer val[0..*] ) public void delieverItem()
public CreditCard[0..*] getCreditCard() 1 public void removeOrder()
public void setCreditCard(CreditCard val[0..*] )
1
mCreditCard 1
*
CreditCard
Operations PrefferedCustomer
ItemOfPurchase public CreditCard() Attributes
Attributes public int getNumber() private int discountrate
private int quantity public void setNumber(int val ) Operations
private float priceperitem public date getExpirydate()
mPrefferedCustomer public PrefferedCustomer()
Operations public void setExpirydate(date val ) public int getDiscountrate()
public ItemOfPurchase() public boolean getIssue() public void setDiscountrate(int val )
public int getQuantity() public void setIssue(boolean val ) * 1
public Customer getCustomer()
public void setQuantity(int val ) public void authorizeCharge() public void setCustomer(Customer val )
public float getPriceperitem() public Preffered() public Customer getCustomer1()
public void setPriceperitem(float val ) public ItemOfPurchase getItemOfPurchase() public void setCusotmer1(Customer val )
public Customer fetCustomer() public void setItemOfPurchase(ItemOfPurchase val ) public Customer getCustomer()
public void setCustomer(Customer val ) public PrefferedCustomer[0..*] getPrefferredCustomer() public void setCustomer(Customer val )
public Product[0..*] getProduct() public void setPrefferredCustomer(PrefferedCustomer val[0..*] )
public void setProduct(Product val[0..*] ) public PrefferedCustomer[0..*] getPrefferedCustomer()
public Product[0..*] getProduct() public void setPrefferedCustomer(PrefferedCustomer val[0..*] )
public void setProduct(Product val[0..*] )
mProduct
Product
Attributes
Operations
public Product()
ONLINE PURCHASE SEQUENCE DIAGRAM
: Shoppingcart : creditcard
: Customer
public void brow secatalog()
validation
: Customer
: Shoppingcart
: creditcard
OnlinePurchase
Customer Shoppingcart Creditcard
Unnamed
Browse Displaying
Catlog Catlog
{ From OP_Activity } { From OP_Activity }
Validating
Selecting & Requesting
credit
{ From OP_Activit... { From OP_Activity } { From OP_Activity }
Issuing Accepting
payment delivery
{ From OP_Activity } { From OP_Activity }
Unnamed
Delievering Authorized
Item
{ From OP_Activity } { From OP_Activity }
Rejected
{ From OP_Activity }
Unnamed
ONLINE PURCHASE STATECHART DIAGRAM
CHECKING
PROCESS
WAITING DELIVERY
CANCELLING DISPATCH
EXIT
CLASS CODE
public class Customer()
{
private string name
private string addtoshop
private int creditrating
public Customer()
{
}
public void delieverItem()
{
}
public void selectItem()
{
}
public void removeItem()
{
}
}
public class ItemOfPurchase()
{
private int quantity
private flaot priceperitem
public ItemOfPurchase()
{
}
public float getPriceperItem()
{
}
public void setPriceperItem(float val)
{
Item = val
}
}public class Product()
{
public Product()
{
}
}
RESULT:-
Thus the UML models for the Online Purchase System have been developed and verified.
STUDENT MARKS ANALYSIS SYSTEM
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
USE CASE DIAGRAM
CLASS DIAGRAM
SEQUENCE DIAGRAM
COLLABORATION DIAGRAM
ACTIVITY DIAGRAM
STATECHART DIAGRAM
CLASS CODE
/**
@roseuid 46D9020F0017
*/
public MarksRegister()
{
/**
@roseuid 46D901BF027C
*/
public void checkRegno()
{
/**
@roseuid 46D901C501FF
*/
public void checkSubjectCode()
{
/**
@roseuid 46D901CC0395
*/
public void setResults()
{
}
}
RESULT:-
Thus the UML models for the Student Marks Analysis System have been developed and verified.