OBJECT ORIENTED ANALYSIS AND DESIGN
RECOD NOTE BOOK ANNA UNIVERSITY
DEPARTMENT OF INFORMATION TECHNOLOGY INDIRA INSTITUTE OF ENGINEERING TECHNOLOGY PANDUR, THIRUVALLUR DIST – 631 203
PRACTICAL RECORD NAME:………………………………
REGISTER No:……………………..
YEAR:…………… SEM:……………..
SUBJECT :………………………….
1
OBJECT ORIENTED ANALYSIS AND DESIGN
RECOD NOTE BOOK ANNA UNIVERSITY
BONAFIDE CERTIFICATE NAME : ………………………….
REGISTER NO ……………..
BRANCH : …………………………….
CLASS ……….………..
This is certified to be the bonafide record of work done by the student in the OBJECT ORIENTED ANALYSIS AND DESIGN Laboratory of Indira Institute of Engineering and Technology
Head of the Department
Staff-In-Charge
SUBMITTED FOR PRACTICAL EXAMINATION HELD ON ….…………
Internal Examiner
External Examiner
2
INDEX
S.NO
DATE
TOPIC
1.
Study of UML
2.
ATM System
3.
Online Purchase System
4.
Library Management System
5.
E – Ticketing
6.
Course Registration System
7.
Quiz System
8.
Student Marks Analyzing System
9.
Email Client System
3
P.NO
SIGN
Ex. No 1
STUDY OF UML
AIM:To study the basic concepts of Unified Modeling Language.
UML NOTATION •
Unified Modeling Language.
•
Set of notations and conventions used to describe and model an application.
•
Universal language for modeling systems.
•
Standard notation for OO modeling systems.
•
Does not specify methodology to develop an application.
UML DIAGRAMS •
Class Diagram
•
Use Case Diagram
•
Behavioral Diagram
Interaction Diagram Sequence Diagram Collaboration Diagram State Chart Diagram Activity Diagram •
Implementation Diagram
Component Diagram Deployment Diagram
CLASS DIAGRAM •
Shows the static structure of the model.
•
Collection of static modeling elements such as classes and their relationships connected as a graph.
•
Provides visual representation of objects, relationships and their structures. 4
Class:•
A class is a set of objects that share a common structure and common behavior.
•
It is represented as:
Interface:•
Specifies the externally-visible operations of a class and/or component.
Association:•
Model properties of associations.
•
The properties are stored in a class and linked to the association relationship.
•
Example, Bank Account
Person
Generalization:•
A generalize relationship is a relationship between a more general class or use case and a more specific class or use case.
•
Example,
Vehicle
Bus
Truck
5
Car
USE CASE DIAGRAM •
Set of use cases enclosed by system boundary, communication association between actors and use cases, and generalization among use cases.
Actors:•
External factors that interacts with the system from the user's perspective.
Use Cases:•
Set of scenarios that describe how actor uses the system.
•
Represented as,
Relationship:•
Communication – communications with the use case normally.
•
Uses – Shown by generalization arrow from the use cases.
•
Extends – Used when one case does more than another that is similar to it.
BEHAVIOR DIAGRAM INTERACTION DIAGRAM •
Diagrams that describes how group of objects are collaborated.
SEQUENCE DIAGRAM: •
Describes the behavior of the system through interaction between the system and the environment in time sequence.
•
•
Two dimensions:
Vertical dimension – represents time.
Horizontal dimension – represents objects.
Life line – Object's existence during the interaction.
6
Object 1
Object 2
COLLABORATION DIAGRAM: •
An interaction diagram that shows the order of messages that implement an operation or a transaction.
•
Collaboration diagrams show objects, their links, and their messages. Object 1
1.
Object 2
Object:•
An object has state, behavior, and identity.
•
Objects interact through their links to other objects.
Link:•
A link is an instance of an association, analogous to an object.
Message:•
A message is the communication carried between two objects that trigger an event.
STATECHART DIAGRAM •
Models the dynamic behavior of individual classes or any other kind of object.
•
Shows the sequences of states, events, and actions.
State:•
Represents a condition or situation during the life of an object during which it satisfies some condition or waits for some event.
7
Start State:•
Shows the beginning of workflow.
End state::•
Represents the final or terminal state.
ACTIVITY DIAGRAM •
Used for modeling the sequence of activities in a process
•
Special case of a state machine in which most of the states are activities and most of the transitions are implicitly triggered by completion of the actions in the source activities.
Activity:•
Represents the performance of task or duty in a workflow.
Swim lanes:•
Represents organizational units or roles within a business model.
IMPLEMENTATION DIAGRAM •
Shows the implementation phase of system development.
•
Two types of implementation diagrams: Component diagram Deployment diagram
COMPONENT DIAGRAM Models the physical components in the design. A graph of the design’s components connected by dependency relationships. Includes concept of packages. Package is used to show how classes are grouped together.
8
DEPLOYMENT DIAGRAM •
Shows the configuration of runtime processing elements and software components.
•
It is a graph of nodes connected by communication association.
•
Nodes are the components that are connected to other components through dependencies.
•
Used in conjunction with component diagrams to show the distribution of physical modules.
RESULT:Thus the different conceptual models under UML have been studied.
9
Ex. No 2
ATM SYSTEMS CONTENTS 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 State Chart Diagram 3.6 Component Diagram
10
ANALYSIS Identifying the Actors •
Customer
•
Bank Clerk
Identifying the Use Cases •
Insert Card
•
Enter Account No & Pin
•
Validate Account No & Pin
•
Request for Cash
•
Withdraw Money
•
Request Balance
•
Get Status REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
11
ATM USE CASE DIAGRAM
InsertCard
EnterAccno&Pin
ValidateAccno&Pin
Customer
RequestforCash
BankClerk
CheckforBalance
Withdraw Money
CheckBalance <>
GetStatus
12
ATM CLASS DIAGRAM
ATM Attrib utes Operations
public ATM()
Operations
public public public public public public
CardReader() int getCardno() void setCardno(int val ) void acceptCard() void readCard() void ejectCard() 1..*
Customer
Attrib utes
Attrib utes
Attrib utes
private int Cardno
CashDispenser
ATMScreen
CardReader
private int cashbal
Operations
public public public public public public public public public public public public public
Operations
ATMScreen() void deductAmt() void promptforPIN() void enterAmt() boolean authorizePin() void verifyAmt() void enterPin() void initializeScreen() void selectTransaction() void promtforTransaction() void promtforAmount() CardReader getCardReader() void setCardReader(CardReader val )
public public public public public
Attrib utes
private private private private private private
Account
int accno int Cardno string name string address longint phone float balance
Attrib utes
private int accno private int PIN private int Cashbal Operations
Operations
public public public public public public public public public public public public public
CashDispenser() int getCashbal() void setCashbal(int val ) void provideRept() void provideCash()
Customer() int getAccno() 1 void setAccno(int val ) int getCardno() void setCardno(int val ) string getName() void setName(string val ) string getAddress() void setAddress(string val ) longint getPhone() void setPhone(longint val ) float getBalance() void setBalance(float val )
1
13
public public public public public public public public public public public public
Account() void setAccno(int val ) int getAccno() int getPIN() void verifyPIN(int val ) int getCashbal() void setCashbal(int val ) void openAccount() void withdraw() void deductAmt() void checkBalacne() void verifyAmt()
ATM SEQUENCE DIAGRAM
: CardReader
: ATMScreen
: Account
: CashDispenser
: Customer public void acceptCard()
public void readCard()
public void openAccount() public void promptforPIN()
public void verifyPIN(int val ) public void promtforTransaction()
public void promtforAmount()
public void w ithdraw ()
public void verifyAmt()
public void deductAmt()
public void provideCash()
public void ejectCard()
14
public void provideRept()
ATM COLLABORATION DIAGRAM
public v oid enterPin()
public v oid enterA mt()
public v oid s elec tTrans ac tion()
: AT MS creen public v oid v erif y PIN(int v al )
: C usto m er public v oid ac c eptCard()
public v oid w ithdraw ()
public v oid c hec kBalac ne()
public v oid readCard() public v oid deduc tA mt() public v oid ejec tCard() public boolean authoriz ePin()
: C ard R ead er
: Acco u n t
15
ATM STATE CHART DIAGRAM
REQUEST PIN
PIN NUMBER
Wrong Pin re-request Pin
Accept Pin
Login Complete
16
CLASS CODE public class CardReader() { private int Cardno public CardReader() { } public void acceptCard() { } public readCard() { } } public class ATMScreen() { public ATMScreen() { } public void enterPin() { } public void selectTransaction() { } public void verifyAmt() { } }
17
public class Customer() { private int accno private int Cardno private String name public Customer() { } public int getAccno() { } public int getCardno() { } public void setName(String val) { name=val } }
RESULT:Thus the UML models for the ATM System have been developed and verified.
18
Ex. No 3
ONLINE PURCHASE SYSTEM
CONTENTS 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
19
ANALYSIS Identifying the Actors •
Customer
•
Software
•
Banking
•
Dealer
Identifying the Use Cases •
Browse Catalog
•
Select Item
•
Request Item
•
Payment Details
•
Issue Details
•
Authentication
•
Check for validity
•
Issue Goods REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
20
ONLINE PURCHASE USE CASE DIAGRAM
Onlin eP urchase
Brow se Ca tlog
S e le ct Ite m
S oftw are C ustomer
Re que st Ite m
Ask for P a ym e nt & S hipping de ta ils
Issue De ta ils
Issue Authoriz a tion
B anking Che ck for va lidity
De lie ve r Goods
D ealer
21
ONLINE PURCHASE CLASS DIAGRAM
C u s to m e r
S h o p p in g C a rd
A ttr ib u tes
A ttr ib u te s
private private private private private
public float s ubtot al public float s ales m oney public float totalm oney O p er a tio ns
public public public public public public public public public public public public public public public public public
S hoppingC ard() float getS ubtotal() void s etS ubtotal(float val ) float getS ales m oney () mCu s to me r void s etS ales m oney (float val ) float getTot alm oney () * void s etTotalm oney (float val ) void plac eO rder() void rem oveO rder() C us tom ervoid[0..*] getC us tom er() void s etC us tom er(C us tom er val[0. .*] ) C reditC ardvoid[0..*] getC reditC ard() void s etC reditC ard(C rdeitC ard val[0..*] ) C us tom er[0..*] getC us tom er() void s etC us tom er(C us tom er val[0. .*] ) C reditC ard[0..*] getC reditC ard() 1 void s etC reditC ard(C reditC ard val[0..*] )
s tring addrtos hip s tring nam e s tring addrtobill s tring em ailadd int c reditrating O pe ra tion s
public public public public 1 public public public public public public public public public public public
C us tom er() s t ring getA ddrtos hip() void s etA ddrtos hip(s tring val ) s t ring getN am e() void s etN am e(s tring val ) s t ring getA ddrtobill() void s etA ddrtobill(s tring val ) s t ring getE m ailadd() void s etE m ailadd(s tring val ) int getC reditrating() void s etC reditrating(int val ) mCu s to me r void dis play C ategory () void s elec tItem () void delieverItem () void rem oveO rder()
1 mCre d itCa r d
1
C re d itC a rd
*
O pe ra tio ns
Ite m O fP u rc h a s e
public A ttr ib ute s public private int quant ity public private float pric eperitem public O p e r a tio n s public public Item O fP urc has e() public public int getQ uantity () public public void s etQ uantity (int val ) public public float getP ric eperitem () public public void s etP ric eperitem (float val ) public public C us tom er fetC us tom er() public public void s etC us tom er(C us tom er val ) public public P roduc t[0..*] getP roduc t() public public void s etP roduc t(P roduc t val[0..*] public ) public P roduc t[0..*] getP roduc t() public public void s etP roduc t(P roduc t val[0..*] )
P re ffe re d C u s to m e r
C reditC ard() A ttr ib u tes int getN um ber() private int dis c ountrate void s etN um ber(int val ) O p e r a tio n s date getE x piry date() P refferedC us tom er() mPr e f f e r e dCu s to mepublic r void s etE x piry date(date val ) public int getD is c ountrate() boolean getIs s ue() public void s etD is c ountrate(int val ) 1 void s etIs s ue(boolean val ) * public C us tom er getC us tom er() void authoriz eC harge() public void s etC us tom er(C us tom er val ) P reffered() public C us tom er getC us tom er1() Item O fP urc has e getItem O fP urc has e() public void s etC us otm er1(C us tom er val ) void s etItem O fP urc has e(Item O fP urc has e val ) public C us tom er getC us tom er() P refferedC us tom er[0..*] getP refferredC us tom er() public void s etC us tom er(C us tom er val ) void s etP refferredC us tom er(P refferedC us tom er val[0..*] ) P refferedC us tom er[0..*] getP refferedC us tom er() void s etP refferedC us tom er(P refferedC us tom er val[0..*] )
mPr od u c t 1
P ro d u c t A ttr ib u tes O pe r a tion s
public P roduc t()
22
ONLINE PURCHASE SEQUENCE DIAGRAM
: Shoppingcart
: creditcard
: Customer public void browsecatalog()
public void displaycatalog() public void selectItem()
public void getCreditRating() public void getAddrToShop()
public void setCreditCard()
public void shipmentDetails()
public void authorizedCharge()
public void getExpiryDate()
validation
public void authorize()
public void setCrediting(int val )
public void setAddrToShip()
public void deleverItem() public void rejected() public void removeOrder()
23
ONLINE PURCHASE COLLABORATION DIAGRAM
: Customer public void setAddrToShip() public void browsecatalog()
public void deleverItem() public void getCreditRating()
public void shipmentDetails() public void getAddrToShop()
public void displaycatalog()
public void selectItem()
public void removeOrder()
public void setCreditCard()
public void setCrediting(int val )
: Shoppingcart public void rejected()
public void authorize()
public void authorizedCharge()
: creditcard
public void getExpiryDate()
24
ONLINE PURCHASE ACTIVITY DIAGRAM
OnlinePurchase Customer
Shoppingcart
Creditcard
Unnamed
Browse Catlog
Displaying Catlog
{ From OP_Activity }
{ From OP_Activity }
Selecting Catlog
Displaying ....
{ From OP_Activ...
{ From OP_Activity }
Selecting &
Requesting
Validating credit
{ From OP_Activit...
{ From OP_Activity }
{ From OP_Activity }
Issuing payment
Accepting delivery
{ From OP_Activity }
{ From OP_Activity }
Unnamed
Delievering Item
Authorized
{ From OP_Activity }
{ From OP_Activity }
Rejected { From OP_Activity } Unnamed
25
ONLINE PURCHASE STATECHART DIAGRAM
CHECKING
PROCESS DELIVERY
WAITING
DISPATCH
CANCELLING
EXIT
26
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 } }
27
public class Product() { public Product() { } }
RESULT:Thus the UML models for the Online Purchase System have been developed and verified.
28
Ex. No 4
LIBRARY MANAGEMENT SYSTEM
CONTENTS 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
29
ANALYSIS Identifying the Actors •
Student
•
Computer
•
Publisher
•
Librarian
Identifying the Use Cases •
Login
•
Request Book
•
Book Details
•
Collect Books
•
Order Books
•
Issue Books
•
Database REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
30
USE CASE DIAGRAM
login
Student
Request book
Book details
Collect books
Publisher Order books
Librarian Issue books
database
Computer
31
CLASS DIAGRAM
Librarian Student
Attributes
Attributes
Operations
public public public public public
private int scode private String sname Operations
public public public public public public public public
Student() 1..* int getScode() String getSname() void setSname(String val ) void viewBookStatus() void requestBook() void returnBook() void setScode(int val )
void issueBook() void orderBook() void issueCard() void update() Librarian() 1..*
Database Attributes
private int bookid private String bookname private String authorname private int accessno Operations
Publisher
public public public public public public public public public
Attributes
private int orderno private String orderbookname Operations
public public public public public
Publisher() int getOrderno() void setOrderno(int val ) void setOrderbookname(String val ) String getOrderbookname()
32
Database() int getBookid() void setBookid(int val ) String getBookname() void setBookname(String val ) String getAuthorname() void setAuthorname(String val ) int getAccessno() void setAccessno(int val )
SEQUENCE DIAGRAM
Database :
Student :
Librarian :
Publisher :
public void orderBooks() login public void deliverbook() login valid
public void updateNew Arrivals()
public void bookStatus()
bookavailable
public void requestBook() validation
issueBook
publc void receiveBook()
public void returnBook()
update
33
ACTIVITY DIAGRAM
LibraryS yste m S tudent
Librarian
C om put er
L og in
Vie w B oo k S tatu s D atabase R e tu rn bo oks
B ook A v a ilable
B o ok u pdation
R e qu e st for bo oks
Book no t Av ilable
R e ce iv in g B o oks B o ok issue
34
STATE CHART DIAGRAM
Student ID
Enter Id number
SID Wrong Id no.
Correct
Wrong ID- re-enter
Re-enter id
ID Accepted
ID accepted Select frommain menu
select frommain menu
Prepare for next selection
Library Main Menu
35
SOURCE CODE 1. Student.java public class Student { private int scode; private String sname; public Student() { } public int getScode() { return scode; } public void setSname( String val ) { sname = val; } public String getSname() { return sname; } public void viewBookStatus() { } public void requestBook() { } public void returnBook() { }
36
public void setScode( int val ) { scode = val; } } 2.Librarian.java public class Librarian { public void issueBook() {
}
public void orderBook() { } public void issueCard() { } public void update() { } public Librarian() { } }
RESULT:Thus the UML models for the Library Management System have been developed and verified.
37
Ex. No 5
E - TICKETING
CONTENTS 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
38
ANALYSIS Identifying the Actors •
Passenger
•
Clerk
Identifying the Use Cases •
Update Customer DB
•
Validation
•
Service ATM
•
Cash to Customer
•
Bill to Customer
•
Credit Cards
•
Payment
•
Reservation Form
•
Reservation Chart
•
Cash Mode
•
Ticket Confirm REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner 39
E-TICKETING USE CASE DIAGRAM
Up d ate cu s to m e r DB
P a sse n g e r V a lid a t io n
C as h to cu s to m e r
S e r v ic e A T M
C r id it c a r d s
B ill t o c u s t o m e r
Paym e n ts
T ic k e t C o n f ir m
C l e rk
40
Cas h m ode
R e s e v a t io n Fo r m
R e s e v a t io n C h art
E-TICKETING CLASS DIAGRAM
Train_Details Attrib utes
Passenger Attrib utes
private private private private
s tring pname long Age s tring Sex date DOJ
long no String destination String tname String source lonf depatiretime long arrivaltime
public public public public public public public public public public public public public
Train_Details() long getNo() 1..* void setNo(long val ) String getDestination() void setDestination(String val ) String getTname() void setTname(String val ) String getSource() void setSource(String val ) lonf getDepatiretime() long getArrivaltim e() void setArrivaltim e(long val ) void setDepatiretime(lonf val )
Train_Seatdetails Attrib utes
O perations
O perations
public public public public public public public public public
private private private private private private
Passenger() string getP name() 1..* void setP name(string val ) long getAge() string getS ex() void setS ex(string val ) date getDOJ() void setDOJ(date val ) void setA ge(long val ) 1..*
R eservation Attrib utes 1..*
private private private private private
long tno date DOJ long seatno int nop int Coaches
public public public public public public public public public public public public
Reservation() long getTno() void setTno(long val ) date getDOJ() void setDOJ(date val ) long getSeatno() void setSeatno(long val ) int getNop() void setNop(int val ) int getCoac hes() void setCoaches(int val ) void reservatio()
O perations
Payment Attrib utes
private float Amount O perations
public Payment() public float getA mount() public void setAmount(float val )
41
private private private private
long tno date DOJ long seats int coaches
public public public public public public public public public
Train_Seatdetails() long getTno() void setTno(long val ) date getDOJ() void setDOJ(date val ) long getS eats() void setSeats(long val ) int getCoaches() void setCoaches(int val )
O perations
E-TICKETING SEQUENCE DIAGRAM
: Reservation
: TrainDetails
: Train Seat Details
: Passenger
public void reservatio()
public void gettraindetails()
public void checkavailability()
public void paymentcalc()
public void getpayment()
public void issueticket() public void updatet_trainseats()
42
: Payment
E-TICKETING COLLABORATION DIAGRAM
: T ra in _ S e a tD e ta ils p u b lic lo n g g e tS e a tn o ()
p u b lic lo n g g e tTn o ( )
: T ra in _ D e ta ils
p u b lic v o id p a y me n tc a lc ( )
: R e s e rv a tio n
p u b lic v o id r e s e r v a tio ( )
: Passenger
43
: p a y m e n ts
E-TICKETING ACTIVITY DIAGRAM
Passenger
R eservation
TrainD eatails
Show train details
C heck train details
{ Fro m eticke ta ctivity }
{ Fro m e ticke ta ...
C heck seat availability { From eticke ta...
R eserve tickets
{ Fro m eticketa ...
R equest P ayment Make P aym ents
{ Fro m eticke ta...
{ From e ticketactivi...
Issue Ticket { Fro m e ticke t...
44
S eatdetails
E-TICKETING STATE CHART DIAGRAM
REQUEST FOR CREDIT CARD NUMBER
CREDIT AGENCY
VALIDATION COMPLETED
TRANSACTION OVER
45
E-TICKETING JAVA IMPLEMENTATION CODE public class Train_Seatdetails { private long tno; private date DOJ; private long seats; private int coaches; public Train_Seatdetails() { } public void setTno( long val ) { tno = val; } public long getTno() { return tno; } public void setDOJ( date val ) { DOJ = val; } public date getDOJ() { return DOJ; } public void setSeats( long val ) { seats = val; }
46
public long getSeats() { return seats; } public void setCoaches( int val ) { coaches = val; } public int getCoaches() { return coaches; } }
RESULT:Thus the UML models for the E – Ticketing System have been developed and verified.
47
Ex. No 6
COURSE REGISTRATION SYSTEM
CONTENTS 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
48
ANALYSIS Identifying the Actors •
Administrator
•
Course
•
Professor
•
Student
•
Billing
Identifying the Use Cases •
Maintain Student Information
•
Maintain Subject Information
•
Done Registration
•
View Report Card
•
Register Course
•
Select subjects to teach
•
Check for validity
•
Submit grades REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
49
USE CASE DIAGRAM
v ie w re p o rt c a rd
c o u r s e ...
r e g i ste r fo r c o u r se
m a i n ta i n stu d e n ts i n fo r m a ti o n
s tu d e n t lo g in
m a i n ta i n sta ff i n fo r m a ti o n
A d m in is tr a to r (C O E )
c l o se r e g i str a ti o n
b illin g se l e c t su b j e c ts to te a c h
su b m i t g r a d e s
P r o fe s s o r
50
CLASS DIAGRAM
c o u r s e _ c a t lo g
s tu d e n t A ttr i b u te s
p r i va t e p r i va t e p r i va t e p r i va t e
in t re g n o S t rin g n a m e S t rin g b ra n c h S t rin g c o u rs e
p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic
s t u d e n t () 1 ..* in t g e t R e g n o () vo i d s e t R e g n o ( i n t v a l ) 1 . . * S t rin g g e t N a m e () vo i d s e t N a m e ( S t r i n g va l ) S t rin g g e t b ra n c h () vo i d s e t b r a n c h ( S t r i n g v a l ) S t rin g g e t C o u rs e () vo i d s e t C o u r s e ( S t r i n g v a l )
O p e r a tio n s
1 ..*
A ttr ib u te s
p r i va t e p r i va t e p r i va t e p r i va t e p r i va t e
S t rin g c o d e S t rin g c o u rs e _ n a m e S t r i n g o ffe r e d _ b y d o u b le a m o u n t in t s e a t s
p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic
c o u rs e _ c a t lo g () S t r i n g g e t C o d e ( )1 . . * vo i d s e t C o d e ( S t r i n g v a l ) S t rin g g e t C o u rs e _ n a m e () vo i d s e t C o u r s e _ n a m e ( S t r i n g va l ) S t r i n g g e t O ffe r e d _ b y ( ) vo i d s e t O ffe r e d _ b y ( S t r i n g v a l ) d o u b le g e tA m o u n t() vo i d s e t A m o u n t ( d o u b l e va l ) in t g e t S e a t s () vo i d s e t S e a t s ( i n t va l )
O p e r a tio n s
*
1
1 1
a d m in is t r a t o r A ttr ib u te s
p r i va t e i n t i d O p e r a tio n s
p u b lic a d m in is t ra t o r() p u b l i c i n t g e t Id ( ) p u b l i c vo i d s e t Id ( i n t va l )
51
p r o fe s s o r A ttr ib u te s
p r i va t e S t r i n g n a m e p r i va t e i n t i d p r i va t e S t r i n g d e p t O p e r a tio n s
p u b lic 1 p u b lic p u b lic p u b lic p u b lic p u b lic p u b lic 1 ..*
p r o fe s s o r ( ) S t rin g g e t N a m e () vo i d s e t N a m e ( S t r i n g v a l ) i n t g e t Id ( ) vo i d s e t Id ( i n t v a l ) S t rin g g e t D e p t () vo i d s e t D e p t ( S t r i n g v a l )
SEQUENCE DIAGRAM
: Registrar
Student :
: Professor
public void addStudent()
public void addProfessor()
public void getCourseOffered()
public void addCourse()
public String[] getCourse()
public boolean isAvailable(String id )
public Stringvoid regForCourse(int id, String code )
public void updateSeat(String code )
public void calculateBill()
52
: CourseCatalog
COLLABORATION DIAGRAM
public void addP r ofes s or ( )
: R e g is tr a r
public void g etC our s eoffer ed( )
: P r o fe s s o r
public void c alc ulateBpublic ill( ) void addS tudent( )
public void updateS eat( S tr ing c ode )
public S tr ing ( our s eer C R U nnam ed ) public void g etC our s e( )
: C o u r s e C a tlo g
: S tu d e n t
53
ACTIVITY DIAGRAM
S tu d e n t C o u r se R e g i str a ti o n S tudent
P ro f e s s o r
R e g is t r a r
U nnam ed
O fffe r C o u r se { F r o m A c tiv ity C o u r s e }
R e g i ste r fo r C o u r se
{ F r o m A c tiv ity C o u r s e }
{ F r o m A c tiv ity C o u r s ...
V ie w R e p o rt { F r o m A c tiv ity C o u r s ...
C h e c k / U p d a te C a ta l o g
S u b m it R e p o rt { F r o m A c tiv ity C o u r s e }
54
STATE CHART DIAGRAM
P ro fe s s o r o ffe rs c o u rs e
S t u d e n t E n r o llm e n t
R e g is t r a r R e g is t e r s
B illin g
55
C a t lo g C h e c k in g
CLASS CODE public class student() { private regno private String name private String card public student() { } public getRegno() { } public String name() { } } public class course_catalog() { private String code private int seats public course_catalog() { } public String Code() { } public get Seats() { } }
56
public class professor() { private int ic private String name public Professor() { } public String name() { } public void subject() { } }
RESULT:Thus the UML models for the Course Registration System have been developed and verified.
57
Ex. No 7
QUIZ SYSTEM
CONTENTS 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
58
ANALYSIS Identifying the Actors •
Administrator
•
Course
•
Professor
•
Student
•
Billing
Identifying the Use Cases •
Maintain Student Information
•
Maintain Subject Information
•
Done Registration
•
View Report Card
•
Register Course
•
Select subjects to teach
•
Check for validity
•
Submit grades REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
59
USE CASE DIAGRAM
60
CLASS DIAGRAM
61
SEQUENCE DIAGRAM
62
COLLABORATION DIAGRAM
63
ACTIVITY DIAGRAM
64
STATECHART DIAGRAM
65
CLASS CODE public class quiz() { String name String user id public opname() { } } public class user() { String name String userid String course } public class questformat() { String Format public displayQuery() { } public questFormat() { } } public class topic() { String general String technical String science String sports
66
public store() { } public topic() { } }
RESULT:Thus the UML models for the Quiz System have been developed and verified.
67
Ex. No 8
STUDENT MARKS ANALYSIS SYSTEM
CONTENTS 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
68
ANALYSIS Identifying the Actors •
Administrator
•
Course
•
Professor
•
Student
•
Billing
Identifying the Use Cases •
Maintain Student Information
•
Maintain Subject Information
•
Done Registration
•
View Report Card
•
Register Course
•
Select subjects to teach
•
Check for validity
•
Submit grades REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
69
USE CASE DIAGRAM
70
CLASS DIAGRAM
71
SEQUENCE DIAGRAM
72
COLLABORATION DIAGRAM
73
ACTIVITY DIAGRAM
74
STATECHART DIAGRAM
75
CLASS CODE public class MarksRegister { private int StringRegno; private int intMaxmarks; private int intMinmarks; private int intMarksobtained; /** @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.
76
Ex. No 9
EMAIL CLIENT SYSTEM
CONTENTS 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
77
ANALYSIS Identifying the Actors •
Administrator
•
Course
•
Professor
•
Student
•
Billing
Identifying the Use Cases •
Maintain Student Information
•
Maintain Subject Information
•
Done Registration
•
View Report Card
•
Register Course
•
Select subjects to teach
•
Check for validity
•
Submit grades REQUIREMENTS
System Requirements Processor : Pentium IV 1.7 RAM : 128 MB Hard Disk : 40 GB Software Requirements CASE Tool : Rational Rose Language : Visual Basic in Java Front End : Visual Basic , Visual C++ Back End : MS Access , Oracle Testing : Win Runner
78
USE CASE DIAGRAM
79
CLASS DIAGRAM
SEQUENCE DIAGRAM
80
COLLABORATION DIAGRAM
81
ACTIVITY DIAGRAM 82
STATE CHART DIAGRAM
83
CLASS CODE
84
public class client() { String user id public password() { } } public class idAccount() { String id String name public create() { } public login() { } public idAccount() { } } public class website() { String address String state public website() { } } public class composer() { Byte mes Byte text Byte images public edit() { } public send() 85
{ } public composer() { } } public class checkmail() { String readReply public check() { } public delete() { } }
RESULT:Thus the UML models for the Email Client System have been developed and verified.
86