Professional Documents
Culture Documents
Class
Goals of UML:
The primary goals in the design of the UML were: 1. Provide users with a ready-to-use, expressive visual modeling language so they can develop and exchange meaningful models. 2. Provide extensibility and specialization mechanisms to extend the core concepts. 3. Be independent of particular programming languages and development processes. 4. Provide a formal basis for understanding the modeling language. 5. Encourage the growth of the OO tools market. 6. Support higher-level development concepts such as collaborations, frameworks, patterns and components. 7. Integrate best practices.
things simpler, has exacerbated these architectural problems. The Unified Modeling Language (UML) was designed to respond to these needs.
Use Case Diagram displays the relationship among actors and use cases. Class Diagram models class structure and contents using design elements such as classes, packages and objects. It also displays relationships such as containment, inheritance, associations and others. Interaction Diagrams
y
Sequence Diagram displays the time sequence of the objects participating in the interaction. This consists of the vertical dimension (time) and horizontal dimension (different objects). Collaboration Diagram displays an interaction organized around the objects and their links to one another. Numbers are used to show the sequence of messages.
State Diagram displays the sequences of states that an object of an interaction goes through during its life in response to received stimuli, together with its responses and actions. Activity Diagram displays a special state diagram where most of the states are action states and most of the transitions are triggered by completion of the actions in the source states. This diagram focuses on flows driven by internal processing. Physical Diagrams
y
Component Diagram displays the high level packaged structure of the code itself. Dependencies among components are shown, including source code components, binary code components, and executable components. Some components exist at compile time, at link time, at run times well as at more than one time. Deployment Diagram displays the configuration of run-time processing elements and the software components, processes, and objects that live on them. Software component instances represent run-time manifestations of code units.
y y
CUSTOMER
AMOUNT TO BE WITHDRAWN
IN NUMBER ACCESS
ATM MACHINE
The class diagram of ATM utilizes mainly 4 classes, 7 variables and 11 methods. Classes: A. Card Reader: This class is used to read the details of the ATM card and to check whether the ATM card is valid or not. It uses one attribute and three methods. Attributes 1. Card number: this is an attribute used by the class card reader to check whether the card is valid or not. Methods 1. read card: this method reads the attribute card number and matches it with the database in the system. 2. Accept card: this method accepts the card if the card is valid and the user can carry on further transactions. 3. Reject card: this method rejects the card if the card is not valid and the user is prompted accordingly. B. Account: This class represents the account of the user in the bank. This class uses three attributes and four methods. Attributes 1. account number: this attribute is the account number that is provided to the user by the bank and is used in all the transactions with the bank. 2. Pin: this is a unique code provided to the user by the bank it is used in all the ATM transactions hat the user performs. 3. Balance: this is used to represent the balance of money left in the users account in the bank account that he has. Methods 1. open: this methods checks the pin number provided by the user and the allows him to log into his account. 2. Withdraw funds: this method help the user to withdraw amount from the account it calls the method verify fund so as to verify is the user has the required minimum balance before withdrawing. It also calls method deduct funds to deduct the withdrawn amount from the users account. 3. Deduct fund: this method is used to deduct the amount withdrawn from the users from his account. It is invoked by withdraw funds. 4. erify funds: this method is used to check whether the user posses the minimum amount of money in his account before he can withdraw money from his account. C. ATM screen: this class is the user interface. It uses no attributes and two methods to interact with user. Methods 1. prompt: this method prompts the user to insert his card and various other details into the machine. 2. Accept input: this methods acquires whatever input is provided by the user and forwards to other classes. D. Cash Dispenser: this class utilizes one attribute and two methods. Attributes 1. cash balance: this attributes represents the cash to be paid to the user.
Methods 1. provide cash: this method is used to provide the desired amount to the user. Provide receipt: this methods prints a receipt of the transaction and provides to the user.
CLASS DIAGRAM:
c a rd re a d e r c a r d n u m b er
a t m s c re e n
p ro m p t () a c c e p t c a rd () e je c t c a rd () re a d c a rd () a c c e p t in p u t ()
STATECHART DIAGRAM:
SEQUENCE DIAGRAM:
neha : Us er
3: initializ e sc reen
COLLABORATION DIAGRAM:
11: enter amount 9: select transaction 5: enter pin Customer 4: prompt for pin 8: promt for transaction 10: prompt for amount 6: open account ATM SCREEN
3: INITIALISE SCREEN 12: withdraw funds 16: verify funds 17: deduct funds 2: READ CARD
USER ACCOUNT 13: provide cash 14: provide receipt CASH DISPENSER
EXPERIMENT NO. 2
The Class Diagram of ATM comprises of 5 classes, 20 attributes and 15 methods. Classes: 1. Book Details: This class processes the book either to be returned or to be issued. arious attributes which deal directly with the book such as book id, name etc are the attributes of this class. Attributes y Book ID: This attribute holds the value of book id of the current book accessed. y Book Name: This attribute holds the name of the current book accessed. y Publisher: This attribute holds the name of the publisher of the current book accessed. 2. Student details: This Class directly holds the student information. This class also performs the check if the user is authentic or not and performs appropriate actions accordingly. It also updates the information in the student database accordingly with the action student perform regarding the return of the book or issue of the same. Attributes y Name: This attribute holds the name of the student who is accessing the library service. y Roll no: This attribute holds the roll no of the student who is accessing the library service. y Course: This attribute holds the course undertaken by the student who is accessing the library service. 3. Student issue Details: This class comes into action when student information regarding the issued book is needed to be accessed from the database. It uses 2 attributes named Bar code details and book id. Attributes y Student Barcode ID: This attribute holds the barcode d of the student which is unique for every student and which acts as primary key to access the issued book database. 4. Issued book details: This Class holds the appropriate methods and attributes, which controls the issued book analysis regarding the fine etc. Also the further action is also decided by this class whether to return the book or reissue it. Attributes y Book ID: This attribute holds the book id of the currently accessed issued book. y Student ID: This attribute holds the student id who has issued the book designated by book id. 5. Login Details : This class secures the library by eliminating trespassing in the library by use of login id and password.
CLASS DIAGRAM:
STATECHART DIAGRAM:
request for book issue check validity student is valid Available
request denied
Issued
SEQUENCE DIAGRAM:
Operator
Bar code student info reader controller read barcode submit barcode
Message box
student details
return book
Book details
get details submit validate if fine update update book return successful
submit book code check availibility not available add record add record issue success
COLLABORATION DIAGRAM:
Operator
9: validate details
1: read barcode
2: submit barcode
Bar code reader 4: submit student details 6: update return book 10: invalid student 3: get details 5: validate if fine
15: add record 13: not available 12: check availibility 16: issue success
CLASS DIAGRAM:
SEQUENCE DIAGRAM:
student
registrar
account manager
scrutiny officer
confirm fee submition grant admission letter request for cancellation verification of details
COLLABORATION DIAGRAM:
1: request for the course 3: submit form details 11: request for cancellation student 2: prompt for form submission 7: prompt for fee submission 10: grant admission letter registrar
9: confirm fee submition 6: return details to registrar 13: confirm details 4: form verification 12: verification of details
8: submit fees
account manager
scrutiny officer
Use cases: 1. Verify: It is used for authenticating the details of the user accessing the system. 2. Check Availability: It allows a traveler to check the availability of the required tickets. 3. Update customer Database: This updates the information about the customer or the traveler in the database maintained in the system. 4. Update Main Database: This is used by the administrator to update the data regarding the travel plans, availability of tickets and pending payments. 5. Book Ticket: It describes the operations required by the user/ traveler to book tickets. 6. Generate Bill: After a request for tickets is made by the traveler, administrator uses this to generate the bill. 7. Print Bill: This allows a traveler to generate a hard copy of the bill.
Use Cases: 1. EMI: This use case allows the customer to select the way he wants to pay his emi. It extends use cases quarterly, monthly and yearly. 2. Type of insurance: Used by the customer and agent to select the appropriate type of insurance. It extends use cases life insurance, health insurance and vehicle insurance. 3. Mode of Payment: It allows a customer to select the mode of payment. It extends cheque and cash use cases. 4. Policy: Used by customer to select appropriate policy plan 5. Maturity: It handles all operations concerning maturity of insurance policies.
agent
EMI <<extends>> <<extends>> <<extends>> quarter y year y month y mode of payement <<extends>>
po cy
nterest rate
<<extends>>
f na amount
by cash
cheque
veh c a nsurance
<<extends>>
matur ty
$ #
! "
%
%
$
COLLABORATION DIAGRAM:
9:
1:
l f ri
r i tr ti
5: ll t
li
7:
li
4:
l t t
li
t 8:
%
tt
6:
tt
t 3: ll t t t rit l r i 2: fi t r t fi r i t r f
SEQUENCE DIAGRAM:
: customer
registration
type of insurance
policy
EMI
amount to be paid
: agent
2: choose the type of insurance 3: allot the type of insurance 4: choose policy 5: allot policy 6: select the paritcular emi 7: calculate the amont
9: amount paid
CLASS DIAGRAM:
SEQUENCE DIAGRAM:
COLLABORATION DIAGRAM:
7. Salary:- This function calculate the monthly salary given to the employee , the calculation are made on the basis of the overtime and leaves taken by the employee and also on his/her position within the company. 8. Perks:-This use case keep track of the information regarding the other remunerations available to the employee such as notebook, vehicle, housing facilities etc.
CLASS DIAGRAM:
SEQUENCE DIAGRAM:
COLLABORATION DIAGRAM:
Login Admit Patient Maintain nurse and doctor information Gets admitted Examine patient Discharge Patient Generate Report and pay bill Take report and pay bill Maintain patient status information
USE-CASE DIAGRAM:
login a d m i n i stra to r
d o cto r
a d m i t p a ti e n t
m a i n ta i n n u rse a n d d o cto r i n fo rm a ti o n
g e n e ra te re p o rt a n d b i l l
p a ti e n t g e ts a d m i tte d n u rse
e xa m i n e p a ti e n t
m a i n ta i n p a ti e n t sta tu s i n fo rm a ti o n
d i sch a rg e p a ti e n t
ta ke re p o rt a n d p a y b i l l
CLASS DIAGRAM:
re ce p ti o n p a ti e n t _ n o . d e p a rtm e n t_ n o . p re p a re _ re p o rt( ) p re p a re _ b i l l ( ) p a ti e n t_ d e ta i l s( ) p ro vi d e _ re p o rt( ) p ro vi d e _ b i l l ( ) d e p a rtm e n t p a ti e n t _ sta tu s_ i n fo ( )
a cco u n ts d e p a rtm e n t p ro vi d e _ re ce i p t( )
SEQUENCE DIAGRAM:
: p a ti e n t
re c e p ti o n
d e p a rtm e n t
a c co u n ts d e p a rtm e n t
1 . se n d s p a ti e n t's sta tu s re p o rt
2 . p re p a re s fi n a l re p o rt a n d b i l l
3 . se n d s th e b i l l
4 . p a ys th e b i l l 5 . g i v e s th e re c e i p t
6 . g i v e s th e re p o rt a n d re ce i p t
COLLABORATION DIAGRAM:
d e p a rtm e n t
: p a ti e n t 1 : 1 . se n d s p a ti e n t's sta tu s re p o rt
2 : 2 . p re p a re s fi n a l re p o rt a n d b il l
EXPERIMENT NO. 9
&
'
: 6 . g i v e s th e re p o rt a n d re ce i p t : 3 . se n d s th e b il l
4 : 4 . p a ys th e b il l
re c e p ti o n
: 5 . g i v e s th e re ce i p t
a c co u n ts d e p a rtm e n t
Use cases 1. Application for CET- The module allows student to apply for the exam. 2. Roll No. Generator- This module generates a unique roll no. for all those students who have applied for the exam. 3. Examination Database- This module keeps track of details related to the examination. 4. Question Database- Consists of the questions designed for the examination. 5. Result Database- Keeps a track of the results. 6. Counseling- After the results counseling for the seats is done. 7. College- College is allotted after the counseling.
SEQUENCE DIAGRAM:
4 22
P oe
Co ege
13 2
Coun e ng
Re u Da aba e
01 2
66 2 2 55
u e
Que
01
0)
33
S uden
Exa
na on Da aba e
6 6 2 2 55
u e
on Da aba e
4 1 4
33
App a on o CET
Ro No. Gene a o
0 1 703
033 2
College Registration
4.Allotment process begins after verification 5.Registration is done in the respected college
COLLABORATION DIAGRAM:
:S Database
:S
5: 5.Registration is done in the respected college Seat Allotment : Interface College Registration
Q C IE HGE ED B 9 F P C @ 9 BA 9