OOAD LAB

161
SUDHARSAN ENGINEERING COLLEGE SATHIYAMANGALAM DEPARTMENT OF MCA LAB MANUAL CA5205-CASE TOOLS LAB YEAR/SEM: II/III SUBMITTED BY 1

Transcript of OOAD LAB

Page 1: OOAD LAB

SUDHARSAN ENGINEERING COLLEGESATHIYAMANGALAM

DEPARTMENT OF MCA

LAB MANUAL

CA5205-CASE TOOLS LAB

YEAR/SEM: II/III SUBMITTED BYACADEMIC YEAR(2010-2011) R.YUVARANIBATCH:(2009-2012)

1

Page 2: OOAD LAB

SYLLABUSCA5205 CASE TOOLS LABORATORYL T P C0 0 3 2Develop software for an application using typical Case Tool, following SoftwareEngineering methodology as given below:

1. Problem Statement Thorough study of the problem – Identify project scope,Objectives and infrastructure.

2. Business modeling and requirements specification: The specificationlanguage Unified Modeling Language (UML), will be used.

3. UML - Use work products – data dictionary, use case diagrams and activitydiagrams, build and test, class diagrams, sequence diagrams, collaborationdiagrams and add interface to class diagrams.

4. Software Implementation Coding - Use tools for automatic code generationfrom system specifications.

5. Change Management –Program, Data and Documentation management

6. Software Testing - Prepare test plan, perform validation testing, coverageanalysis, memory leaks, develop test case hierarchy, Site check and site monitor.

7. Software Documentation and Reverse Engineering - Apply ReverseEngineering approach and compare with the forward engineering approach.Prepare documents and reports

Total: 45 hrs.

2

Page 3: OOAD LAB

SUDHARSAN ENGINEERING COLLEGESATHIYAMANGALAM

DEPARTMENT OF MCA

CA5205-CASE TOOLS LAB

LIST OF EXPERIMENTS

Year/Sem: II /III DATE :09.07.10

DEPT :MCA

1. Develop a Stock Maintainence Software.

2. Develop a Online Quiz System Software.

3. Develop a ATM Software.

4. Develop a Library Information System Software.

5. Develop a Payroll System Software.

6. Develop a Railway Reservation System Software.

7. Develop a Course Registration System Software.

3

Page 4: OOAD LAB

8. Develop a Student Information System Software.

9. Develop a Expert System Software.

R.YUVARANI

STAFF-INCHARGE HoD/MCA

ONLINE QUIZ SYSTEM

4

Page 5: OOAD LAB

ONLINE QUIZ SYSTEMAIM: To develop the online quiz system by using visual basic as front end and MS-access as back end.

PROGRAM ANALYSIS AND PROJECT PLANNING

PURPOSE: The purpose of the SRS is to fully describe the functionality of online quiz

system identified and it also describe non-functional requirements and design control and other factors.

PROJECT SCOPE: The SRS applies to the online quiz system. Initially the project is going to be

implement interact level and later the organization has an idea to upgrade in internet level the project merit in guide.

OBJECTIVES: Easy to use Modern way of learning. Including the students power to answer.

HARDWARE REQUIREMENTS: 1. Intel Motherboard With Pentium Processor2. RAM 256MB(minimum)3. Hard disk 40GB(minimum)

SOFTWARE REQUIREMENTS:

5

Page 6: OOAD LAB

1. Microsoft VisualBasic6.02. Microsoft Access3. Rational Rose

SOFTWARE REQUIRMENT ANALYSIS: OVERALL DESCRIPTION: The product will take with inspiration auto used system.All the function provide by the students,staff and system administration.

Online Testing. Random generation of questions. Multimedia representation of question and answer if needed.

INTENDED AUDIENCE: Administrator Staff Student

PRODUCT FUNCTIONS:

ADMINISTRATOR: Administrator has ability to register the student to provide user-id and password. STAFF: Prepare question for exam and set the parameter add subject,modify the test. STUDENT: Under takes online test the must be able to answer the question and get the marks,the students must have a user ID and password

6

Page 7: OOAD LAB

ONLINE QUIZ SYSTEM

USE CASE DIAGRAM:

Authentication

Question setup

Quiz

user

score

Admin

7

Page 8: OOAD LAB

CLASS DIAGRAM:

questionsetup

question : stringoption1 : stringoption2 : stringoption 3 : stringoption 4 : string

add()edit()update()

Admin1

name : stringpassword : string

check()

score

display()

user1

id : int

answering()submit()

8

Page 9: OOAD LAB

SEQUENCE DIAGRAM:

user admin database

enter id

check id

id entered

check if admin or usercheck result

display question

answeringverify answer

verification result

mark calculation

display score

9

Page 10: OOAD LAB

COLLABORATION DIAGRAM:

user

admin

database

4: check if admin or user

10: mark calculation

1: enter id6: display question11: display score

2: id entered7: answering

3: check id8: verify answer

5: check result9: verification result

10

Page 11: OOAD LAB

VB SOURCE CODEForm1.frm

Dim db As DatabaseDim rs As Recordset

Private Sub Command1_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Trim(Text1.Text) ThenIf Data1.Recordset.Fields(1) = Trim(Text2.Text) ThenForm2.ShowUnload MeElseMsgBox ("Password Is Incorrect")Exit DoEnd IfEnd IfData1.Recordset.MoveNextLoopEnd SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Form_Load()Set db = OpenDatabase("E:\ArunMani - Regrunp\TOTAL COLLECTIONS\Login Backup\CASE PRINTOUT\CASE PRINTOUT\quiz\QUIZ.mdb")Set rs = db.OpenRecordset("quiz")End Sub

Form2.frmPrivate Sub Command1_Click()Form1.ShowUnload MeEnd Sub

Private Sub Command2_Click()Form3.ShowUnload MeEnd Sub

11

Page 12: OOAD LAB

Private Sub Form_Activate()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseEnd Sub

Private Sub Option1_Click()Form5.Label3.Caption = Option1.CaptionForm5.Label4.Caption = "wrong"Form5.Label5.Caption = 0End Sub

Private Sub Option2_Click()Form5.Label3.Caption = Option2.CaptionForm5.Label4.Caption = "wrong"Form5.Label5.Caption = 0End Sub

Private Sub Option3_Click()Form5.Label3.Caption = Option3.CaptionForm5.Label4.Caption = "correct"Form5.Label5.Caption = 5End Sub

Form3.frm:Private Sub Command1_Click()Form2.ShowUnload MeEnd Sub

Private Sub Command2_Click()Form4.ShowUnload MeEnd Sub

Private Sub Form_Activate()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseEnd Sub

Private Sub Option1_Click()Form5.Label6.Caption = Option1.CaptionForm5.Label7.Caption = "wrong"Form5.Label8.Caption = 0End Sub

Private Sub Option2_Click()Form5.Label6.Caption = Option2.CaptionForm5.Label7.Caption = "correct"Form5.Label8.Caption = 5End Sub

12

Page 13: OOAD LAB

Private Sub Option3_Click()Form5.Label6.Caption = Option3.CaptionForm5.Label7.Caption = "wrong"Form5.Label8.Caption = 0End Sub

Form4.frm:Private Sub Command1_Click()Form3.ShowUnload MeEnd Sub

Private Sub Command2_Click()Form5.ShowUnload MeEnd Sub

Private Sub Form_Activate()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseEnd Sub

Private Sub Option1_Click()Form5.Label9.Caption = Option1.CaptionForm5.Label10.Caption = "Correct"Form5.Label11.Caption = 5End Sub

Private Sub Option2_Click()Form5.Label9.Caption = Option2.CaptionForm5.Label10.Caption = "Wrong"Form5.Label11.Caption = 0End Sub

Private Sub Option3_Click()Form5.Label9.Caption = Option3.CaptionForm5.Label10.Caption = "Wrong"Form5.Label11.Caption = 0End Sub

Form5.frm:

Private Sub Command1_Click()EndEnd Sub

Private Sub Command2_Click()Label13.Caption = Val(Label5.Caption) + Val(Label8.Caption) + Val(Label11.Caption)If Val(Label13.Caption) >= 10 ThenMsgBox "Congratulations", vbInformationElseMsgBox ("Better Luck Next Time")End If

13

Page 14: OOAD LAB

End Sub

OUTPUT FORM

Login form : (Form1.frm)

Question 1 : (Form2.frm)

14

Page 15: OOAD LAB

Question 2 : (Form3.frm)

Question 3 : (Form4.frm)

15

Page 16: OOAD LAB

Results : (Form5.frm)

16

Page 17: OOAD LAB

17

Page 18: OOAD LAB

RESULT: Thus the Payroll system was developed by using visual basic in front end and MS-Access in back end.

18

Page 19: OOAD LAB

TICKET RESERVATION

SYSTEM

19

Page 20: OOAD LAB

TICKET RESERVATION SYSTEM

AIM: To create a simple and easier method of reserving train tickets.

OBJECTIVE: The main objective of our railway reservation system is to serve as a very effective and premium portal for the reservation of railways.You can know the train timings,train routes,ticket availability,and much more in just a few clicks.

INFORMATION DESCRIPTION:

DETAILED DESCRIPTION OF PROJECT:

Search for the required train. Check for the availability of the ticket. If available reserve the ticket. Else search for another train.

HARDWARE DESCRIPTION:

1.Pentium Processor 2. Intel Motherboard 3. RAM 256MB(minimum) 4. Hard disk 40GB(minimum)

SOFTWARE DESCRIPTION:

4. Microsoft VisualBasic6.05. Microsoft Access6. Rational Rose

HUMAN INTERFACE DESCRIPTION: Interface going to be used is a user friendly interface,it is an online interface which will satisfy the users needs.

FUNCTIONAL DESCRIPTION:

20

Page 21: OOAD LAB

PERFORMANCE CHARACTERISTICS:

Fast access Easy access for end users. Simple steps for reservation and cancellation.

DATABASE REQUIREMENTS:

Details of Indian trains. Fare of trains according to classes. Percentage of concessions according to persons such as

students,senior citizens etc.., Above database are stored in MS-Access.

NON FUNCTIONAL REQUIREMENTS:

AVAILABILITY:Available to all systems around the clock.Available in any environmentSuites for everyone that is no credit card needed.Just enter the bank name and account no for payment.

MAINTAINABILITY: Regular updates of database Backup of database is maintained to avoid the loss of data due

to power failure.Less memory space required.

BEHAVIOUR DESCRIPTION: This project has mainly two functions:-

1.Reservation Easy and fast steps to reserve a ticket. Before reserving we can check the availability,timings etc..,

2.Cancellation Easy and few steps to cancel the tickets. The money will be automatically refunded in the bank account. Specified at the time of reservation. The history of reservation is maintained.

21

Page 22: OOAD LAB

TICKET RESERVATION SYSTEM

USECASE DIAGRAM:

USER DETAILS

TRAIN MASTER DETAILS

RESERVATION/CANCELLATION

CHECK AVAILABILITY

ADMIN

CONFIRMATION

USER

CLASS DIAGRAM:

22

Page 23: OOAD LAB

ADMIN1

ADMINID : INT

VERIFICATION()ALLOTMENT()CANCELLATION()

DATABASE

TRAINNO : INTCUSTOMERNAME : STRINGTIMING : DATEAVAILABLESEAT : INT

CHECKING()UPDATE()

CLIENT

NAME : STRINGPLACE : STRINGTIMING : DATE

RESERVATION()CANCELLATION()

SEQUENCE DIAGRAM:

23

Page 24: OOAD LAB

ADMIN USER DATABASE

USER ENQUIRY

RESERVATION

CHECK AVAILABILITY

NO OF SEATS

ALLOTMENT

CONFIRMATION

UPDATION OF SEATS

COLLABORATION DIAGRAM:

24

Page 25: OOAD LAB

ADMIN USER

DATABASE

3: CHECK AVAILABILITY7: UPDATION OF SEATS

4: NO OF SEATS

1: USER ENQUIRY2: RESERVATION6: CONFIRMATION

5: ALLOTMENT

25

Page 26: OOAD LAB

VB SOURCE CODEForm1.frm:Private Sub Command1_Click()If Combo1.Text = "" ThenMsgBox "Choose a Train"ElseForm2.ShowForm1.HideEnd IfEnd Sub

Private Sub Form_Load()Combo1.AddItem "Pallavan"Combo1.AddItem "Vaigai"Combo1.AddItem "Hawra"Combo1.AddItem "Valluvan"Combo1.AddItem "Theni"End SubForm2.frm:Private Sub Command1_Click()Form3.ShowForm2.HideEnd Sub

Private Sub Command2_Click()Form4.ShowForm2.HideEnd Sub

Private Sub Command3_Click()Form5.ShowForm2.HideEnd Sub

Private Sub Command4_Click()EndEnd Sub

Private Sub Command5_Click()Form1.ShowForm2.HideEnd Sub

26

Page 27: OOAD LAB

Private Sub Form_Load()Text1.Text = Form1.Combo1.TextIf Text1.Text = "Pallavan" ThenForm2.Text2.Text = "10.00"Form2.Text3.Text = "10.30"ElseIf Text1.Text = "Vaigai" ThenForm2.Text2.Text = "18.00"Form2.Text3.Text = "18.30"ElseIf Text1.Text = "Hawra" ThenForm2.Text2.Text = "12.30"Form2.Text3.Text = "13.00"ElseIf Text1.Text = "Valluvan" ThenForm2.Text2.Text = "14.00"Form2.Text3.Text = "16.30"ElseIf Text1.Text = "Theni" ThenForm2.Text2.Text = "19.00"Form2.Text3.Text = "23.00"End IfData1.RefreshData1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Trim(Text1.Text) ThenText4.Text = Data1.Recordset.Fields(3)Text5.Text = Data1.Recordset.Fields(4)End IfData1.Recordset.MoveNextLoopEnd SubForm3.frm:Dim a, b, c As Integer

Private Sub Command2_Click()Form3.HideForm2.ShowEnd Sub

Private Sub Command1_Click()a = Data1.Recordset.RecordCountData1.RefreshData1.Recordset.AddNewData1.Recordset.Fields(0) = Text1.TextData1.Recordset.Fields(1) = Text2.TextIf b = 1 Then

27

Page 28: OOAD LAB

Data1.Recordset.Fields(2) = Option1.CaptionElseIf b = 2 ThenData1.Recordset.Fields(2) = Option2.CaptionEnd IfData1.Recordset.Fields(3) = Text3.TextIf c = 1 ThenData1.Recordset.Fields(4) = Option3.CaptionElseIf c = 2 ThenData1.Recordset.Fields(4) = Option4.CaptionEnd IfData1.Recordset.Fields(6) = Form2.Text1.Texta = a + 1Data1.Recordset.Fields(5) = aData1.Recordset.UpdateMsgBox "your Seat Reserved"MsgBox a, , "YOUR CODE"End Sub

Private Sub Option1_Click()b = 1End Sub

Private Sub Option2_Click()b = 2End Sub

Private Sub Option3_Click()c = 1End Sub

Private Sub Option4_Click()c = 2End Sub

Form4.frm:Dim a As Boolean

Private Sub Command1_Click()a = FalseData1.RefreshData1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Trim(Text1.Text) ThenIf Data1.Recordset.Fields(5) = Trim(Text2.Text) Then

28

Page 29: OOAD LAB

a = TrueFrame1.Visible = TrueText3.Text = Data1.Recordset.Fields(0)Text4.Text = Data1.Recordset.Fields(1)If Data1.Recordset.Fields(2) = Trim("Male") ThenOption1.Value = TrueOption2.Value = FalseElseIf Data1.Recordset.Fields(2) = Trim("Female") ThenOption2.Value = TrueOption1.Value = FalseEnd IfText5.Text = Data1.Recordset.Fields(3)If Data1.Recordset.Fields(4) = Trim("A/C") ThenOption4.Value = TrueOption3.Value = FalseElseIf Data1.Recordset.Fields(4) = Trim("Ordinary") ThenOption4.Value = FalseOption3.Value = TrueEnd IfEnd IfEnd IfData1.Recordset.MoveNextLoopIf Not a ThenMsgBox "You didnot reserve any seats"End IfEnd Sub

Private Sub Command2_Click()Form3.ShowForm4.HideEnd Sub

Form5.frm:Dim a As BooleanPrivate Sub Command1_Click()a = FalseData1.RefreshData1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Text1.Text = Data1.Recordset.Fields(0).Value And Text1.Text = Data1.Recordset.Fields(5).Value Thena = TrueMsgBox "Record found.Do u want to cancel the ticket", vbOKCancel

29

Page 30: OOAD LAB

Data1.Recordset.DeleteData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopIf Not a ThenMsgBox "Ticket cancelled"End IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

OUTPUT FORMS

Train Select ion : (Form1.frm)

Train Timings : (Form2.frm)

30

Page 31: OOAD LAB

Reservat ion : (Form3.frm)

31

Page 32: OOAD LAB

Cancel lat ion : (Form5.frm)

32

Page 33: OOAD LAB

Conf irmat ion : (Form4.frm)

33

Page 34: OOAD LAB

RESULT: Thus the Ticket reservation system was developed by using visual basic in front end and MS-Access in back end.

34

Page 35: OOAD LAB

STUDENT’S INFORMATION

SYSTEM

35

Page 36: OOAD LAB

STUDENT’S INFORMATION SYSTEM

INTRODUCTION:

GOAL:Software development process involves four modules

analysis,designing,coding and testing of the software.Our goal is to develop software for storing student’s information,which we have named as student’s information system.

OBJECTIVE:Our objective is to first understand the software to be developed,analyze

the process and finally implement the concepts to develop software along with the considerations for various user levels,to provide a secured and a reliable software to store the details of the student’s studying in our institution.

INFORMATION DESCRIPTION:

DETAILED DESCRIPTION:In this project development,we will have a database as a back end to store

the details of the student’s,which will include,

1.Student name2.Register number3.Department4.Year5.Address & ph.no6.Marks

We will have three different user:administrators,staff and student’s.They will be provided with different access levels.

The administrator will be allowed to ADD,EDIT AND VIEW the student’s information.The staff members will be allowed to EDIT AND

VIEW student’s records.The students will be allowed only to VIEW the records.

HARDWARE DESCRIPTION:

36

Page 37: OOAD LAB

1. Intel Motherboard with Pentium Processor 2. RAM 256MB(minimum) 3. Hard disk 40GB(minimum)

SOFTWARE DESCRIPTION:

Microsoft VisualBasic6.0 Microsoft Access Rational Rose

FUNCTIONAL DESCRIPTION:

PERFORMANCE CHARACTERISTICS:

In this project,the users will be students,staff members and administrators.The operations involved will be

Addition of records Edition of records Deletion of records Viewing of records

The supreme access will be provided to the administrator who will be allowed to perform all the operations.

DATABASE REQUIREMENTS:

We will use MS Access as a back end to store our information.The database will be linked in the forms created using VB.

NON-FUNCTIONAL DESCRIPTION:

RELIABILITY:

The software is designed considering the reliability of ATM system.

AVAILABILITY:

This software will be available to all the users inside the campus.

SECURITY:

37

Page 38: OOAD LAB

This software will provide a good security by providing authentication.The users are allowed to access the database after their user id and password gets authenticated.

MAINTAINABILITY:

Easier to maintain and update the database.STUDENT MARK ANALYSIS SYSTEM

USECASE DIAGRAM:

authentication

student

percalculationadmin

reports

student1

38

Page 39: OOAD LAB

CLASS DIAGRAM:

student

name : stringregno : intdepartment : stringyear : intbatch : intdob : dateaddress : stringphoneno : int

student detail()

report

totalmarks : intpercentage : intstudentmarks(each) : intstudent marks : int

report()

percalculation

pass : stringfail : stringdestination : stringfirstclass : stringsecondclass : string

result()

admin1

userid : stringpwd : string

authentication()

marks

subject name : stringmarks : intstudent name : string

markdetail()

39

Page 40: OOAD LAB

SEQUENCE DIAGRAM:

40

Page 41: OOAD LAB

41

Page 42: OOAD LAB

COLLABORATION DIAGRAM:

ADMIN db

student

2: check7: search9: calculate

1: user id & password6: mark analysis

3: checking status8: mark analysis

4: enter reg no10: report

5: reg no

42

Page 43: OOAD LAB

VB SOURCE CODELogin : (Form1.frm)

Private Sub Command1_Click()If Trim(Text1.Text) = "admin" And Trim(Text2.Text) = "sec" ThenForm2.ShowUnload MeElseIf Trim(Text1.Text) = "staff" And Trim(Text2.Text) = "sec" ThenForm3.ShowUnload MeElseIf Trim(Text1.Text) = "student" And Trim(Text2.Text) = "cse" ThenForm4.ShowUnload MeElseMsgBox "Check username & password"End IfEnd IfEnd IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

Details : (Form2.frm)Private Sub Command1_Click()Data1.Recordset.AddNewData1.Recordset.Fields(0) = Text1.TextData1.Recordset.Fields(1) = Text2.TextData1.Recordset.Fields(2) = Text3.TextData1.Recordset.Fields(3) = Text4.TextData1.Recordset.Fields(4) = Text5.TextData1.Recordset.Fields(5) = Text6.TextData1.Recordset.UpdateMsgBox "RECORD ADDED"End SubPrivate Sub Command2_Click()Dim b As StringData1.Recordset.MoveFirsta = FalseDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Trim(Text1.Text) ThenMsgBox "RECORD FOUND"a = TrueMsgBox "Are you sure want to delete", vbOKCancelIf vbOK Then

43

Page 44: OOAD LAB

Data1.Recordset.DeleteMsgBox "RECORD DELETED"Form2.ShowElseIf vbCancel ThenForm2.ShowEnd IfExit DoEnd IfData1.Recordset.MoveNextLoopIf Not a ThenMsgBox "RECORD NOT FOUND"End IfEnd Sub

Private Sub Command3_Click()Form4.ShowUnload MeEnd Sub

Private Sub Command4_Click()EndEnd SubPrivate Sub Form_Load()Dim a As BooleanEnd Sub

Search : (Form4.frm)Private Sub Command1_Click()Data1.Refreshfnd = FalseData1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFfnd = TrueIf Data1.Recordset.Fields(0) = Trim(Text1) ThenFrame2.Visible = TrueText3.Text = Data1.Recordset.Fields(2)Text4.Text = Data1.Recordset.Fields(3)Text5.Text = Data1.Recordset.Fields(4)Text6.Text = Data1.Recordset.Fields(5)End IfData1.Recordset.MoveNextLoopIf Not fnd ThenMsgBox "CHECK NAME AND NO"End IfEnd SubPrivate Sub Command2_Click()EndEnd Sub

44

Page 45: OOAD LAB

OUTPUT FORMSL o g i n : ( F o r m 1 . f r m )

D e t a i l s : ( F o r m 2 . f r m )

45

Page 46: OOAD LAB

S e a r c h : ( F o r m 4 . f r m )

46

Page 47: OOAD LAB

RESULT: Thus the Student information system was developed by using visual basic

in front end and MS-Access in back end.

47

Page 48: OOAD LAB

PAYROLL SYSTEM

PAYROLL SYSTEMAIM: To develop the payroll system by using visual basic as front end and MS-access as back end.

PROGRAM ANALYSIS AND PROJECT PLANNING

PURPOSE:

48

Page 49: OOAD LAB

The purpose of the program analysis and project planning is to fully describe the functionality of payroll system identified and it also describe non-functional requirements and design control and other factors.

PROJECT SCOPE: The program analysis and project planning applies to the payroll system.Initially the project is going to be implement interact level and later the organization has an idea to upgrade in internet level the project merit include this project might suppresses the complication in calculating payroll for human resources in large organization.

OBJECTIVES: Easy to use More robust To reduce the manual operation in calculating the payroll

HARDWARE REQUIREMENTS: 1)Intel Motherboard with Pentium Processor2)RAM 256MB(minimum)3)Hard disk 40GB(minimum)

SOFTWARE REQUIREMENTS:1)Microsoft VisualBasic6.02)Microsoft Access3) Rational Rose

SOFTWARE REQUIRMENT ANALYSIS: The following sub sections describe the usage of the payroll system.There are three modules.

Use entry Verification of password Employee salary calculation

INTENDED AUDIENCE: Employee Administrator

PRODUCT FUNCTIONS: Here short briefing on payroll system.It has the following four modules.The modules are:-

1. USER ENTRY: The user has to provide the user name and the pin number.The pin is the four digit number which is also called a secret key known to the user.

49

Page 50: OOAD LAB

2.VERIFICATION OF PASSWORD: The password is matched with one already present in the data base is the password is scanned.If the password is correct the user is logged in else the false message is generated.

3. EMPLOYEE SALARY CALCULATION: In the database, name of the each employee will be stored with all needed informations.Depending upon that information the salary will be calculated for employee.

PAYROLL SYSTEM

USECASE DIAGRAM:

50

Page 51: OOAD LAB

employees database

salary calculation

authentication

clerk

manager

account officer

reports

employee

51

Page 52: OOAD LAB

CLASS DIAGRAM:

employee database

emp nameemp iddate of joinattendance

loan()p.f()loss of pay()

accountofficer1

verify emp id & pwd

verification()

manager1

verify emp id & pwd

verification()

clerk1

attendanceemp id

salary calculation()employee database()

reports

pay slipmain slip

salary calcutaion()

SEQUENCE DIAGRAM:

52

Page 53: OOAD LAB

53

Page 54: OOAD LAB

COLLABORATION DIAGRAM:

user reports

database

salary calculation

2: checking for valid id4: update monthly details

5: if id is valid

9: cal sal details12: pay slip generation

13: display the pay slip

1: check emp id6: monthly attendance

14: logout database

3: user is authenticated15: logout successfully

7: request for monthly details10: update the salary in monthly

8: read monthly details database

11: transfer the salary

54

Page 55: OOAD LAB

VB SOURCE CODE

Login Form : (Form1.frm)

Private Sub Command1_Click()If (Text1.Text = "admin" And Text2.Text = "sec") ThenForm2.ShowElseMsgBox "Please enter the correct username and pwd"End IfEnd Sub

Private Sub Command2_Click()Text1.Text = ""Text2.Text = ""End Sub

Choice Form : (Form2.frm)

Private Sub Command1_Click()Form3.ShowUnload MeEnd Sub

Private Sub Command2_Click()Form3.Visible = FalseEnd Sub

Payslip : (Form3.frm)

Private Sub Command1_Click()Data1.Recordset.MoveFirstFor i = 0 To Data1.Recordset.RecordCount - 1If Text1.Text = Data1.Recordset.Fields(5) ThenFrame1.Visible = TrueText2.Text = Data1.Recordset.Fields(0)Text3.Text = Data1.Recordset.Fields(1)Text4.Text = Data1.Recordset.Fields(2)Text5.Text = Data1.Recordset.Fields(3)Text6.Text = Data1.Recordset.Fields(4)Text8.Text = Data1.Recordset.Fields(5)Text9.Text = Data1.Recordset.Fields(6)Text10.Text = Data1.Recordset.Fields(7)

55

Page 56: OOAD LAB

Text11.Text = Data1.Recordset.Fields(8)Text12.Text = Data1.Recordset.Fields(9)End If

Data1.Recordset.MoveNextNextEnd Sub

Private Sub Command2_Click()Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""End Sub

Private Sub Command3_Click()Text7.Text = ((Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)) - (Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text)))End Sub

56

Page 57: OOAD LAB

OUTPUT FORM

Login Form : (Form1.frm)

Choice : (Form2.frm)

57

Page 58: OOAD LAB

PaySlip : (Form3.frm)

58

Page 59: OOAD LAB

RESULT: Thus the Payroll system was developed by using visual basic in front end and MS-Access in back end.

59

Page 60: OOAD LAB

LIBRARY INFORMATION

SYSTEM

60

Page 61: OOAD LAB

LIBRARY INFORMATION SYSTEM

INTRODUCTION:

GOAL:

The main goal of library information system is to view all the information about the books as well as information relevant to the library.

OBJECTIVE:

Our objective is to create library information system,which consists of modules each of which performs its own function efficiently.

INFORMATION DESCRIPTION:

DETAILED DESCRIPTION:

Basically the users of the library information system are categorized into two groups.They are Administrator and User. Administrator is the one who has the control over the whole system.He can add,delete,view information as well as borrow some books.The password control separates him from other users. The user can only view the information about the books and borrow books from the library for certain period of time if he has enough library cards.After that period he has to return those books back to the library to avoid fine.

HARDWARE DESCRIPTION:

1. Intel Motherboard with Pentium Processor 2. RAM 256MB(minimum) 3. Hard disk 40GB(minimum)

SOFTWARE DESCRIPTION:

7. Microsoft VisualBasic6.08. Microsoft Access9. Rational Rose

61

Page 62: OOAD LAB

INTERFACE DESCRIPTION:

To interact with the system the user has to have certain things.Username,Password,Bookname,etc.The Username is unique all over the system.The password separates the user from the administrator.To view the information certain attributes has to be given like Bookname etc.FUNCTIONAL DESCRIPTION:

PERFORMANCE CHARACTERISTICS:

The overall performance of the system mainly depends upon the server,Network and the managing data resources.To achieve higher performance the speed of the server and the Network must be greater. Also we have to manage the database efficiently.

DATABASE REQUIREMENTS:

For the library information system we have to maintain two separate databases,one for storing Username and the Password and the other for book details.The first database must have two columns and the other must have at least five columns.We use MS Access to create those databases.

NON-FUNCTIONAL REQUIREMENTS:

AVAILABILITY:

The software consists of separate modules for the administrator to add,delete information about the books.

SECURITY:

The whole data in the system is password protected;no one can access that information without rights. Only user and admininstrator can access that information.

BEHAVIOURAL DESCRIPTION:

The user can login to the system and can view the information about the books,by giving any one of attributes.The result will be displayed separately.The administrator can login to the system and view the information about the books and he can add or delete the book details to the system.Also he can issue books and cards also by verifying the ID.

62

Page 63: OOAD LAB

LIBRARY MANAGEMENT SYSTEM

USECASE DIAGRAM:

authentication

specification of book

make reservation

user

remove reservation

lend book

return book

librarian 1

63

Page 64: OOAD LAB

CLASS DIAGRAM:

member

mem id : stringname : string

new mem()remove mem()request()book name()

item

book id : stringavailability : booleanlss date : date

new book()remove book()return book()reneval()

title

b.title : stringb.ld : intaythor : stringcopies : intrescopies : intremcopies

new title()rem title()add()

admin

validate()

64

Page 65: OOAD LAB

SEQUENCE DIAGRAM:

65

Page 66: OOAD LAB

member librariyan server

enter reg no

type of req

take book

book name

check

check

success

book is reserved

terminate

COLLBORATION DIAGRAM:

66

Page 67: OOAD LAB

member

librariyan

server

6: check

1: enter reg no3: take book9: terminate

2: type of req4: book name

8: book is reserved

5: check

7: success

VB SOURCE CODE

67

Page 68: OOAD LAB

Form1.frm

Private Sub Command1_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOF If Data1.Recordset.Fields(0) = Text1 And Data1.Recordset.Fields(1) = Text2 Then i = 1 Form2.Show Unload Me Else Exit Do End If Data1.Recordset.MoveNext Loop If Not (i = 1) Then MsgBox "error" End IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

Private Sub Form_Load()Dim i As IntegerEnd Sub

Form2.frm

Private Sub Command1_Click()Form3.ShowMe.HideEnd SubPrivate Sub Command2_Click()Form4.ShowMe.HideEnd Sub

Private Sub Command3_Click()Form5.ShowMe.HideEnd Sub

Private Sub FORM11_Click()

68

Page 69: OOAD LAB

Form1.ShowMe.HideEnd Sub

Form3.frm

Private Sub Command1_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOF If Data1.Recordset.Fields(0) = Text1 Then i = 1 Text2 = Data1.Recordset.Fields(0) Text3 = Data1.Recordset.Fields(2) End If Data1.Recordset.MoveNextLoopIf Not (i = 1) ThenMsgBox "BOOK IS NOT AVAILABLE"End IfEnd Sub

Private Sub Command2_Click()Dim i As IntegerJ = 0Data1.Recordset.MoveFirstWhile Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Text2 And Data1.Recordset.Fields(2) > 0 Then Data3.Recordset.AddNew J = 1 Data1.Recordset.Edit Data1.Recordset.Fields(2) = Data1.Recordset.Fields(2) - 1 Data3.Recordset.Fields(0) = Text2 Data3.Recordset.Fields(1) = Text4 Data3.Recordset.Fields(2) = Text2 Data3.Recordset.Fields(3) = Text5 Data3.Recordset.Fields(4) = Text6 Data1.Recordset.Update Data3.Recordset.Update MsgBox "GOT THE BOOK"End IfData1.Recordset.MoveNextWendIf Not J = 1 Then

69

Page 70: OOAD LAB

MsgBox "BOOK IS NOT AVAILABLE"End IfEnd Sub

Private Sub Command3_Click()Me.HideForm2.ShowEnd Sub

Private Sub Form_Load()Dim i As IntegerEnd Sub

Form4.frm

Private Sub Command1_Click()Data1.Recordset.MoveFirstWhile Not Data1.Recordset.EOFIf Text1 = Data1.Recordset.Fields(0) And Text6 = Data1.Recordset.Fields(1) Then Text2 = Data1.Recordset.Fields(1) Text3 = Data1.Recordset.Fields(2) Text4 = Data1.Recordset.Fields(4)End IfData1.Recordset.MoveNextWendEnd Sub

Private Sub Command2_Click()Data1.Recordset.MoveFirstWhile Not Data1.Recordset.EOFIf Text1 = Data1.Recordset.Fields(2) Then Data1.Recordset.Edit Text2 = Data1.Recordset.Fields(1) Text3 = Data1.Recordset.Fields(2) Text4 = Data1.Recordset.Fields(4) Data1.Recordset.Fields(3) = Text7 Data1.Recordset.Fields(4) = 10 + Data1.Recordset.Fields(3) Data1.Recordset.UpdateEnd IfData1.Recordset.MoveNextWendMsgBox "Book Renewed"End Sub

70

Page 71: OOAD LAB

Private Sub FORM13_Click()Me.HideForm2.ShowEnd Sub

Form5.frm

Private Sub Command1_Click()Dim J As IntegerJ = 0Data1.Recordset.MoveFirst While Not Data1.Recordset.EOF If Text1 = Data1.Recordset.Fields(2) And Text2 = Data1.Recordset.Fields(1) Then J = 1 Data1.Recordset.Edit Data1.Recordset.Delete MsgBox " Book Returned" End If Data1.Recordset.MoveNext WendData2.Recordset.MoveFirst While Not Data1.Recordset.EOF If Data2.Recordset.Fields(0) = Text1 Then Data2.Recordset.Edit Data2.Recordset.Fields(2) = Data1.Recordset.Fields(2) + 1 Data2.Recordset.Update End If Data2.Recordset.MoveNext Wend If Not J = 1 Then MsgBox "BOOK IS NOT AVAILABLE" End IfEnd Sub

Private Sub Command2_Click()Me.HideForm2.ShowEnd Sub

OUTPUT FORM

71

Page 72: OOAD LAB

Login Form : (Form1.frm)

Choice Form : (Form2.frm)

Borrow Book : (Form3.frm)

72

Page 73: OOAD LAB

Renewal : (Form4.frm)

73

Page 74: OOAD LAB

Return : (Form5.frm)

74

Page 75: OOAD LAB

75

Page 76: OOAD LAB

RESULT:Thus the Library information system was developed by using visual basic

in front end and MS-Access in back end.

76

Page 77: OOAD LAB

COURSE REGISTRATION

SYSTEM

77

Page 78: OOAD LAB

COURSE REGISTRATION SYSTEMAIM: To develop the course registration system by using visual basic as front end and MS-access as back end.

PROGRAM ANALYSIS AND PROJECT PLANNING

PURPOSE: The purpose of the program analysis and project planning is to fully describe the functionality of course registration system identified and it also describe non-functional requirements and design control and other factors.

PROJECT SCOPE: The program analysis and project planning applies to the course registration system.Initially the project is going to be implement interact level and later the organization has an idea to upgrade in internet level the project merit include this project might suppresses the complication in manual course registration.

OBJECTIVES: It reduces the workload of institutions and students,by the system

registration will not offer the physical appearance of the applier. It consumes more time.

HARDWARE REQUIREMENTS: 4. Pentium Processor5. Intel Motherboard6. RAM 256MB(minimum)7. Hard disk 40GB(minimum)

SOFTWARE REQUIREMENTS:10. Microsoft VisualBasic6.011. Microsoft Access12. Rational Rose

SOFTWARE REQUIRMENT ANALYSIS: The following sub sections describe the usage of the payroll system.There are five modules.

Use entry

78

Page 79: OOAD LAB

Verification of password Student details Select the college Select the desired course

INTENDED AUDIENCE:

Student Administrator

PRODUCT FUNCTIONS:

Here short briefing on course registration.It has the following five modules. The modules are:-

1. USER ENTRY: The user has to provide the user name and the pin number.The pin is the four digit number, which is also called a secret key known to the user.

2.VERIFICATION OF PASSWORD: The password is matched with one already present in the data base is the password is scanned.If the password is correct the user is logged in else the false message is generated.

3. STUDENT DETAILS: The student will enter their personal details and their academic details.Depending upon that information the desired college and course will be registered for each student. 4.COLLEGE DETAILS: Using the database,name of each college will be stored and displayed.

5.COURSE DETAILS:

Available course in each college will be displayed.

79

Page 80: OOAD LAB

COURSE REGISTRATION SYSTEM

USECASE DIAGRAM:

available course

seat details

database manager

registration course selection

student details

universityupdate

college details

student

80

Page 81: OOAD LAB

CLASS DIAGRAM:

student details

name : stringreg no : integermark : integeraddress : string

check the name()

student database

name : stringaddress : stringcollege name : stringdept : stringgender : string

update()

college details

name : stringlocation : stringdept : stringtotal seats : integeravailable details : integer

store the data()decreace seats()

user to login

name : stringpassword : string

user login with name and password()

login check

name : stringpassword : string

check the name and password()

81

Page 82: OOAD LAB

SEQUENCE DIAGRAM:

82

Page 83: OOAD LAB

83

Page 84: OOAD LAB

COLLABORATION DIAGRAM:

student university

college

9: check the status of the student

1: enter the user name and password3: send details

5: enter the name

2: enter the mark4: enter the college name

6: verify the college

10: update student details

7: send college details0

8: select the college and department

VB SOURCE CODEForm1.frm:

84

Page 85: OOAD LAB

Private Sub Command1_Click()If Trim(Text1.Text) = "admin" And Trim(Text2.Text) = "sec" ThenFrame1.Visible = TrueElseMsgBox "enter valid id"End IfEnd Sub

Private Sub Command2_Click()If Text3.Text = " " Or Text4.Text = " " Or Text5.Text = " " ThenMsgBox "enter details "ElseForm2.ShowEnd IfForm2.Text1.Text = Text3.TextForm2.Text2.Text = Text4.TextForm2.Text3.Text = Text5.TextEnd Sub

Private Sub Command3_Click()EndEnd Sub

Private Sub Form_Load()Me.Left = 250Me.WindowState = 2End Sub

Form2.frm:Private Sub Combo1_Click()Select Case (Combo1.ListIndex)Case 0Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = "sudharsan engineering college" ThenCall infoEnd IfData1.Recordset.MoveNextLoopCase 1Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = "JJ college of engineering" ThenCall infoEnd IfData1.Recordset.MoveNext

85

Page 86: OOAD LAB

LoopCase 2Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = "PSNA engineering college" ThenCall infoEnd IfData1.Recordset.MoveNextLoopCase 3Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = "CIT engineering college" ThenCall infoEnd IfData1.Recordset.MoveNextLoopCase 4Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = "GUINDY engineering college" ThenCall infoEnd IfData1.Recordset.MoveNextLoopEnd SelectEnd Sub

Private Sub Form_Load()Me.WindowState = 2End Sub

Public Sub info()Text4.Text = Data1.Recordset.Fields(0).ValueText5.Text = Data1.Recordset.Fields(1).ValueText6.Text = Data1.Recordset.Fields(2).ValueText7.Text = Data1.Recordset.Fields(3).ValueText8.Text = Data1.Recordset.Fields(4).ValueText9.Text = Data1.Recordset.Fields(5).ValueText10.Text = Data1.Recordset.Fields(6).ValueText11.Text = Data1.Recordset.Fields(7).ValueText12.Text = Data1.Recordset.Fields(8).ValueText13.Text = Data1.Recordset.Fields(9).ValueText14.Text = Data1.Recordset.Fields(10).ValueText15.Text = Data1.Recordset.Fields(11).Value

86

Page 87: OOAD LAB

Text16.Text = Data1.Recordset.Fields(12).ValueText17.Text = Data1.Recordset.Fields(13).ValueText18.Text = Data1.Recordset.Fields(14).ValueText19.Text = Data1.Recordset.Fields(15).ValueEnd Sub

Private Sub Text10_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText10.Text = Val(Text10.Text) - 1Data1.Recordset.Fields(6).Value = Text10.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "it"End Sub

Private Sub Text11_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText11.Text = Val(Text11.Text) - 1Data1.Recordset.Fields(7).Value = Text11.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "it"End Sub

Private Sub Text12_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText12.Text = Val(Text12.Text) - 1Data1.Recordset.Fields(8).Value = Text12.TextData1.Recordset.UpdateEnd If

87

Page 88: OOAD LAB

Data1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "it"End Sub

Private Sub Text13_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText13.Text = Val(Text13.Text) - 1Data1.Recordset.Fields(9).Value = Text13.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "it"End Sub

Private Sub Text14_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText14.Text = Val(Text14.Text) - 1Data1.Recordset.Fields(10).Value = Text14.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text15_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText15.Text = Val(Text15.Text) - 1Data1.Recordset.Fields(11).Value = Text15.TextData1.Recordset.UpdateEnd If

88

Page 89: OOAD LAB

Data1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text16_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText16.Text = Val(Text16.Text) - 1Data1.Recordset.Fields(12).Value = Text16.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text17_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText17.Text = Val(Text17.Text) - 1Data1.Recordset.Fields(13).Value = Text17.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text18_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText18.Text = Val(Text18.Text) - 1Data1.Recordset.Fields(14).Value = Text18.TextData1.Recordset.UpdateEnd If

89

Page 90: OOAD LAB

Data1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text19_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText19.Text = Val(Text19.Text) - 1Data1.Recordset.Fields(15).Value = Text19.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "eee"End Sub

Private Sub Text5_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText5.Text = Val(Text5.Text) - 1Data1.Recordset.Fields(1).Value = Text5.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "cse"End Sub

Private Sub Text6_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText6.Text = Val(Text6.Text) - 1Data1.Recordset.Fields(2).Value = Text6.TextData1.Recordset.UpdateEnd If

90

Page 91: OOAD LAB

Data1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "cse"End Sub

Private Sub Text7_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText7.Text = Val(Text7.Text) - 1Data1.Recordset.Fields(3).Value = Text7.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "cse"End Sub

Private Sub Text8_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText8.Text = Val(Text8.Text) - 1Data1.Recordset.Fields(4).Value = Text8.TextData1.Recordset.UpdateEnd IfData1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "cse"End Sub

Private Sub Text9_Click()Data1.Recordset.MoveFirstDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0).Value = Combo1.Text ThenData1.Recordset.EditText9.Text = Val(Text9.Text) - 1Data1.Recordset.Fields(5).Value = Text9.TextData1.Recordset.UpdateEnd If

91

Page 92: OOAD LAB

Data1.Recordset.MoveNextLoopForm3.ShowForm3.Text2.Text = "it"End Sub

OUTPUT FORMS

Login Form : (Form1.frm)

92

Page 93: OOAD LAB

Course Details : (Form2.frm)

93

Page 94: OOAD LAB

Acknowledgement Form : (Form3.frm)

94

Page 95: OOAD LAB

95

Page 96: OOAD LAB

RESULT:

Thus the Course registration system was developed by using visual basic in front end and MS-Access in back end.

96

Page 97: OOAD LAB

STOCK MAINTENANCE

SYSTEM

97

Page 98: OOAD LAB

STOCK MAINTENANCE SYSTEM

AIM To develop the stock maintenance project. It can be used to maintain the details about a stock contained by some company.

PROJECT DESCRIPTION Stock maintenance project mainly used to store the stock details and retrieve the data. Stock entry forms are used to update the databases. The sale form can be used to view the sales details. The company return form can be used to show the details of defective products. Item details can be used to show the current status of the stock. The exit buttons closes the forms of the project.

HARDWARE REQUIREMENTS

Pentium IV Processor Intel Motherboard RAM(256 MB) HARD DISK(20GB)

SOFTWARE REQUIREMENTS

Rational Rose Microsoft VB 6.0 MS-Access

MODULES

Authentication Stock entry Sales Details Order Details Item Details

MODULE DESCRIPTION

1. Authentication Get the username and password validate it accordingly. 2. Stock Entry Product purchased details are entered through this form. It can be used to enter the item code name, bought cost, company name and no. of items. The data is then stored in the database.

98

Page 99: OOAD LAB

3. Stock Details In this module its used to store the sales product details and also show the sales details.

4. Order Details

Order details form can be used to generate orders and view previous stored order details.

5. Item Details

Show the current details of the stock details.

NON FUNCTIONALITY

SECURITY

It is a source project because it contains user id and password.

MAINTAINABILITY

Authorized user only can access it, thus it is easily maintainable.

AVAILABILITY

It is available for all type of companies (i.e.) large scale or small scale.

FLEXIBILITY

It is a user friendly project. More modules can be easily added, thus it is quite flexible.

99

Page 100: OOAD LAB

STOCK MAINTANANCE SYSTEM

UseCase Diagram:

Authentication

Item

Purchase details

Delivery report

User

Quality remaining

User

Class Diagram:

Purchase

ordernumorderdatewholesaleretailpurchasecustomer detail

purchased details()

Admin

unamepwd

authentication()

delivery report

datetime

delivery()

item

inameinocostquantitydiscountbrand

item details()

Quantity

balance()

100

Page 101: OOAD LAB

Sequence Diagram:

admin stock user

username and password

check

checking status

order the item

checking for the order

processing

report the order

delivery status

101

Page 102: OOAD LAB

Collaboration Diagram:

admin stock

user

2: check6: processing

1: username and password5: checking for the order

3: checking status7: report the order

8: delivery status 4: order the item

102

Page 103: OOAD LAB

VB SOURCE CODEForm1.frm

Private Sub Command1_Click() If (Text1.Text = "Ramesh" And Text2.Text = "sec") Then Unload Me Form11.Show Else MsgBox "Wrong Password" End IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

Form11.frmPrivate Sub Command1_Click()

Form111.ShowForm11.Visible = FalseEnd Sub

Private Sub Command2_Click()Form112.ShowForm11.Visible = FalseEnd Sub

Private Sub Command3_Click()Form113.ShowForm11.Visible = FalseEnd Sub

Private Sub Command4_Click()Form2.ShowForm11.Visible = FalseEnd Sub

Private Sub Command5_Click()Form8.ShowForm2.Visible = FalseEnd Sub

103

Page 104: OOAD LAB

Form111.frmPrivate Sub Command1_Click()MsgBox ("ADD DATA")Data1.Recordset.MoveLastData1.Recordset.AddNewData1.Recordset.Fields(0) = Form111.Text1.TextData1.Recordset.Fields(1) = Form111.Text2.TextData1.Recordset.Fields(2) = Form111.Text3.TextData1.Recordset.Fields(3) = Form111.Text4.TextData1.Recordset.Fields(4) = Form111.Text5.TextData1.Recordset.UpdateEnd Sub

Private Sub Command2_Click()Data1.Recordset.DeleteData1.Recordset.MoveNextMsgBox ("DATA DELETED")End Sub

Private Sub Command3_Click()Data1.RefreshEnd Sub

Private Sub Command4_Click()Data1.UpdateRecordData1.Recordset.Bookmark = Data1.Recordset.LastModifiedMsgBox ("DATA UPDATE")End Sub

Private Sub Command5_Click()Form11.ShowForm111.HideEnd Sub

Form112.frmPrivate Sub Command1_Click()MsgBox ("ADD DATA")Data1.Recordset.AddNewData1.Recordset.Fields(0) = Form112.Text1.TextData1.Recordset.Fields(1) = Form112.Text2.TextData1.Recordset.Fields(2) = Form112.Text3.TextData1.Recordset.Fields(3) = Form112.Text4.TextData1.Recordset.Fields(4) = Form112.Text5.TextData1.Recordset.UpdateEnd SubPrivate Sub Command2_Click()

104

Page 105: OOAD LAB

Form11.ShowMe.HideEnd Sub

Private Sub Command3_Click()Form112.Text1.Text = ""Form112.Text2.Text = ""Form112.Text3.Text = ""Form112.Text4.Text = ""Form112.Text5.Text = ""End Sub

Form113.frmPrivate Sub Command2_Click()Data1.Recordset.DeleteData1.Recordset.MoveNextMsgBox ("DATA DELETED")End Sub

Private Sub Command3_Click()Data1.RefreshEnd Sub

Private Sub Command4_Click()Data1.UpdateRecordData1.Recordset.Bookmark = Data1.Recordset.LastModifiedMsgBox ("DATA UPDATED")End Sub

Private Sub Command5_Click()Form2.ShowForm1.Text1 = " "Form1.Text2 = " "End Sub

Private Sub Command6_Click()MsgBox ("ADD DATA")Data1.Recordset.AddNewData1.Recordset.Fields(0) = Form113.Text1.TextData1.Recordset.Fields(1) = Form113.Text2.TextData1.Recordset.Fields(2) = Form113.Text3.TextData1.Recordset.Fields(3) = Form113.Text4.TextData1.Recordset.Fields(4) = Form113.Text5.TextData1.Recordset.Fields(5) = Form113.Text6.TextData1.Recordset.Fields(6) = Form113.Text7.TextData1.Recordset.Update

105

Page 106: OOAD LAB

End SubForm2.frm

Private Sub Command1_Click()Form21.ShowForm11.HideEnd Sub

Private Sub Command2_Click()Form22.ShowForm11.HideEnd Sub

Private Sub Command3_Click()Form11.ShowForm22.HideEnd Sub

Form21.frmPrivate Sub Command1_Click()Data1.Recordset.MoveLastData1.Recordset.AddNewData1.Recordset.Fields(0) = Text1.TextData1.Recordset.Fields(1) = Text2.TextData1.Recordset.Fields(2) = Text3.TextData1.Recordset.Fields(3) = Text4.TextData1.Recordset.Fields(4) = Text5.TextData1.Recordset.UpdateData1.Recordset.MoveNext

MsgBox "ordered"End Sub

Private Sub Command2_Click()Form2.ShowForm21.HideEnd Sub

Form22.frm

Private Sub Command2_Click()Form2.ShowForm22.HideEnd Sub

106

Page 107: OOAD LAB

OUTPUT FORM

Login Form : (Form1.frm)

Choice : (Form11.frm)

107

Page 108: OOAD LAB

Items : (Form111.frm)

Ordered Items : (Form112.frm)

108

Page 109: OOAD LAB

Order Items : (Form21.frm)

Ordered Delivery System : (Form2.frm)

109

Page 110: OOAD LAB

Results: Thus Stock maintenance project was successfully completed.

110

Page 111: OOAD LAB

ATM SYSTEM

111

Page 112: OOAD LAB

ATM SYSTEM

INTRODUCTION:

GOAL: Software development process involves four modules: analysis,designing,coding and testing of the software.Our goal is to develop software for ATM system interaction,which is available to all users.this ATM system is easy to access and is available all over India with 24 hours of service.

OBJECTIVE:

Our objective is to understand the software to be developed,analyze the process and finally implement the concepts to develop software.The primary objective is to implement ATM system. 1.only bank clients can access ATM with their card. 2.Others users are not allowed to access ATM.

INFORMATION DESCRIPTION:

DETAILED DESCRIPTION:

The client must be able to deposit amount to and withdraw amount from their account using ATM system.Each transaction must be recorded and the client must be able to review all transaction performed against given amount.

When the client inserts the ATM card,the approval process is enabled.The system asks to enter the pin code.If code is valid,the client’s account is available.If the code is invalid,an appropriate message is displayed to the client.

When the client’s account is available,the screen displays four features for the client.One is to check the transaction made.Second to deposit amount.Third is to withdraw amount and the final option is to save the transaction.

112

Page 113: OOAD LAB

The client may need to deposit the amount and select this feature.This feature gets input from the client.It asks for the amount to be deposited and the deposit is in the way of cash.

The client can also withdraw the amount. The withdraw amount screen asks for the amount to be withdrawn. This verifies the amount to check whether the amount is available or not.If it is available,it asks to eject cash and perform ejection.If it is not available,then the appropriate message is displayed.

The client then,can save the transaction.The system creates the record of the transaction.This is made whenever amount is deposited or withdrawn.A printed slip is ejected for the client to know about their transaction.

The client can also check the transaction.The system displays the account information and the transaction history.The client can also have a print of account information.

After the client’s transaction is over,he/she requests to eject the card.The ATM system process is over.

HARDWARE DESCRIPTION:

1. Intel Motherboard with Pentium Processor 2. RAM 256MB(minimum) 3. Hard disk 40GB(minimum)

SOFTWARE DESCRIPTION:

13. Microsoft VisualBasic6.014. Microsoft Access15. Rational Rose

INTERFACE DESCRIPTION:

We will design a user interface,which will be user interactive and will be designed in such a way that it will get all the required details and will check for validation.After authentication,the access will be given to the users.

FUNCTIONAL DESCRIPTION:

PERFORMANCE CHARACTERISTICS:

The ATM system is designed for clients will allow withdrawal of up to Rs.15,000/=only.The amount exceeding that will not be allowed.Transaction slip will give the details of account balance,account number and last date of transaction.

113

Page 114: OOAD LAB

DATABASE REQUIREMENTS:

A database required for ATM system that include client name,account number,pin number,balance,transaction and last transaction.This is maintained by creating a database in MS Access.

NON- FUNCTIONAL REQUIREMENTS:

RELIABILITY:

Yes,the software is designed considering the reliability of the ATM system.

AVAILABILITY:

Yes, ATM system is made available for clients with 24-hour service all over India.

SECURITY:

Yes,ATM systems are more secured,as PIN numbers are known only to those clients who access it.

MAINTAINABILITY:

Yes,easier the maintenance and update the database.

114

Page 115: OOAD LAB

AUTOMATIC TELLER MACHINE

USECASE DIAGRAM:

user

Enter pin

Withdraw

Deposit

Checktransaction

atm

admin1 check

CLASS DIAGRAM:

115

Page 116: OOAD LAB

ATM

pin no : numbertype of account : numbername : stringamount : number

check pin()check amount()update amount()print slip()

admin

pin no : numbertype of account : numberamount : numbername : string

pin valid/invalid()amount available()account avaliable()update account()

SEQUENCE DIAGRAM:

116

Page 117: OOAD LAB

atm ADMIN

check pin no

pin valid/invalid

check account

display status

check amount

display status

update account

COLLABORATION DIAGRAM:

117

Page 118: OOAD LAB

atm ADMIN

1: check pin no3: check account5: check amount

7: update account

2: pin valid/invalid4: display status6: display status

VB SOURCE CODE

Choice.frmPrivate Sub Command1_Click()User.Show

118

Page 119: OOAD LAB

Unload MeEnd Sub

Private Sub Command3_Click()Unload MeEnd Sub

User.frmPrivate Sub Command1_Click()Withdraw.ShowUnload MeEnd Sub

Private Sub Command3_Click()ViewBalance.ShowUnload MeEnd Sub

ViewBalance.frm

Dim db As DatabaseDim rs As RecordsetPrivate Sub Command1_Click() rs.MoveFirst Do Until rs.EOF If rs(0) = Text4.Text And rs(1) = Text1.Text Then Text3.Text = rs(2) a = rs(2) End If rs.MoveNext LoopEnd Sub

Private Sub Command3_Click()User.ShowUnload MeEnd Sub

Private Sub Command4_Click()Unload MeEnd Sub

Private Sub Form_Load()Set db = OpenDatabase("E:\PRINT OUT OOAD\CASE PRINTOUT\CASE PRINTOUT\Automatioc Teller Machine\ATM.mdb")Set rs = db.OpenRecordset("USER")End Sub

Withdraw.frm

Dim db As DatabaseDim rs As RecordsetDim a As Double

119

Page 120: OOAD LAB

Private Sub Command1_Click()Command2.Enabled = True rs.MoveFirst Do Until rs.EOF If rs(0) = Text4.Text And rs(1) = Text1.Text Then Text3.Text = rs(2) a = rs(2) End If rs.MoveNext Loop End SubPrivate Sub Command2_Click() rs.MoveFirst Do Until rs.EOF If rs(1) = Text1.Text And rs(0) = Text4.Text Then a = rs(2) rs.Edit rs(2) = a - Text2.Text Text3.Text = rs(2) Text2.Text = "" rs.Update MsgBox "Amount Withdrawed" End If rs.MoveNext LoopEnd SubPrivate Sub Command3_Click()User.ShowUnload MeEnd Sub

Private Sub Command4_Click()Unload MeEnd Sub

Private Sub Form_Load()Set db = OpenDatabase("E:\PRINT OUT OOAD\CASE PRINTOUT\CASE PRINTOUT\Automatioc Teller Machine\ATM.mdb")Set rs = db.OpenRecordset("USER")End Sub

OUTPUT FORM

Form 1 : (Choice.frm)

120

Page 121: OOAD LAB

Form 2 : (User.frm)

Form 3 : (Withdraw.frm)

121

Page 122: OOAD LAB

Form 4 : (ViewBalance.frm)

122

Page 123: OOAD LAB

RESULT:Thus the ATM System was developed by using visual basic in front end

and MS-Access in back end.

123

Page 124: OOAD LAB

EXPERT SYSTEM

124

Page 125: OOAD LAB

EXPERT SYSTEM

AIM:To develop an expert system using visual basic in front end and MS

Access as back end.

PROGRAM ANALYSIS AND PROJECT PLANNING:

PURPOSE:The expert system takes inspiration Medical Transcription system as a

system where the doctors reward the patient’s disease and display the reports corresponding to their disease.

PROJECT SCOPE:The Doctor Patient and system provide all the function

Login Updating Patient Details Billing Medicine Catalog

SOFTWARE REQUIREMENT ANALYSIS:

INTENDED AUDIENCE: Patient Doctor Administrator

PRODUCT FUNCTIONS:

ENTER SYMPTOMS:Here the patient goes to the doctor his/her treatment and tells the

symptoms to the doctor.Then the doctor takes about the disease and prescribes few medicines some instructions.

MEDICINE CATALOG:Patient gets that the medicine from the medical shop and the entires are

entered in the database.

GENERATION OF REPORTS:

125

Page 126: OOAD LAB

All the details about the patient and his/her disease are finally entered in the database.

DOCTOR FORM:

For getting patient name and symptoms and display reports.

OFFICIAL FORM:

For getting patient details and billing.

PATIENT DATABASE:

For updating patient and increment acquire.

126

Page 127: OOAD LAB

EXPERT SYSTEM

USECASE DIAGRAM:

View The Bill and Report

Doctor

Maintain Patient Details

Issue Bill Report

Official Maintain Doctor Billing System

Login

Patient

Diagonsis Disease Medicine_Catalog

Medicine Catalog Up Pattern

127

Page 128: OOAD LAB

CLASS DIAGRAM:

Medicine Controller

symptoms namedetailsdetails for patientreportpayment details

enter symptoms name()get details()get details for patient()send report()display payment details()

Front Panel

symptomsmedicine and diseasesbillingreportusername and reportusername and passwordpatient name

enter symptoms()display medicine and disease()display report()enter patient name()enter username and password()display billing()

Medicine Catalog System

medicine namedisease name

maintain medicine and disease name()update()

Patient DB

add patient details()add medicine and disease()

128

Page 129: OOAD LAB

SEQEUENCE DIAGRAM:

129

Page 130: OOAD LAB

130

Page 131: OOAD LAB

COLLABORATION DIAGRAM:

admin patient

front panel

patient db

doctor form

medical catalog

3:

5: Add Patient Details

6: Get Details From Patient Name

7: Get Symptomps

8: Display Report

1: Enter Username & Password2: Validate Username & Password

4: Enter The Symptomps

9: Send Disease Name

VB SOURCE CODEForm 1.frm

131

Page 132: OOAD LAB

Dim a As BooleanPrivate Sub Command1_Click()Data1.RefreshData1.Recordset.MoveFirsta = FalseDo While Not Data1.Recordset.EOFIf Data1.Recordset.Fields(0) = Trim(Text1.Text) And Data1.Recordset.Fields(1) = Trim(Text2.Text) Thena = TrueText2.Text = Data1.Recordset.Fields(2)Text3.Text = Data1.Recordset.Fields(3)Text4.Text = Data1.Recordset.Fields(4)Form3.Text4.Text = Data1.Recordset.Fields(5)Exit DoEnd IfData1.Recordset.MoveNextLoopIf Not a ThenMsgBox "Not consulted any doctor"Form2.ShowEnd IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

Private Sub Command3_Click()Form3.ShowEnd Sub

Form2.frm

Private Sub Command1_Click()Form1.ShowEnd Sub

Private Sub Command2_Click()Data1.Recordset.MoveLastData1.Recordset.AddNewData1.Recordset.Fields(0) = Text1.TextData1.Recordset.Fields(1) = Text2.TextData1.Recordset.Fields(2) = Text3.TextData1.Recordset.Fields(3) = Text4.TextData1.Recordset.Fields(4) = Text5.Text

132

Page 133: OOAD LAB

Data1.Recordset.Fields(5) = Text6.TextData1.Recordset.UpdateMsgBox "DATA ADDED"End Sub

Form3.frmOption Explicit

Private Sub Command1_Click()If Text2.Text = "fever" ThenText3.Text = "Paracetamol"Form4.Text4.Text = "50"ElseIf Text2.Text = "headache" ThenText3.Text = "cold act"Form4.Text4.Text = "25"ElseIf Text2.Text = "vomit" ThenText3.Text = "vomitstop"Form4.Text4.Text = "75"ElseIf Text2.Text = "acidity" ThenText3.Text = "Gelucil"Form4.Text4.Text = "60"ElseIf Text2.Text = "stomachpain" ThenText3.Text = "Bolex"Form4.Text4.Text = "25"ElseIf Text2.Text = "cold" ThenText3.Text = "Action500"Form4.Text4.Text = "70"ElseMsgBox "Enter proper disease"End IfEnd Sub

Private Sub Command2_Click()EndEnd Sub

Private Sub Command3_Click()Form4.ShowEnd Sub

Private Sub Form_Load()Text1.Text = DateEnd Sub

133

Page 134: OOAD LAB

Form4.frmPrivate Sub Command1_Click()Form5.ShowEnd Sub

Private Sub Form_Load()Text1.Text = Form1.Text1.TextText2.Text = Form3.Text2.TextText3.Text = Form3.Text3.TextEnd Sub

Form5.frmOption Explicit

Private Sub Command1_Click()MsgBox "GET WELL SOON"EndEnd Sub

Private Sub Form_Load()Text2.Text = Form4.Text4.TextText1.Text = "100"End Sub

OUTPUT FORMS

134

Page 135: OOAD LAB

Patient Details : (Form1.frm)

Medicine Details : (Form2.frm)

Bill Amount : (Form3.frm)

135

Page 136: OOAD LAB

Consulting Fee : (Form5.frm)

136

Page 137: OOAD LAB

Details : (Form2.frm)

137

Page 138: OOAD LAB

RESULT:Thus the Expert system was developed by using visual basic in front end

and MS-Access in back end.

138