CS1402OOADLabManual

104
INDIRA INSTITUTE OF ENGINEERING TECHNOLOGY PANDUR, THIRUVALLUR DIST – 631 203 PRACTICAL RECORD NAME:……………………………… REGISTER No:…………………….. OBJECT ORIENTED ANALYSIS AND DESIGN RECOD NOTE BOOK ANNA UNIVERSITY DEPARTMENT OF INFORMATION TECHNOLOGY 1

Transcript of CS1402OOADLabManual

Page 1: CS1402OOADLabManual

INDIRA INSTITUTE OF ENGINEERING TECHNOLOGYPANDUR, THIRUVALLUR DIST – 631 203

PRACTICAL RECORD

NAME:……………………………… REGISTER No:……………………..

YEAR:…………… SEM:…………….. SUBJECT :………………………….

OBJECT ORIENTED ANALYSIS AND DESIGN RECOD NOTE BOOK

ANNA UNIVERSITY

DEPARTMENT OF INFORMATION TECHNOLOGY

1

Page 2: CS1402OOADLabManual

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

Page 3: CS1402OOADLabManual

INDEX

S.NO DATE TOPIC P.NO SIGN

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

Page 4: CS1402OOADLabManual

Ex. No 1STUDY 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

Page 5: CS1402OOADLabManual

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,

Generalization:-

A generalize relationship is a relationship between a more general class or use case

and a more specific class or use case.

Example,

 

<Class Name>

<Attributes>

<Operations>

5

Bank Account Person

Vehicle

TruckBus Car

Page 6: CS1402OOADLabManual

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 DIAGRAMINTERACTION 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

Page 7: CS1402OOADLabManual

  <Event>

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.

1. <Event>

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.

Start State:-

Shows the beginning of workflow.

7

Object 1 Object 2

Object 1 Object 2

<State>

Page 8: CS1402OOADLabManual

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.

DEPLOYMENT DIAGRAM

Shows the configuration of runtime processing elements and software components.

It is a graph of nodes connected by communication association.

8

<Activity>

Page 9: CS1402OOADLabManual

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.

Ex. No 2

ATM SYSTEMS

9

Page 10: CS1402OOADLabManual

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

ANALYSIS

Identifying the Actors

Customer

10

Page 11: CS1402OOADLabManual

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

ATM USE CASE DIAGRAM

11

Page 12: CS1402OOADLabManual

Customer

InsertCard

EnterAccno&Pin

ValidateAccno&Pin

RequestforCash

CheckforBalance

WithdrawMoney

CheckBalance

BankClerk

GetStatus

<<extend>>

12

Page 13: CS1402OOADLabManual

ATM CLASS DIAGRAM

ATMAttributesOperations

public ATM()

CardReaderAttributes

private int CardnoOperations

public CardReader()public int getCardno()public void setCardno(int val )public void acceptCard()public void readCard()public void ejectCard()

ATMScreenAttributesOperations

public ATMScreen()public void deductAmt()public void promptforPIN()public void enterAmt()public boolean authorizePin()public void verifyAmt()public void enterPin()public void initializeScreen()public void selectTransaction()public void promtforTransaction()public void promtforAmount()public CardReader getCardReader()public void setCardReader(CardReader val )

CashDispenserAttributes

private int cashbalOperations

public CashDispenser()public int getCashbal()public void setCashbal(int val )public void provideRept()public void provideCash()

CustomerAttributes

private int accnoprivate int Cardnoprivate string nameprivate string addressprivate longint phoneprivate float balance

Operationspublic Customer()public int getAccno()public void setAccno(int val )public int getCardno()public void setCardno(int val )public string getName()public void setName(string val )public string getAddress()public void setAddress(string val )public longint getPhone()public void setPhone(longint val )public float getBalance()public void setBalance(float val )

AccountAttributes

private int accnoprivate int PINprivate int Cashbal

Operationspublic Account()public void setAccno(int val )public int getAccno()public int getPIN()public void verifyPIN(int val )public int getCashbal()public void setCashbal(int val )public void openAccount()public void withdraw()public void deductAmt()public void checkBalacne()public void verifyAmt()

11

1..*

13

Page 14: CS1402OOADLabManual

ATM SEQUENCE DIAGRAM

: Customer

: Account : CashDispenser : CardReader : ATMScreen

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 provideRept()public void ejectCard()

14

Page 15: CS1402OOADLabManual

ATM COLLABORATION DIAGRAM

: Customer

: CardReader

: ATMScreen

: Account

public boolean authorizePin()

public void deductAmt()

public void verifyPIN(int val )

public void w ithdraw ()

public void checkBalacne()

public void enterAmt()

public void selectTransaction()

public void enterPin()

public void readCard()

public void ejectCard()

public void acceptCard()

15

Page 16: CS1402OOADLabManual

ATM STATE CHART DIAGRAM

REQUEST PIN

PIN NUMBER

Accept PinWrong Pin

re-request Pin

Login Complete

16

Page 17: CS1402OOADLabManual

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

Page 18: CS1402OOADLabManual

public class Customer(){

private int accnoprivate int Cardnoprivate String namepublic 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

Page 19: CS1402OOADLabManual

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

Page 20: CS1402OOADLabManual

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

Page 21: CS1402OOADLabManual

ONLINE PURCHASE USE CASE DIAGRAM

OnlinePurchase

Customer

Software

Banking

Dealer

Check forvalidity

Deliever Goods

IssueAuthorization

Issue Details

Ask for Payment &Shipping details

Select Item

Browse Catlog

Request Item

21

Page 22: CS1402OOADLabManual

ONLINE PURCHASE CLASS DIAGRAM

ShoppingCardAttributes

public float subtotalpublic float salesmoneypublic float totalmoney

Operationspublic ShoppingCard()public float getSubtotal()public void setSubtotal(float val )public float getSalesmoney()public void setSalesmoney(float val )public float getTotalmoney()public void setTotalmoney(float val )public void placeOrder()public void removeOrder()public Customervoid[0..*] getCustomer()public void setCustomer(Customer val[0..*] )public CreditCardvoid[0..*] getCreditCard()public void setCreditCard(CrdeitCard val[0..*] )public Customer[0..*] getCustomer()public void setCustomer(Customer val[0..*] )public CreditCard[0..*] getCreditCard()public void setCreditCard(CreditCard val[0..*] )

CustomerAttributes

private string addrtoshipprivate string nameprivate string addrtobillprivate string emailaddprivate int creditrating

Operationspublic Customer()public string getAddrtoship()public void setAddrtoship(string val )public string getName()public void setName(string val )public string getAddrtobill()public void setAddrtobill(string val )public string getEmailadd()public void setEmailadd(string val )public int getCreditrating()public void setCreditrating(int val )public void displayCategory()public void selectItem()public void delieverItem()public void removeOrder()

ItemOfPurchaseAttributes

private int quantityprivate float priceperitem

Operationspublic ItemOfPurchase()public int getQuantity()public void setQuantity(int val )public float getPriceperitem()public void setPriceperitem(float val )public Customer fetCustomer()public void setCustomer(Customer val )public Product[0..*] getProduct()public void setProduct(Product val[0..*] )public Product[0..*] getProduct()public void setProduct(Product val[0..*] )

CreditCardOperations

public CreditCard()public int getNumber()public void setNumber(int val )public date getExpirydate()public void setExpirydate(date val )public boolean getIssue()public void setIssue(boolean val )public void authorizeCharge()public Preffered()public ItemOfPurchase getItemOfPurchase()public void setItemOfPurchase(ItemOfPurchase val )public PrefferedCustomer[0..*] getPrefferredCustomer()public void setPrefferredCustomer(PrefferedCustomer val[0..*] )public PrefferedCustomer[0..*] getPrefferedCustomer()public void setPrefferedCustomer(PrefferedCustomer val[0..*] )

PrefferedCustomerAttributes

private int discountrateOperations

public PrefferedCustomer()public int getDiscountrate()public void setDiscountrate(int val )public Customer getCustomer()public void setCustomer(Customer val )public Customer getCustomer1()public void setCusotmer1(Customer val )public Customer getCustomer()public void setCustomer(Customer val )

ProductAttributesOperations

public Product()

1

*

mProduct

1

mCustomer

1*

mCreditCard 1

1

mCustomer

mPrefferedCustomer

* 1

22

Page 23: CS1402OOADLabManual

ONLINE PURCHASE SEQUENCE DIAGRAM

: Customer

: Shoppingcart : creditcard

public void brow secatalog()

public void displaycatalog()

public void selectItem()

public void getCreditRating()public void getAddrToShop()

public void setCreditCard()

public void shipmentDetails()

public void authorizedCharge()

public void authorize()

public void getExpiryDate()

validation

public void setCrediting(int val )

public void setAddrToShip()

public void deleverItem()

public void rejected()

public void removeOrder()

23

Page 24: CS1402OOADLabManual

ONLINE PURCHASE COLLABORATION DIAGRAM

: Customer

: Shoppingcart

: creditcard

public void brow secatalog()

public void displaycatalog()public void selectItem()

public void getCreditRating()

public void getAddrToShop()

public void setCreditCard()

public void shipmentDetails()

public void setCrediting(int val )

public void setAddrToShip()

public void deleverItem()

public void removeOrder()

public void authorizedCharge()

public void authorize()

public void rejected()

public void getExpiryDate()

24

Page 25: CS1402OOADLabManual

ONLINE PURCHASE ACTIVITY DIAGRAM

OnlinePurchaseCustomer Shoppingcart Creditcard

BrowseCatlog

{ From OP_Activity }

SelectingCatlog

{ From OP_Activ...

Selecting &

{ From OP_Activit...

Issuingpayment

{ From OP_Activity }

DelieveringItem

{ From OP_Activity }

DisplayingCatlog

{ From OP_Activity }

Displaying ....

{ From OP_Activity }

Requesting

{ From OP_Activity }

Acceptingdelivery

{ From OP_Activity }

Authorized

{ From OP_Activity }

Rejected{ From OP_Activity }

Validatingcredit

{ From OP_Activity }

Unnamed

Unnamed

Unnamed

25

Page 26: CS1402OOADLabManual

ONLINE PURCHASE STATECHART DIAGRAM

CHECKING

PROCESS

DELIVERY

DISPATCH

WAITING

CANCELLING

EXIT

26

Page 27: CS1402OOADLabManual

CLASS CODE

public class Customer(){

private string nameprivate string addtoshopprivate int creditrating

public Customer(){

}public void delieverItem(){

}public void selectItem(){

}public void removeItem(){

}}

public class ItemOfPurchase(){

private int quantityprivate flaot priceperitem

public ItemOfPurchase(){

}public float getPriceperItem(){

}public void setPriceperItem(float val){

Item = val}

}

27

Page 28: CS1402OOADLabManual

public class Product(){

public Product(){

}}

RESULT:-

Thus the UML models for the Online Purchase System have been developed and verified.

28

Page 29: CS1402OOADLabManual

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

Page 30: CS1402OOADLabManual

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

Page 31: CS1402OOADLabManual

USE CASE DIAGRAM

login

Request book

Order books

database

Book details

Publisher

Student

Computer

LibrarianIssue books

Collect books

31

Page 32: CS1402OOADLabManual

CLASS DIAGRAM

StudentAttributes

private int scodeprivate String sname

Operationspublic Student()public int getScode()public String getSname()public void setSname(String val )public void viewBookStatus()public void requestBook()public void returnBook()public void setScode(int val )

LibrarianAttributesOperations

public void issueBook()public void orderBook()public void issueCard()public void update()public Librarian()

DatabaseAttributes

private int bookidprivate String booknameprivate String authornameprivate int accessno

Operationspublic Database()public int getBookid()public void setBookid(int val )public String getBookname()public void setBookname(String val )public String getAuthorname()public void setAuthorname(String val )public int getAccessno()public void setAccessno(int val )

PublisherAttributes

private int ordernoprivate String orderbookname

Operationspublic Publisher()public int getOrderno()public void setOrderno(int val )public void setOrderbookname(String val )public String getOrderbookname()

1..*

1..*

32

Page 33: CS1402OOADLabManual

SEQUENCE DIAGRAM

Student : Database :

Librarian : Publisher :

login

login valid

public void bookStatus()

bookavailable

public void requestBook()

validation

issueBook

publc void receiveBook()

public void returnBook()

update

public void orderBooks()

public void deliverbook()

public void updateNew Arrivals()

33

Page 34: CS1402OOADLabManual

ACTIVITY DIAGRAM

LibrarySystemStudent Librarian Computer

Receiving BooksBook issue

Request for books

View Book Status

Return books

Login

Database

Book updationBook Av ailable

Book not Av ilable

34

Page 35: CS1402OOADLabManual

STATE CHART DIAGRAM

Student ID

SID

ID Accepted

Wrong ID- re-enter

ID accepted

Library Main Menu

Enter Id number

Prepare for next selection

Correct

Wrong Id no.

Re-enter id

Select from main menu

select from main menu

35

Page 36: CS1402OOADLabManual

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

Page 37: CS1402OOADLabManual

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

Page 38: CS1402OOADLabManual

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

Page 39: CS1402OOADLabManual

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

Page 40: CS1402OOADLabManual

E-TICKETING USE CASE DIAGRAM

Updatecustomer DB

Validation

ServiceATMCash tocustomer

Bill to customer

Cridit cards PaymentsResevation

Form

Cash mode ResevationChartTicket Confirm

Clerk

Passenger

40

Page 41: CS1402OOADLabManual

E-TICKETING CLASS DIAGRAM

PassengerAttributes

private string pnameprivate long Ageprivate string Sexprivate date DOJ

Operationspublic Passenger()public string getPname()public void setPname(string val )public long getAge()public string getSex()public void setSex(string val )public date getDOJ()public void setDOJ(date val )public void setAge(long val )

Train_DetailsAttributes

private long noprivate String destinationprivate String tnameprivate String sourceprivate lonf depatiretimeprivate long arrivaltime

Operationspublic Train_Details()public long getNo()public void setNo(long val )public String getDestination()public void setDestination(String val )public String getTname()public void setTname(String val )public String getSource()public void setSource(String val )public lonf getDepatiretime()public long getArrivaltime()public void setArrivaltime(long val )public void setDepatiretime(lonf val )

Train_SeatdetailsAttributes

private long tnoprivate date DOJprivate long seatsprivate int coaches

Operationspublic Train_Seatdetails()public long getTno()public void setTno(long val )public date getDOJ()public void setDOJ(date val )public long getSeats()public void setSeats(long val )public int getCoaches()public void setCoaches(int val )

ReservationAttributes

private long tnoprivate date DOJprivate long seatnoprivate int nopprivate int Coaches

Operationspublic Reservation()public long getTno()public void setTno(long val )public date getDOJ()public void setDOJ(date val )public long getSeatno()public void setSeatno(long val )public int getNop()public void setNop(int val )public int getCoaches()public void setCoaches(int val )public void reservatio()

PaymentAttributes

private float AmountOperations

public Payment()public float getAmount()public void setAmount(float val )

1..*

1..*1..*

1..*

41

Page 42: CS1402OOADLabManual

E-TICKETING SEQUENCE DIAGRAM

: Passenger

: Reservation : TrainDetails : Train Seat Details : Payment

public void reservatio()

public void gettraindetails()

public void checkavailability()

public void paymentcalc()

public void getpayment()

public void issueticket()

public void updatet_trainseats()

42

Page 43: CS1402OOADLabManual

E-TICKETING COLLABORATION DIAGRAM

: Train_Details : Reservation

: Train_SeatDetails

: payments

: Passenger

public long getTno()

public long getSeatno()

public void paymentcalc()

public void reservatio()

43

Page 44: CS1402OOADLabManual

E-TICKETING ACTIVITY DIAGRAM

Passenger Reservation TrainDeatails Seatdetails

Check traindetails

{ From eticketa...

Reservetickets

{ From eticketa...

MakePayments

{ From eticketactivi...

Show traindetails

{ From eticketactivity }

RequestPayment

{ From eticketa...

IssueTicket

{ From eticket...

Check seatavailability

{ From eticketa...

44

Page 45: CS1402OOADLabManual

E-TICKETING STATE CHART DIAGRAM

REQUEST FOR CREDITCARD NUMBER

CREDIT AGENCY

VALIDATIONCOMPLETED

TRANSACTIONOVER

45

Page 46: CS1402OOADLabManual

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 )

{

46

Page 47: CS1402OOADLabManual

seats = val;

}

public long getSeats()

{

return seats;

}

public void setCoaches( int val )

{

coaches = val;

}

public int getCoaches()

{

return coaches;

}

}

47

Page 48: CS1402OOADLabManual

RESULT:-

Thus the UML models for the E – Ticketing System have been developed and verified.

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

Page 49: CS1402OOADLabManual

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

49

Page 50: CS1402OOADLabManual

Testing : Win Runner

USE CASE DIAGRAM

Administrator (COE)

maintainstudents

information

maintain staffinformation

closeregistration

student

view report card

register forcourse

login

Professor

select subjectsto teach

submit grades

billing

course ...

50

Page 51: CS1402OOADLabManual

CLASS DIAGRAM

professorAttributes

private String nameprivate int idprivate String dept

Operationspublic professor()public String getName()public void setName(String val )public int getId()public void setId(int val )public String getDept()public void setDept(String val )

studentAttributes

private int regnoprivate String nameprivate String branchprivate String course

Operationspublic student()public int getRegno()public void setRegno(int val )public String getName()public void setName(String val )public String getbranch()public void setbranch(String val )public String getCourse()public void setCourse(String val )

administratorAttributes

private int idOperations

public administrator()public int getId()public void setId(int val )

course_catlogAttributes

private String codeprivate String course_nameprivate String offered_byprivate double amountprivate int seats

Operationspublic course_catlog()public String getCode()public void setCode(String val )public String getCourse_name()public void setCourse_name(String val )public String getOffered_by()public void setOffered_by(String val )public double getAmount()public void setAmount(double val )public int getSeats()public void setSeats(int val )

1..*

1..*

1..*

1

1..*

1

1..* 1

*

1

51

Page 52: CS1402OOADLabManual

SEQUENCE DIAGRAM

Student : : CourseCatalog : Registrar : 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

Page 53: CS1402OOADLabManual

COLLABORATION DIAGRAM

: Registrar

: Course Catlog : Student

: Professor

public void addProfessor()

public void getCourseoffered()

public void addStudent()public void calculateBill()

public String(ourseerCR Unnamed )

public void getCourse()

public void updateSeat(String code )

53

Page 54: CS1402OOADLabManual

ACTIVITY DIAGRAM

Student Course RegistrationStudent Prof essor Registrar

Register forCourse

{ From Activity Cours...

View Report

{ From Activity Cours...

Offfer Course{ From Activity Course }

Submit Report

{ From Activity Course }

Check/UpdateCatalog

{ From Activity Course }

Unnamed

54

Page 55: CS1402OOADLabManual

STATE CHART DIAGRAM

Professoroffers

courseStudent Enrollment

RegistrarRegisters Billing

CatlogChecking

55

Page 56: CS1402OOADLabManual

CLASS CODE

public class student(){

private regnoprivate String nameprivate String card

public student(){

}public getRegno(){

}public String name(){

}}

public class course_catalog(){

private String codeprivate int seats

public course_catalog(){

}public String Code(){

}public get Seats(){

}

}

56

Page 57: CS1402OOADLabManual

public class professor(){

private int icprivate 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

Page 58: CS1402OOADLabManual

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

Page 59: CS1402OOADLabManual

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

Page 60: CS1402OOADLabManual

USE CASE DIAGRAM

60

Page 61: CS1402OOADLabManual

CLASS DIAGRAM

61

Page 62: CS1402OOADLabManual

SEQUENCE DIAGRAM

62

Page 63: CS1402OOADLabManual

COLLABORATION DIAGRAM

63

Page 64: CS1402OOADLabManual

ACTIVITY DIAGRAM

64

Page 65: CS1402OOADLabManual

STATECHART DIAGRAM

65

Page 66: CS1402OOADLabManual

CLASS CODE

public class quiz(){

String nameString user id

public opname(){

}}

public class user(){

String nameString useridString course

}

public class questformat(){

String Format

public displayQuery(){

}public questFormat(){

}}

public class topic(){

String generalString technicalString scienceString sports

66

Page 67: CS1402OOADLabManual

public store(){

}public topic(){

}}

RESULT:-Thus the UML models for the Quiz System have been developed and verified.

67

Page 68: CS1402OOADLabManual

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

Page 69: CS1402OOADLabManual

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

Page 70: CS1402OOADLabManual

USE CASE DIAGRAM

70

Page 71: CS1402OOADLabManual

CLASS DIAGRAM

71

Page 72: CS1402OOADLabManual

SEQUENCE DIAGRAM

72

Page 73: CS1402OOADLabManual

COLLABORATION DIAGRAM

73

Page 74: CS1402OOADLabManual

ACTIVITY DIAGRAM

74

Page 75: CS1402OOADLabManual

STATECHART DIAGRAM

75

Page 76: CS1402OOADLabManual

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

Page 77: CS1402OOADLabManual

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

Page 78: CS1402OOADLabManual

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

Page 79: CS1402OOADLabManual

USE CASE DIAGRAM

79

Page 80: CS1402OOADLabManual

CLASS DIAGRAM

SEQUENCE DIAGRAM

80

Page 81: CS1402OOADLabManual

COLLABORATION DIAGRAM

81

Page 82: CS1402OOADLabManual

ACTIVITY DIAGRAM

82

Page 83: CS1402OOADLabManual

STATE CHART DIAGRAM

83

Page 84: CS1402OOADLabManual

CLASS CODE

84

Page 85: CS1402OOADLabManual

public class client(){

String user idpublic password(){

}}

public class idAccount(){

String idString name

public create(){

}public login(){

}public idAccount(){

}}

public class website(){

String addressString state

public website(){

}}

public class composer(){

Byte mesByte textByte images

public edit(){

}public send()

85

Page 86: CS1402OOADLabManual

{

}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