Sie sind auf Seite 1von 23

Ex.NO.

:3 EmployeePayrollsystem

Aim

Tocreateacomputersystemtoprocessemployeespayroll.

Problemstatement

Thissystemisbuiltforemployeeandmanager.
Theemployeecanviewhissalaryandthemanagercanaddanewemployee,
updateemployeedetailsandcalculateandcreditthesalary.
Theemployeeandmanagercanlogintothesystemprovidingtheirrespective
usernamesatlogin,iftheenteredinputisincorrectanappropriatemessageis
displayed.

Usecasediagram

Thepayrollusecasesinoursystem
are:1.Login
2. Addemployee
3. Updateemployeedetails
4. Deleteemployee
5. Calculatesalary
6. Viewemployeedetails
7. Logout

Actorsinvolved

1. Manager
2. Employee

Usecasename:Login

The user enters the username and password and chooses if the user is
employeeoradministrator.Ifentereddetailsarevalid,theusersaccountbecomes
available.
Ifitisinvalid,anappropriatemessageisdisplayedtotheuser.
Usecasename:Addemployee

Onlythemanagerhasaccesstothisusecase.Themanagerhastoprovidethe
detailsoftheemployeetocreateanaccountforanewemployee.Iftheemployee
addedalreadyexitsanappropriatemessageisdisplayed.

Usecasename:Updateemployeedetails

Thisusecasecanbeaccessedonlybythemanagerandnotbytheemployee.
Thedesiredemployeeissearchedforandthedetailsoftheemployeeareupdatedwith
newentries.Iftheemployeesearchedforisnotavailableanappropriatemessageis
displayed.

Usecasename:Deleteemployee

Thisusecasecanalsobeusedonlybythemanager.Itisusedtodeletethe
recordofanemployeeifitisnotnecessary.Theemployeeidentityisprovidedbythe
managerwhichissearchedforandifitisfound,itisdeleted.Ifitisnotfoundan
appropriatemessageisdisplayed.

Usecase:calculatesalary

This usecase is used to calculate the salary of the employee after adding
allowancesanddeductingasnecessary.Thenetsalaryisdisplayed.Thisusecasecan
be used by both employee and by the administrator. The employee details are
searchedforandthenetsalaryiscalculated.

Usecase:Viewemployeedetails

This usecase is used to display details of the employee. If the employee


searchedforisnotavailable,anappropriatemessageisdisplayed.

Usecase:logout

Afterallthenecessaryoperationsarecomplete,thisusecaseisusedtologout
ofthecurrentaccount.
Usecasediagramforpayrollsystem
Classdiagram

Theclassdiagramisagraphicalrepresentationofalltheclassesusedinthe
systemandtheiroperations,attributesandrelationships.
Thepayrollsystemmakesuseofthefollowingclasses:
1. System
2. Employeedetails
3. Employeesalary

1) System

It consists of two attributes and two operations. The attributes are


usernameandpassword.Theoperationsusedarelogin()andlogout().

2)Employeedetails

Itisusedtostorethepersonaldetailsoftheemployee,suchasname,
employeeid,genderandage.Theoperationsavailableinthisclassare
view(), add employee(), edit employee details(), view employee
details(),deleteemployeedetails().

3)Employeesalary

Itisusedtostorethesalarydetailsoftheemployeesuchasbasicpay,
house rent allowance, dearness allowance, provident fund and
insuranece.Theoperations availablearecalculate netsalary(),view
salarydetails(),updatesalarydetails()anddeducefine().
Classdiagramforpayrollsystem
Sequencediagram

Asequencediagramrepresentsthesequenceandinteractionsofagivenuse
caseorscenario.Sequencediagramscancapturemostoftheinformationaboutthe
system.Mostobjecttoobjectinteractionsandoperationsareconsideredeventsand
eventsincludesignals,inputs,decisions,interrupts,transitionsandactionstoorfrom
usersorexternaldevices.
Aneventalsoisconsideredtobeanyactionbyanobjectthatsends
information.Theeventlinerepresentsamessagefromoneobjecttoanother,inwhich
thefromobjectisrequestinganoperationbeperformedbythetoobject.The
toobjectperformstheoperationusingamethodthattheclasscontains.

Itisalsorepresentedbytheorderinwhichthingsoccurandhowtheobjectsin
thesystemsendmessagetooneanother.

Thesequencediagramforeachusecasethatexistswhenauserlogsin,adds,
views,updatesordeletesrecordsinthesystem.
Sequencediagramandcollaborationforaddinganemployee
Fortheusecaseofaddinganemployee,asequenceandaninteractiondiagramare
drawn.Thediagramsshowthatadministratorcanonlyaddanewemployee.

Sequenceandcollaborationdiagramforcalculatingthenetsalary

Thenetsalaryiscalculatedbyaddingthesalarydetailssuchasbasichra,da,etc.,
anddeducingtheinsuranceandpfamount.
Sequenceandcollaborationdiagramfordeletinganemployee

Onlytheadministratorhasprivilegetodeleteanemployee.Theemployeerecord
whichhastobedeletedisselectedbytheadministratoranddeleted.
Sequenceandcollaborationdiagramforeditinganemployeesdetails

Onlytheadministratorhastheprivilegetoeditemployeedetails.Theemployee
detailsareselectedandeditedbytheadministratorandsavedtothedatabase.
Sequenceandcollaborationdiagramforviewingemployeesalary

Theemployeemaywishtoviewhissalarydetails.Anemployeemayseeonlyhis
ownsalarydetailsandnotthatofanyoneelse.

RESULT:
Thusthedocumentationforemployeepayrollsystemiscreated.Theoutputis
verified.
Ex.NO.:4AIRLINETICKETRESERVATIONSYSTEM

Introduction:

Themanualsystemofticketreservationtakesmoretimeandthenumberof
reservationsperdayislimited.Toincreasetheefficiencyoftheprocess,wegofor
onlineticketreservationsystem.Thissystemsupportsonlineticketbooking.

Problemstatement

This system is built for user to directly access the system online to book
tickets. The user can book, print, delete tickets without the help of a clerk. The
administratorhascontrolovertheaddingflightsavailableforbookingandhascontrol
overdeletingflightsthatarenotnecessary.Theadministratorandusercanbothenter
thesystemusingtheirrespectivelogindetails

Usecasediagram

Theonlineticketreservationsystemusesthefollowingusecases:
1. Login
2. Bookticket
3. Printticket
4. Cancelticket
5. Viewflight
6. Addflight
7. Deleteflight
8. Logout

Actorsinvolved
1) Administrator
2) Passenger

Usecasename:login

Theuserentersausernameandapassword.Andiftheentereddetailsare
valid, the users details are brought to the screen; if they are invalid then an
appropriatemessageisdisplayed.
Usecasename:Bookticket

Theuserisallowedtobookaticketontheflightherequiresandthedateand
timeasisnecessaryfortheuser.Theuserhastoprovidedetailssuchasname,flight
number,dateoftravel,departuretime,andcanviewthepriceoftheticket.
Usecasename:Printticket

Theuserafterbookingaticketcanprintacopyoftheticketreserved.Theuser
has to provide the details about ticket number for searching in the database and
passengernameforconfirmingpassengeridentity.

Usecasename:Cancelticket

A passenger can decide to cancel a ticket after the ticket is booked. The
passengerhastoprovidedetailsaboutticketforsearchinganddetailsabouthimfor
confirmationofidentity.

Usecasename:Viewflight

The passenger can view the flights available in the database for deciding
whichflightstickethewishestobook.Thepassengercanviewthedetailsofflights
suchas,flightnumber,FlightCompany,price,departureandarrivaltimes.

Usecasename:Addflight

Onlytheadministratorhasprivilegetoaddflights.Theadministratorcanadd
theflightonwhichticketscanbebookedbythepassengers.Theadministratorhasto
providedetailsaboutanewflightsuchasflightnumber,flightcompanyname,price,
departuretime,dateoftravel.

Usecasename:Deleteflight

Theadministratoralsohastheprivilegetodeleteflightsthatarenotnecessary.
Theadministratorhastoprovidedetailsabouttheflightforsearchingandinformany
passengers that have booked tickets on the flight about the change and make
necessaryarrangements.

Usecasename:Logout

Afterthenecessaryoperationshavebeenperformedonthesystem,theuser
canchoosetologoutfromthesystem.
Usecasediagramforairlinereservation
Classdiagram

Theclassdiagramisagraphicalrepresentationofalltheclassesusedinthe
systemandtheiroperations,attributesandrelationships.

Theonlineticketreservationsystemmakesuseofthefollowingclasses:

o Ticketsystem
o Flight details
o Ticket

Ticketsystem

Itconsistsoftwoattributesandtwooperations.Theattributesareusername
andpassword.Theoperationsusedarelogin()andlogout().

Flightdetails

Itstoresthedetailsofalltheflightssuchasflightnumber,FlightCompany,
flightcapacity,andcost.Theoperationsavailableareadd(),delete()andview().

Ticket
Itrecordsthedetailsofeveryticketbookedsuchasticketnumber,passenger
name,andflightnumber,fromplace,toplace,dateoftravel,departuretime,arrival
time,andprice.Theoperationsavailableareadd(),delete(),view(),andprint().
Classdiagramforairlinereservationsystem
Sequencediagram

Asequencediagramrepresentsthesequenceandinteractionsofagivenuse
caseorscenario.Sequencediagramscancapturemostoftheinformationaboutthe
system.Mostobjecttoobjectinteractionsandoperationsareconsideredeventsand
eventsincludesignals,inputs,decisions,interrupts,transitionsandactionstoorfrom
usersorexternaldevices.

Aneventalsoisconsideredtobeanyactionbyanobjectthatsends
information.Theeventlinerepresentsamessagefromoneobjecttoanother,inwhich
thefromobjectisrequestinganoperationbeperformedbythetoobject.The
toobjectperformstheoperationusingamethodthattheclasscontains.

Itisalsorepresentedbytheorderinwhichthingsoccurandhowtheobjectsin
thesystemsendmessagetooneanother.

Thesequencediagramforeachusecasethatexistswhenauserlogsin,adds,
views,updatesordeletesrecordsinthesystem.
Sequenceandcollaborationdiagramforaddingaflight

TheAdministratorhastheprivilegetoaddflight.Hehastoprovidedetails
aboutthenewflightthatisbeingcreatedinthedatabase.
Sequenceandcollaborationdiagramforbookingaticket

Apassengercanbookaticketbyhimself.Hecanviewtheflightdetailshe
wantstobookaticketonandasperhisnecessitymaybookanappropriateticket.
Sequenceandcollaborationdiagramforcancelingaticket

Cancelingaticketcanbeperformedbythepassengerhimself.Hemayview
thetickethewantsandcancelit.
Sequenceandcollaborationdiagramfordeletingaflight

Aflightcanbedeletedonlybytheadministrator.Theflighttobedeletedisselected
andremovedfromthedatabase.
Sequenceandcollaborationdiagramforprintingaticket

Thepassengermaychoosetoprintaticketafterbookingaticket.Theticketwhichis
bookedisselectedandprintedbythepassenger.

RESULT:
Thusthedocumentationforairlinereservationsystemiscreated.Theoutputis
verified.

Das könnte Ihnen auch gefallen