Case Tools

151
CASE TOOLS LAB 0 0 3 100 1.5 1. Prepare the following documents for two or three of the experiments listed below and develop the software engineering methodology. Program Analysis and Project Planning. Thorough study of the problem – Identify project scope, Objectives, Infrastructure. Software requirement Analysis Describe the individual Phases / Modules of the project, Identify deliverables. Data Modeling Use work products – Data dictionary, Use diagrams and activity diagrams, build and test lass diagrams, Sequence diagrams and add interface to class diagrams. Software Development and Debugging Software Testing Prepare test plan, perform validation testing, Coverage analysis, memory leaks, develop test case hierarchy, Site check and Site monitor. SUGGESTED LIST OF APPLICATIONS 1. Student Marks Analyzing System 2. Quiz System 3. Online Ticket Reservation System 4. Payroll System 5. Course Registration System 6. Expert Systems 7. ATM Systems 8. Stock Maintenance 9. Real-Time Scheduler 10. Remote Procedure Call Implementation

Transcript of Case Tools

Page 1: Case Tools

CASE TOOLS LAB 0 0 3 100 1.5

1. Prepare the following documents for two or three of the experiments listed below and develop the software engineering methodology.

Program Analysis and Project Planning. Thorough study of the problem – Identify project scope, Objectives,

Infrastructure. Software requirement Analysis Describe the individual Phases / Modules of the project, Identify deliverables. Data Modeling Use work products – Data dictionary, Use diagrams and activity diagrams, build

and test lass diagrams, Sequence diagrams and add interface to class diagrams. Software Development and Debugging Software Testing Prepare test plan, perform validation testing, Coverage analysis, memory leaks,

develop test case hierarchy, Site check and Site monitor.

SUGGESTED LIST OF APPLICATIONS

1. Student Marks Analyzing System2. Quiz System3. Online Ticket Reservation System4. Payroll System5. Course Registration System6. Expert Systems7. ATM Systems8. Stock Maintenance9. Real-Time Scheduler10. Remote Procedure Call Implementation

Page 2: Case Tools

LIST OF EXPERIMENTS

CYCLE – 1

1. Student Mark Analyzing System2. Quiz System3. Course Registration System4. Expert System

CYCLE – 2

1. Online Ticket Reservation System2. Payroll System3. ATM Systems4. Stock Maintenance5. Real-Time Scheduler

Page 3: Case Tools

EX NO: STUDENT MARK ANALYSING SYSTEMDATE:AIM: To implement the program for student mark analyzing system using Microsoft Visual Basic 6.0 and Microsoft Access.

PROCEDURE:1. Select the Start->Program->Microsoft Visual Studio 6.0-> Microsoft Visual Basic

6.02. Select New->Standard EXE and click open3. Design the Login form to check student’s Academic and Personal details4. Design the Academic form for displaying the student mark5. Design the Personal form for displaying the student personal information6. Type the coding for Academic and Personal to get the student information7. Select the Start-> Program->Microsoft Access->Create new database and enter

the field name , data type and description8. Go to Control panel ->Administrative tools ->Data source (ODBC) ->Add the

database Microsoft Access Driver (*.mdb). select the source and click ok

Page 4: Case Tools

USECASE DIAGRAM

Administrator

Academic

Personal

Add new

Delete

Update Database

Register number

Register number not found

INTERACTION DIAGRAMA) SEQUENCE DIAGRAM

DatabaseAdministrator

Register number

If found it shows details(Academic or Personal) or Not found

Selects Academic(update,add,delete,back)

shows details as(updated,deleted,added)

Selects Personal(Update,back)

shows details (updated msg)

Page 5: Case Tools

B) COLLABORATION DIAGRAM:

Administrator

Database

1: Enter the register number

2: If data found specify(academic or personal) else not found

3: Administrator enters Academic

4: Shows Academic details

5: Administrator enter personal

6: Shows personal details

7: data is(updated,deleted,added )

8: Displays (updated ,added,deleted)message

STATE MACHINE DIAGRAMA) ACTIVITY DIAGRAM:

START

Administrator

Academic Personal

Database

END

B) STATE DIAGRAM:

Page 6: Case Tools

START

Administrator enter the register number

Database It displays data found or not found END

START

Administrator enters academic

Database Displays Academic

END

START

Administrator Enters Personal

Database Displays Personal

END

START

Administrator data(Update or delete or add)

Enters Academic

Database Displays modified message

END

START

Administrator Updates personal

Database Displays updated message END

CODING:

LOGIN FORM:ACADEMIC:Private Sub Command1_Click()With Form3 .Adodc1.RecordSource = "Select * From Register Where RegNo=" & Trim(Form1.Text1.Text).Adodc1.Refresh

Page 7: Case Tools

If .Adodc1.Recordset.EOF = True Then MsgBox "Not Found", vbInformationElse Form3.ShowEnd IfEnd WithEnd SubPERSONAL:Private Sub Command2_Click()With Form2.Adodc1.RecordSource = "Select * From Register Where RegNo=" & Trim(Form1.Text1.Text).Adodc1.RefreshIf .Adodc1.Recordset.EOF = True Then MsgBox "Not Found", vbInformationElse Form2.ShowEnd IfEnd WithEnd Sub

Private Sub Form_Unload(Cancel As Integer)Unload MeUnload Form2Unload Form3End Sub

PERSONAL FORM:BACK:Private Sub Command1_Click()Form2.HideForm1.ShowEnd Sub

UPDATE:Private Sub Command2_Click()Adodc1.Recordset.UpdateMsgBox "RECORD UPDATED"End Sub

Private Sub Form_Load()Adodc1.Visible = FalseEnd Sub

ACADEMIC FORM:BACK:

Page 8: Case Tools

Private Sub Command1_Click()Form3.HideForm1.Show

End Sub

ADD NEW:Private Sub Command2_Click()Adodc1.Recordset.AddNewText1.SetFocusEnd Sub

DELETE:Private Sub Command3_Click()Adodc1.Recordset.DeleteMsgBox "RECORD DELETED"End Sub

UPDATE:Private Sub Command4_Click()Adodc1.Recordset.UpdateMsgBox "RECORD UPDATED"End Sub

Private Sub Form_Load()Adodc1.Visible = FalseEnd Sub

FORM DESIGN:

LOGIN FORM:

Page 9: Case Tools

PERSONAL FORM:

ACADEMIC FORM:

Page 10: Case Tools

SEARCHING:

Page 11: Case Tools

STUDENT ACADEMIC DETAILS:

STUDENT PERSONAL DETAILS:

Page 12: Case Tools

ACADEMIC MODULES:ADD NEW:

Page 13: Case Tools

UPDATION:

Page 14: Case Tools

DELETION:

Page 15: Case Tools

PERSONAL MODULE:

UPDATION:

UNAVAILABLE RECORD:

Page 16: Case Tools
Page 17: Case Tools

RESULT: Thus the software for student mark analyzing system was developed successfully.

Page 18: Case Tools

EX NO: QUIZ SYSTEMDATE:AIM: To develop a software for quiz system by using software engineering methodology.DESCRIPTION:

1. USE CASE DIAGRAM:

Judge asks the questions to the participants.

Participant answers the question.

Judge provides mark if it is correct and announce the result.

2. INTERACTION DIAGRAM:

A) SEQUENCE DIAGRAM:

Participant introduces himself to judge and the judge asks the questions.

Participant answers the question if it is correct mark is updated in the database.

Finally announces the result.

B) COLLABORATION DIAGRAM:

Participant introduces himself to judge and judge asks questions.

The Participant announces the answer for question if it is correct add mark.

Update mark in the database repeat for n question.

Go to next round if he is qualified.

3. IMPLEMENTATION DIAGRAM:

A) ACTIVITY DIAGRAM:

Judge query the Participants and he answer for questions.

If the answer is correct update the results and reach the end of the current round.

If qualified announces the final report after “n” rounds.

Otherwise eliminate the Participants.

B) START CHART DIAGRAM:

Page 19: Case Tools

The state diagram provides information about each states querying, answering, updating and verification.

DATABASE DESCRIPTION: Analyze the project and design the login form.

Create a variable for total score, time decreasing.

Select the questions and check the answer is correct if it is correct click the next command button.

Then the timer decrements the time.

Finally calculate the score.

USECASE DIAGRAM

Query the participant

Answer the question

Provide mark if correct

Announce the results

Participant(s)Judge

SEQUENCE DIAGRAM

Page 20: Case Tools

PARTICIPANTS JUDGEDATABASE

Introduce himseif

Query the participant

Answering the question

Add mark if answer is correct

Update mark and inform the judge

Inform the status of the participants

Announce the final results

Repeat for "N" Questions

Go to next round, if Qualified

Page 21: Case Tools

COLLABORATION DIAGRAM

PARTICIPANTS JUDGE

DATABASE

6: Repeat for "N" Questions8: Go to next round, if Qualified

1: Introduce himseif3: Answering the question

2: Query the participant7: Inform the status of the participants

9: Announce the final results

4: Add mark if answer is correct 5: Update mark and inform the judge

STATE DIAGRAM

Page 22: Case Tools

Querying

Put up Questions & Options

Check the time

Not answered, provide clues with reduced points

Put up Questions & Options

Check the time

Not answered, provide clues with reduced points

Answering and Verification

Answer the question

If answer is correct

Add one point

Proceed to next question

Answer the question

If answer is correct

Add one point

Proceed to next question

Update the Points

Update the points

Calculate individual point(s) If qualified

Go to next round & start the query

Eliminate the participants

Update the points

Calculate individual point(s) If qualified

Go to next round & start the queryYes

Eliminate the participants

No

Final ResultSelect top three

membersAnnounce the

final result

Select top three members

Announce the final result

Yes

No

ACTIVITY DIAGRAM

Answer is correct

End of current round

Query the participants

No

Answering question

Update the results

Yes

No change

No

Announce the final result

If qualified

Eliminate the participants

End of roundsYes

No

Yes

No

Yes

Page 23: Case Tools

CODINGMain.frm

Private Sub Command1_Click ()Unload MeForm2.ShowEnd SubPrivate Sub Command2_Click ()Form7.ShowEnd SubPrivate Sub Command3_Click ()Unload MeForm12.ShowEnd Sub

Rule1.frmPrivate Sub Command4_Click ()Unload MeForm3.ShowEnd Sub

Round11.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option3.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End IfData1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseEnd SubPrivate Sub Command2_Click ()Unload MeForm4.ShowEnd SubPrivate Sub Form_Load()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Page 24: Case Tools

Round12.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option3.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End IfData1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseEnd SubPrivate Sub Command2_Click ()Unload MeForm5.ShowEnd SubPrivate Sub Form_Load ()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Round13.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option2.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End IfData1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseEnd SubPrivate Sub Command2_Click ()Unload Me

Page 25: Case Tools

Form6.ShowEnd SubPrivate Sub Form_Load ()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Score1.frmPrivate Sub Command1_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeForm1.ShowEnd SubPrivate Sub Command2_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeEnd Sub

Rule2.frmPrivate Sub Command4_Click ()Unload MeForm8.ShowEnd Sub

Round21.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option4.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End IfData1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = False End SubPrivate Sub Command2_Click ()Unload Me

Page 26: Case Tools

Form9.ShowEnd SubPrivate Sub Form_Load ()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Round22.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option1.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End IfData1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseEnd SubPrivate Sub Command2_Click ()Unload MeForm10.ShowEnd SubPrivate Sub Form_Load ()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Round23.frmPrivate Sub Command1_Click ()Data1.Recordset.EditIf Option2.Value = True ThenData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Shape1.FillColor = &HFF00&ElseData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5Shape1.FillColor = &HFF&End If

Page 27: Case Tools

Data1.Recordset.UpdateOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseEnd SubPrivate Sub Command2_Click ()Unload MeForm11.ShowEnd SubPrivate Sub Form_Load ()Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = FalseEnd Sub

Score2.frmPrivate Sub Command1_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeEnd SubPrivate Sub Command2_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeEnd Sub

Rule3.frmPrivate Sub Command4_Click ()Unload MeForm13.ShowEnd Sub

Round3.frmOption ExplicitDim t As VariantPrivate Sub Form_Load ()Label1.Caption = 30Option1.Value = FalseOption2.Value = FalseOption3.Value = FalseOption4.Value = False

Page 28: Case Tools

Option5.Value = FalseOption6.Value = FalseOption7.Value = FalseOption8.Value = FalseOption9.Value = FalseOption10.Value = FalseOption11.Value = FalseOption12.Value = FalseOption13.Value = FalseOption14.Value = FalseOption15.Value = FalseOption16.Value = FalseEnd SubPrivate Sub Option1_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Data1.Recordset.UpdateEnd SubPrivate Sub Option11_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Data1.Recordset.UpdateEnd SubPrivate Sub Option16_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Data1.Recordset.UpdateEnd SubPrivate Sub Option8_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10Data1.Recordset.UpdateEnd SubPrivate Sub Timer1_Timer ()If t = 0 ThenLabel1.Caption = 22Frame1.Enabled = FalseOption1.Enabled = FalseOption2.Enabled = FalseOption3.Enabled = FalseOption4.Enabled = FalseOption5.Value = FalseOption6.Value = FalseOption7.Value = FalseOption8.Value = FalseLabel1.Caption = 18

Page 29: Case Tools

t = t + 1Else If t = 1 ThenFrame2.Enabled = FalseOption5.Enabled = FalseOption6.Enabled = FalseOption7.Enabled = FalseOption8.Enabled = FalseOption9.Value = FalseOption10.Value = FalseOption11.Value = FalseOption12.Value = FalseLabel1.Caption = 14t = t + 1Else If t = 2 ThenFrame3.Enabled = FalseOption9.Enabled = FalseOption10.Enabled = FalseOption11.Enabled = FalseOption12.Enabled = FalseOption13.Value = FalseOption14.Value = FalseOption15.Value = FalseOption16.Value = FalseLabel1.Caption = 8t = t + 1Else If t = 3 ThenFrame4.Enabled = FalseOption13.Enabled = FalseOption14.Enabled = FalseOption15.Enabled = FalseOption16.Enabled = FalseTimer1.Enabled = FalseUnload MeForm14.ShowEnd IfEnd Sub

Score3.frmPrivate Sub Command1_Click ()Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeForm1.ShowEnd SubPrivate Sub Command2_Click ()

Page 30: Case Tools

Data1.Recordset.EditData1.Recordset.Fields (0) = 0Data1.Recordset.UpdateUnload MeEnd Sub

FORM DESIGN

Main.frm

Rule1.frm

Page 31: Case Tools

Round11.frm

Round12.frm

Page 32: Case Tools

Round13.frm

Page 33: Case Tools

Score1.frm

Rule2.frm

Round21.frm

Page 34: Case Tools

Round22.frm

Round23.frm

Page 35: Case Tools

Score2.frm

Rule3.frm

Page 36: Case Tools

Round3.frm

Page 37: Case Tools

Score3.frm

Page 38: Case Tools

DATABASE WINDOW

RESULT: Thus the software has been developed for quiz system successfully.

Page 39: Case Tools

EX NO: ONLINE RESERVATION SYSTEMDATE

AIM:

To develop a software for online reservation by using software engineering methodology.DESCRIPTION: 1. USE CASE DIAGRAM:

Analyse the given project and find out all the information. Draw the use case diagram by defining the attributes and methods. Show the relationships by arrows.

2. INTERACTION DIAGRAM: A) SEQUENCE DIAGRAM:

This diagram shows how the information is transformed between the objects reservation.

Reservation Reserving a specific number of seats for specified dates.Cancellation Cancel the reserved seat by providing the passenger

number.B) COLLABORATION DIAGRAM:

Reservation Reserve the tickets and enter the name in database.Cancellation Enter the number and cancel the seat by providing

acknowledged to passenger. 3. IMPLEMENTATION DIAGRAM:

A) ACTIVITY DIAGRAM: This diagram provides the overall message like a flow

chart.Reservation It checks the database and inform the passenger if the ticket

is reserved or not.Cancellation: It cancels the ticket if the details provides ‘yes’. Otherwise

not to cancel the ticket.B) STATE CHART DIAGRAM:

This diagram provides the information about the separate states.

DESCRIPTION: Analyse the project and design the form.

Draw the labels for each field and get the value in text box.

Page 40: Case Tools

Design the command button for the Add, Update, Delete and Exit operation.

Connect the data control to the record set fields.

Using Visual data manager creates a database table.

Double click the command and write the necessary codings.

Run the program and store the details in the database.

USECASE DIAGRAM:

Page 41: Case Tools

2. INTERACTION DIAGRAM:

A) SEQUENCE DIAGRAM:

Page 42: Case Tools

Passenger Officer Database

Requesting Ticket

Reserve Ticket

Checking Status of Availability

Availability:- YesTicket is Available

Ticket Reserved

Availability:- No

Reservation Failed

B) COLLABORATION DIAGRAM:

Passenger

Officer

Database

1: Requesting Ticket & Reserve Ticket

2: Checking Status of Availability & ticket Reserved

3: Availability:-Yes & Availability:- No

4: Ticket is Available & Reservation Failed

ACTIVITY DIAGRAM:

Page 43: Case Tools

Passenger

Request for reservation status

Reservation officer

Check database

Available

Reserved

Not available

Not Reserved

NewStateInform to passenger

STATE DIAGRAM:Passenger Officer

DatabaseRequesting Checking Availability

OfficerCheck the Database

Administrator

Not Available

Available

For

For

Request to Database for Vacancy Response to request

Page 44: Case Tools

OfficerCheck the Database

Passenger

Reservation Failed

Ticket Reserved

Available

Not available

Response to request

Coding

Private Sub Command1_Click()

Page 45: Case Tools

Data1.Recordset.AddNewEnd Sub

Private Sub Command2_Click()If Data1.Recordset.EOF = True ThenMsgBox ("No more files to delete")ElseData1.Recordset.DeleteData1.Recordset.MoveFirstEnd IfEnd Sub

Private Sub Command3_Click()Data1.RefreshEnd Sub

Private Sub Command4_Click()Data1.UpdateRecordData1.Recordset.Bookmark = Data1.Recordset.LastModifiedEnd Sub

Private Sub Command5_Click()Data1.Recordset.MoveFirstEnd Sub

Private Sub Command6_Click()If Data1.Recordset.BOF = True ThenMsgBox ("No Files to see before")ElseData1.Recordset.MovePreviousEnd IfEnd Sub

Private Sub Command7_Click()If Data1.Recordset.EOF = True ThenMsgBox ("No More Files")ElseData1.Recordset.MoveNextEnd IfEnd Sub

Private Sub Command8_Click()Data1.Recordset.MoveLastEnd Sub

Private Sub Command9_Click()

Page 46: Case Tools

Unload MeEnd Sub

Input

Page 47: Case Tools

Output

Page 48: Case Tools

RESULT:Thus the software for online ticket reservation has been successfully developed.

EX NO: PAYROLL PROCESSINGDATE :

AIM:To develop a software for employee payroll system by using software engineering

methodology.DESCRIPTION: 1. USE CASE DIAGRAM:

Employee gives his empno, date, year of joining, salary, department, designation to the head accountant.

Accountant includes his DA, TA, LIC, HA, etc and calculates his net salary.

2. INTERACTION DIAGRAM: A) SEQUENCE DIAGRAM:

Employee request for the calculation of salary. Connect to it to the database and calculate the salary. Administrator updates it and delivers it to the employee.

B) COLLABORATION DIAGRAM: Employee gives out his details such as empno, name, salary,

etc to the accountant. Accountant collects details from the database and calculates the

net salary. Employee gets his salary details from the accountant.

3. IMPLEMENTATION DIAGRAM:

Employee Employee gives his details such as name, etc. Receives the final net salary from the accountant. Then administration

refers to the database.Accountant:

Gives his empno, address, designation, dept, date and year of passing. Collects the final net salary from accountant.

Database Receives the information from them employees whose salary details

are to be considered. Adds up the allowances and verifies database and sends it to the

database.

Page 49: Case Tools

DESCRIPTION: Analyse the project and design the form. Draw the labels for each field and get the value in the textbox. Design the command button for add, update and delete. Write the necessary coding by double click the button and connect the visual data

manager. Store the result in the database.

USECASE DIAGRAM

Page 50: Case Tools

COLLECT EMPLOYEE DETAILS

CALCULATE SALARY DETAILS

UPDATE THE DATABASE

ACCOUNTANT

ISSUE THE SALARY

EMPLOYEE

SEQUENCE DIAGRAMDATA BASEEMPLOYEE ACCOUNTANT

EMPLOYEE NAME

EMPLOYEE ID

VERIFY THE DATA

GET THE BASIC PAY DETAIL

CALCULATE HRA,DA,PA,GROSS & NET SALARY

UPDATE THE DATABASE

GIVE THE SALARY

COLLABORATION DIAGRAM

DATA BASE

EMPLOYEE ACCOUNTANT

5: CALCULATE HRA,DA,PA,GROSS & NET SALARY

1: EMPLOYEE NAME2: EMPLOYEE ID

7: GIVE THE SALARY

3: VERIFY THE DATA6: UPDATE THE DATABASE

4: GET THE BASIC PAY DETAIL

Page 51: Case Tools

STATE CHART DIAGRAMDATA COLLECTION

GET EMPLOYEE ID & NAME

VERIFY THE ID

GET EMPLOYEE ID & NAME

CALCULATION

GET THE BASIC PAY

CALCULATE THE HRA, DA, PA, GROSS, NET SALARY

VERIFY THE ID

GET THE BASIC PAY

CALCULATE THE HRA, DA, PA, GROSS, NET SALARY

UPDATE THE DETAILS IN DATA BASE

ISSUE OF SALARY

UPDATE THE DETAILS IN DATA BASE

ISSUE OF SALARY

ACTIVITY DIAGRAM

GET THE EMPLOYEE DETAILS

VERIFY THE DATA

IF CORRECT

GET THE BASIC PAY FROM DATABASE

UPDATE THE DATABASE

CALCULATE THE HRA, DA, PA, GROSS, NET SALARY

YES

NO

Page 52: Case Tools

form1

Private Sub Command1_Click()If Text1.Text = "vinoth" Then ElseIf Text2.Text = "engineer" Then Form2.ShowElseMsgBox ("Wrong username or Password")Text1.Text = ""Text2.Text = ""Text1.SetFocus

End IfEnd Sub

Form2

Private Sub Command2_Click()Form3.ShowEnd Sub

Private Sub Command3_Click()Form3.ShowForm3.add.Visible = FalseForm3.update.Visible = FalseForm3.delete.Visible = FalseEnd Sub

Form3

Option Explicit

Private Sub add_Click()Form3.Data1.Recordset.AddNewEnd Sub

Private Sub bs_LostFocus()'PFpf.Text = Val(bs.Text) * 0.12'dada.Text = Val(bs.Text) * 0.45'hrahra.Text = Val(bs.Text) * 0.25

Page 53: Case Tools

'gross salarygross.Text = Val(bs.Text) + Val(pf.Text) + Val(da.Text) + Val(hra.Text)'net salarynet.Text = Val(gross.Text) - Val(bs.Text)End Sub

Private Sub update_Click()Form3.Data1.UpdateRecordForm3.Data1.Recordset.Bookmark = Form3.Data1.Recordset.LastModifiedEnd Sub

Private Sub delete_Click()If Form3.Data1.Recordset.EOF = True ThenMsgBox ("No more record to Delete")ElseIf Form3.Data1.Recordset.BOF = True ThenMsgBox ("No Record Have Been yet Entered to Delete")ElseForm3.Data1.Recordset.deleteForm3.Data1.Recordset.MoveNextEnd IfEnd IfEnd Sub

Private Sub exit_Click()EndEnd Sub

Output

Page 54: Case Tools

Form1

form2

Page 55: Case Tools
Page 56: Case Tools

form3

viewing

Updation

Page 57: Case Tools

Form3

Page 58: Case Tools

RESULT:Thus the software has been developed for employee payroll system successfully.

EX NO: EXPERT SYSTEMDATE:AIM: To Develop a project under Expert System by using the concept of Artificial intelligence.ALGORITHM:1. A car game was analysed under the Artificial intelligence concept2. The game is developed under the language Java. 3. The coding for the game has been written and it is verified.4. The object used in the game i.e. the car object is linked as a supporting file.5. Similarly the path in which the car travels is also linked as a supporting file.6. The program is executed as html document.7. The game starts with the front page as “TO PLAY THE GAME CLICK ANY MOUSE BUTTON”.8. Then if the game is won it will award the java cup.9. If the game is lost it shows “YOU HAVE LOST”10. Thus the game is developed and its working is verified.

Page 59: Case Tools

USE CASE DIAGRAM:

Player

Click Mouse Button to Move the object(car)

The game Ends when our car crashes an opposite object(car)

Player wins when the score reaches the target

SEQUENCE DIAGRAM:

Page 60: Case Tools

Player System

Wait A Minitue

Click Mouse To Play

Press Left \ Right(Controls)

Above 50 Winner Else Play Again(Y/N)

Yes / No

COLLABORATION DIAGRAM:

Page 61: Case Tools

3. STATE MACHINE DIAGRM :A. ACTIVITY DIAGRAM:

START

System / User Interface

player Press Left / Right to Play The Game

If Player Hits An Object / Car... <Game Over / Play Again>

Player Plays The Game

If Score Is Above 50 Player Wins

If Game Over Play Again / Exit

B.STATE CHART MACHINE:

Page 62: Case Tools

Player

Wait A Minitue

Press Left / Right Key of mouse to Play

Player Plays The Game

Wait A Minitue

Start

Press Left / Right Key of mouse to Play

Player Plays The Game

End

End Player

Read the Score From The Score Box

If Game Is Completed Display The Score

If Score Is Above 50 Display Winner

If Score Is Belove 50 Display game Over

Start

Read the Score From The Score Box

If Game Is Completed Display The Score

If Score Is Above 50 Display Winner

If Score Is Belove 50 Display game Over

End

CODING://<applet code=Car.class width=640 height=400> </applet>import java.awt.*; import java.applet.*;import java.awt.image.*;public class Car extends Applet implements Runnable

Page 63: Case Tools

{Image img,car1,cup; static int position=235; static int points = 0; static int delay = 20; road rd; Thread thr; static int pts=50; boolean msg=true; static boolean kill=false; public void init() { int x[] = { 15, 15, 0, 60, 45, 45 }; int y[] = { 45, 50, 58, 58, 50, 45 }; setBackground(Color.black);img = createImage(60,60); Graphics g = img.getGraphics(); g.setColor(Color.black); g.fillRect(0,0,60,60); g.setColor(Color.green); g.fillRect(12,20,36,7); g.fillRect(8,15,4,17); g.fillRect(48,15,4,17); g.fillRect(5,40,50,7); g.fillRect(0,35,5,17); g.fillRect(55,35,5,17);g.setColor(Color.red); g.fillRect(20,0,20,15); g.fillRect(15,15,30,40); g.setColor(Color.blue); g.fillRect(20,20,7,10); g.fillRect(33,20,7,10); g.setColor(Color.red); g.fillRect(22,22,3,6); g.fillRect(35,22,3,6); g.setFont(new Font("TimesRoman",Font.BOLD,9)); g.setColor(Color.white); g.fillPolygon(x,y,6); g.setColor(Color.black); g.drawString("BMW",15,54);car1 = createImage(60,60); Graphics g1 = car1.getGraphics(); g1.setColor(Color.black); g1.fillRect(0,0,60,60); g1.setColor(Color.green); g1.fillRect(12,20,36,7);

Page 64: Case Tools

g1.fillRect(8,15,4,17); g1.fillRect(48,15,4,17); g1.fillRect(5,40,50,7); g1.fillRect(0,35,5,17); g1.fillRect(55,35,5,17);g1.setColor(Color.blue); g1.fillRect(20,0,20,15); g1.fillRect(15,15,30,40); g1.setColor(Color.red); g1.fillRect(20,20,7,10); g1.fillRect(33,20,7,10); g1.setColor(Color.blue); g1.fillRect(22,22,3,6); g1.fillRect(35,22,3,6); g1.setFont(new Font("TimesRoman",Font.BOLD,9)); g1.setColor(Color.white); g1.fillPolygon(x,y,6); g1.setColor(Color.black); g1.drawString("SWING",15,54);thr = new Thread(this); thr.start(); rd = new road(getGraphics(),car1,this); rd.start();int a[] = {20,5,35}; int b[] = {150,160,160}; cup = createImage(50,165); Graphics handle = cup.getGraphics(); handle.setColor(Color.black); handle.fillRect(0,0,50,165); handle.setColor(Color.red); handle.fillArc(0,40,40,30,0,180); handle.setColor(Color.yellow); handle.fillArc(0,15,40,80,180,180); handle.setColor(Color.red); handle.drawLine(20,95,20,150); handle.fillPolygon(a,b,3); } public void run() {while(points <= 100) { if(points == 100 || kill == true) { rd.stop(); repaint(); thr.stop(); } if((points%4)==0) {

Page 65: Case Tools

rd.j = 0; pts = points; points++; delay--; if(delay <= 0) delay = 0; rd.flag=1; repaint(); }try { Thread.sleep(delay); }catch(InterruptedException exp){}} } public void destroy() { thr.stop(); rd.stop(); }public boolean mouseDown(Event e , int x, int y) { if(e.id == Event.MOUSE_DOWN) { if(position == 235) position = 355; else position = 235; repaint(); }return true; } public void paint(Graphics gr) { if(!kill) { if(msg) { gr.setColor(Color.black); gr.fillRect(0,0,640,400); gr.setColor(Color.yellow); gr.setFont(new Font("TimesRoman",Font.BOLD,16)); gr.drawString("TO PLAY THE GAME CLICK ANY MOUSE BUTTON",140,100);

Page 66: Case Tools

gr.drawString("THE CAR WILL MOVE IN OPPOSITE DIRECTION",140,150); gr.drawString("WAIT A MINUTE......",230,200); msg = false; try{ Thread.sleep(3000); }catch(Exception exp){} gr.setColor(Color.black); gr.fillRect(0,0,640,400); } gr.setColor(Color.white); gr.fillRect(200,0,10,400); gr.fillRect(440,0,10,400); gr.drawImage(img,position,300,this); gr.setColor(Color.yellow); gr.fillRect(550,5,637,25); gr.setColor(Color.blue); gr.setFont(new Font("TimesRoman",Font.BOLD,20)); gr.drawString("Score :"+pts,557,22); if(points >= 52) {for(int xyz=0;xyz<3;xyz++) { gr.setColor(Color.yellow); gr.drawString("Have a Cup",240,100); gr.drawImage(cup,300,100,this); gr.setColor(Color.yellow); gr.fillRect(550,5,637,25); gr.setColor(Color.blue); gr.setFont(new Font("TimesRoman",Font.BOLD,20)); gr.drawString("Score :50",557,22); try { Thread.sleep(500); }catch(InterruptedException exp){} } } } else { gr.setColor(Color.yellow);

Page 67: Case Tools

gr.drawString("YOU HAVE LOST THE GAME",250,200); } } }class road extends Thread { int i; public static int j = 0; Graphics g; Image car2; ImageObserver io; public static int flag = 0; boolean msg=true; road(Graphics g,Image car2,ImageObserver io) { this.g = g; this.io = io; this.car2 = car2; } public void run() { drawRoad(g); }public void drawRoad(Graphics gr) { if(msg) { gr.setColor(Color.black); gr.fillRect(0,0,640,400); gr.setColor(Color.yellow); gr.setFont(new Font("TimesRoman",Font.BOLD,16)); gr.drawString("TO PLAY THE GAME CLICK ANY MOUSE BUTTON",140,100); gr.drawString("THE CAR WILL MOVE IN OPPOSITE DIRECTION",140,150); gr.drawString("WAIT A MINUTE......",230,200); msg = false; try{Thread.sleep(5000); }catch(Exception exp){} gr.setColor(Color.black); gr.fillRect(0,0,640,400); } for(;j<=1000;j+=10)

Page 68: Case Tools

{ for(i=-1000;i<=479;i+=60) { gr.setColor(Color.black); gr.fillRect(320,i+j,10,i+j+50); gr.setColor(Color.white); gr.fillRect(320,i+j+10,10,i+j+60); } gr.clearRect(235,j-10,60,60); gr.drawImage(car2,235,0+j,io); gr.clearRect(355,-150+(j-10),60,60); gr.drawImage(car2,355,-150+j,io); gr.clearRect(235,-300+(j-10),60,60); gr.drawImage(car2,235,-300+j,io); gr.clearRect(355,-450+(j-10),60,60); gr.drawImage(car2,355,-450+j,io); if( (Car.position == 235 && (j >= 250 && j <= 360)) || (Car.position == 355 && (j >= 400 && j <= 510)) || (Car.position == 235 && (j >= 550 && j <= 660)) || (Car.position == 355 && (j >= 700 && j <= 810)) ) { try { Thread.sleep(2000); Car.kill = true; }catch(InterruptedException exp){} } if (j >= 360 ) { if( (( j - 360 ) % 150 ) == 0 ) { if(flag == 1) { Car.points--; flag = 0; } Car.points++; gr.setColor(Color.yellow); gr.fillRect(550,5,637,25); gr.setColor(Color.blue); gr.setFont(new Font("TimesRoman",Font.BOLD,20)); gr.drawString("Score :"+Car.points,557,22); } } try {

Page 69: Case Tools

Thread.sleep(Car.delay); }catch(InterruptedException exp){} } } }

FORM DESIGN

Page 70: Case Tools
Page 71: Case Tools

RESULT:Thus the project under Expert System by using the concept of Artificial

intelligence has been designed successfully and its working is verified.

Page 72: Case Tools

EX NO: ATM SYSTEMSDATE:AIM: To develop a software for ATM system by using software engineering methodology.DESCRIPTION: 1. USE CASE DIAGRAM:

Customers insert a card and verify it. Then he selects the type of transformation.

ATM performs the transaction.

After transaction completes customer takes the card. 2. INTERACTION DIAGRAM: A) SEQUENCE DIAGRAM:

Customers insert the card into the ATM machine and then enter the password.

ATM machine checks the password and permit for transaction. Customer selects the type of transaction.

ATM machine checks the account in database and perform transaction.

B) COLLABORATION DIAGRAM: Insert the card and enter the password. Check the password and permit for transaction. Select the type of transaction check the account and perform

transaction. Update the account and repeat transaction.

3. IMPLEMENTATION DIAGRAM:

A) ACTIVITY DIAGRAM: Insert the card and enter the PIN. If it is correct password accepted then select the type of transaction. Perform the transaction, Update the account in database and take the

card. Otherwise password is not accepted. B) STATE CHART DIAGRAM:

Analyze the project and design the form. Create a label for card number, PIN number. Create a button for ok, Cancel. Then create a separate command button for balance in query,

deposit, withdraw and done. Run the program and store the result in the database.

Page 73: Case Tools

USECASE DIAGRAM

Take the card

Insert card & Verification

Select type of Transaction

ATMPerform the Transaction

Customer

SEQUENCE DIAGRAMCUSTOMER ATM MACHINE DATABASE

Insert the card

Enter password

Check password

Perform transaction

Take the card

Check the account

Update the account

Select type of transaction

Prompt for Transaction type

Repeat Transactions

Page 74: Case Tools

COLLABORATION DIAGRAM

CUSTOMER ATM MACHINE

DATABASE

9: Repeat Transactions

1: Insert the card2: Enter password

5: Select type of transaction

7: Perform transaction10: Take the card

4: Prompt for Transaction type

3: Check password6: Check the account8: Update the account

STATE CHART DIAGRAM

Machine(ATM)

ATM Process

Insert Card Enter Pin Select Type of Transaction

Perform the Transaction

Take the Money

Take the Card

Insert Card Enter Pin Select Type of Transaction

Perform the Transaction

Take the Money

Take the Card

Insert Card & Verification State

Insert Card Enter Correct PIN

Check the PIN

Specify the Transaction Type

Insert Card Enter Correct PIN

Check the PIN

Specify the Transaction Type

Transaction Type

DepositeWithdrawDepositWithdrawal

Select_2Select_1

Current A/C

Savings A/C

Select the Transaction

Perform the Transaction

NewState

Go to select the transaction state

DepositeWithdrawDepositWithdrawal

Select_2Select_1

Current A/C

Savings A/C

Select the Transaction

Perform the Transaction

CorrectWrong

NewState

Go to select the transaction state

NO

YES

Page 75: Case Tools

Machine(ATM)

ATM Process

Insert Card Enter Pin Select Type of Transaction

Perform the Transaction

Take the Money

Take the Card

Insert Card Enter Pin Select Type of Transaction

Perform the Transaction

Take the Money

Take the Card

Insert Card & Verification State

Insert Card Enter Correct PIN

Check the PIN

Specify the Transaction Type

Insert Card Enter Correct PIN

Check the PIN

Specify the Transaction Type

Transaction Type

DepositeWithdrawDepositWithdrawal

Select_2Select_1

Current A/C

Savings A/C

Select the Transaction

Perform the Transaction

NewState

Go to select the transaction state

DepositeWithdrawDepositWithdrawal

Select_2Select_1

Current A/C

Savings A/C

Select the Transaction

Perform the Transaction

CorrectWrong

NewState

Go to select the transaction state

NO

YES

ACTIVITY DIAGRAM

Page 76: Case Tools

Perform the Trasaction

Enter pin

Take the card

Select Type of Transaction

Insert card

Password accepted

Password not accepted

Current A/C Savings A/C

Withdraw Deposit Withdrawl Deposite

Select Option

No more Transaction

Select Another Transaction

Dim t As Integer

Private Sub Cmdcacel_Click()

Unload Me

‘Close the window

End Sub

Private Sub Cmdok_Click()

‘Check for valid PIN number

str = "select * from newcust where pid ='" & MDIForm1.Txtpno.Text & "';"

rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText

If rs.BOF And rs.EOF Then

MsgBox ("Invalid PIN or Card Number")

rs.Close

Exit Sub

Page 77: Case Tools

Else

FrmWelcome.Show

MDIForm1.Visible = False

rs.Close

End If

End Sub

Private Sub dot_Click()

‘Display ‘.’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & dot.Caption

Else

Txtpno.Text = Txtpno.Text & dot.Caption

End If

End Sub

Private Sub eight_Click()

‘Display ‘8 In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & eight.Caption

Else

Txtpno.Text = Txtpno.Text & eight.Caption

End If

End Sub

Private Sub five_Click()

‘Display ‘5’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & five.Caption

Else

Page 78: Case Tools

Txtpno.Text = Txtpno.Text & five.Caption

End If

End Sub

Private Sub four_Click()

‘Display ‘4’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & four.Caption

Else

Txtpno.Text = Txtpno.Text & four.Caption

End If

End Sub

Private Sub MDIForm_Load()

Connect

End Sub

Private Sub nine_Click()

‘Display ‘9’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & nine.Caption

Else

Txtpno.Text = Txtpno.Text & nine.Caption

End If

End Sub

Private Sub one_Click()

‘Display ‘1’ In either pin field or card number field

If t = 0 Then

Page 79: Case Tools

TxtCno.Text = TxtCno.Text & one.Caption

Else

Txtpno.Text = Txtpno.Text & one.Caption

End If

End Sub

Private Sub seven_Click()

‘Display ‘ 7’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & seven.Caption

Else

Txtpno.Text = Txtpno.Text & seven.Caption

End If

End Sub

Private Sub six_Click()

‘Display ‘6’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & six.Caption

Else

Txtpno.Text = Txtpno.Text & six.Caption

End If

End Sub

Private Sub three_Click()

‘Display ‘3.’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & three.Caption

Else

Txtpno.Text = Txtpno.Text & three.Caption

End If

Page 80: Case Tools

End Sub

Private Sub two_Click()

‘Display ‘2’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & two.Caption

Else

Txtpno.Text = Txtpno.Text & two.Caption

End If

End Sub

Private Sub TxtCno_GotFocus()

‘Display ‘.’ In either pin field or card number field

t = 0

End Sub

Private Sub Txtpno_GotFocus()

t = 1

End Sub

Private Sub zero_Click()

‘Display ‘0’ In either pin field or card number field

If t = 0 Then

TxtCno.Text = TxtCno.Text & zero.Caption

Else

Txtpno.Text = Txtpno.Text & zero.Caption

End If

End Sub

Private Sub CmdInquery_Click()

‘Display the Balance enquery form

FrmBalance.Show

Page 81: Case Tools

MDIForm1.Visible = False

End Sub

Private Sub CmdSaving_Click()

‘Display the Deposit form

FrmDeposit.Show

End Sub

Private Sub CmdWithdraw_Click()

‘Display Withdrawal form

FrmWithdraw.Show

End Sub

Private Sub Command5_Click()

‘Close the window

MDIForm1.Visible = True

Unload Me

End Sub

Dim j As Integer

Private Sub CmdDone_Click()

FrmWelcome.Visible = True

Unload Me

End Sub

Private Sub Form_Load()

Connect

fg.TextMatrix(0, 0) = "Time"

fg.TextMatrix(0, 1) = "Date"

Page 82: Case Tools

fg.TextMatrix(0, 2) = "Amount"

fg.TextMatrix(0, 3) = "Transation"

fg.ColWidth(0) = 1400

fg.ColWidth(1) = 1100

End Sub

Private Sub Optcurrent_Click()

‘Balance Enquiry for Current Account

j = 1

fg.Rows = 1

str = "select * from deposit where pin ='" & MDIForm1.Txtpno.Text & "'and

type='current';"

rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText

If rs.BOF And rs.EOF Then

rs.Close

Exit Sub

Else

While rs.EOF = False

fg.Rows = fg.Rows + 1

fg.TextMatrix(j, 0) = rs!Time

fg.TextMatrix(j, 1) = rs!Date

fg.TextMatrix(j, 2) = rs!Amount

fg.TextMatrix(j, 3) = rs!Action

j = j + 1

rs.MoveNext

Wend

rs.Close

End If

End Sub

Private Sub Optsaving_Click()

Page 83: Case Tools

‘Balance Enquiry for Saving Account

j = 1

fg.Rows = 1

str = "select * from deposit where pin ='" & MDIForm1.Txtpno.Text & "'and

type='saving';"

rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText

If rs.BOF And rs.EOF Then

rs.Close

Exit Sub

Else

While rs.EOF = False

fg.Rows = fg.Rows + 1

fg.TextMatrix(j, 0) = rs!Time

fg.TextMatrix(j, 1) = rs!Date

fg.TextMatrix(j, 2) = rs!Amount

fg.TextMatrix(j, 3) = rs!Action

j = j + 1

rs.MoveNext

Wend

rs.Close

End If

End Sub

Private Sub CmdCsubmit_Click()

‘Save the amount to current Account database

If Not Txtsamound.Text = "" Then

rs.Open "deposit", cn, adOpenDynamic, adLockOptimistic, adCmdTable

rs.AddNew

rs!Amount = Val(Txtsamound.Text)

rs!Date = Date

rs!Time = Time

Page 84: Case Tools

rs!Type = "current"

rs!Action = "deposit"

rs!pin = MDIForm1.Txtpno.Text

rs.Save

MsgBox (" Record Saved Sucessfully")

rs.Close

End If

End Sub

Private Sub CmdDone_Click()

Unload Me

End Sub

Private Sub CmdSSubmit_Click()

‘Save the amount to saving Account database

If Not Txtcamound.Text = "" Then

rs.Open "deposit", cn, adOpenDynamic, adLockOptimistic, adCmdTable

rs.AddNew

rs!Amount = Val(Txtcamound.Text)

rs!Date = Date

rs!Time = Time

rs!Type = "saving"

rs!Action = "deposit"

rs!pin = MDIForm1.Txtpno.Text

rs.Update

MsgBox (" Record Saved Sucessfully")

rs.Close

End If

End Sub

Private Sub Form_Load()

Connect

Page 85: Case Tools

OptCurrent.Value = True

FrameCurrent.Visible = True

FrameSaving.Visible = False

End Sub

Private Sub Optcurrent_Click()

FrameCurrent.Visible = True

FrameSaving.Visible = False

End Sub

Private Sub Optsaving_Click()

FrameCurrent.Visible = False

FrameSaving.Visible = True

End Sub

Private Sub CmdCsubmit_Click()

‘Save the current withdrawal amount to database

If Not Txtsamound.Text = "" Then

rs.Open "deposit", cn, adOpenDynamic, adLockOptimistic, adCmdTable

rs.AddNew

rs!Amount = Val(Txtsamound.Text)

rs!Date = Date

rs!Time = Time

rs!Type = "current"

rs!Action = "withdraw"

rs!pin = MDIForm1.Txtpno.Text

rs.Save

MsgBox (" Record Saved Sucessfully")

rs.Close

Page 86: Case Tools

End If

End Sub

Private Sub CmdDone_Click()

Unload Me

End Sub

Private Sub CmdSSubmit_Click()

‘Save the saving withdrawal amount to database

If Not Txtcamound.Text = "" Then

rs.Open "deposit", cn, adOpenDynamic, adLockOptimistic, adCmdTable

rs.AddNew

rs!Amount = Val(Txtcamound.Text)

rs!Date = Date

rs!Time = Time

rs!Type = "saving"

rs!Action = "withdraw"

rs!pin = MDIForm1.Txtpno.Text

rs.Update

MsgBox (" Record Saved Sucessfully")

rs.Close

End If

End Sub

Private Sub Form_Load()

Connect

OptCurrent.Value = True

FrameCurrent.Visible = True

FrameSaving.Visible = False

Page 87: Case Tools

End Sub

Private Sub Optcurrent_Click()

FrameCurrent.Visible = True

FrameSaving.Visible = False

End Sub

Private Sub Optsaving_Click()

FrameCurrent.Visible = False

FrameSaving.Visible = True

End Sub

‘Module for global data declaration

Module 1

Public cn As Connection

Public rs As Recordset

Public cmd As Command

Public str As String

Function Connect()

Set cn = New ADODB.Connection

cn.Provider = "Microsoft.Jet.Oledb.4.0"

cn.Open App.Path & "\" & "database.mdb" ’ Database path and name

Set rs = New ADODB.Recordset

Set cmd = New ADODB.Command

End Function

Page 88: Case Tools

FORMS:

1. Login Form

Page 89: Case Tools

Frame

Flex Grid control

Page 90: Case Tools

Database Table Details

1. Deposit

2. New customer

Page 91: Case Tools

RESULT: Thus the software has been developed for ATM system successfully.

EX NO: STOCK MAINTANENCEDATE:

AIM: To develop a software for stock maintenance by using software engineering methodology.DESCRIPTION:

1. USE CASE DIAGRAM:

Stock in charge updates the stock list.

Stock in charge sells product to the customer.

Customer buys the same product.2. INTERACTION DIAGRAM:

A) SEQUENCE DIAGRAM:

Customer requires some items stock in charge the availability.

Then he provides the given list of items.

Customer order the items and the in charge sell the products.

B) COLLABORATION DIAGRAM:

Page 92: Case Tools

Customer needs some required items. Stock maintenance checks the availability.

Checking the items, stock in charge gives the list of items.

Customer orders the items and the stock in charge sells the product.

3. IMPLEMENTATION DIAGRAM:

A) ACTIVITY DIAGRAM:

Customer required item list of stock In charge.

Stock in charge checks the availability.

If it is available .It gives the list of items to the customer.

Customer bugs those items.

Otherwise cancels the item of list.

B) STATE CHART DIAGRAM:

This diagram provides the separate details of stock.

DATABASE DESCRIPTION: Analyze the project and design the stock maintenance form.

This form provides a separate form for Add, Delete and Update the stock.

In Add form add the stock details.

Similarly in Delete and Update form delete and update the stock list.

Page 93: Case Tools

USECASE DIAGRAM:

Stock Incharge Customer

buying some product

update the stock list

selling product

SEQUENCE DIAGRAM

Page 94: Case Tools

Customer checkingStock Maintenance

need some required iitems

check the availabilty

available

give the list of items

order the items

update the items

product list are ready

sell the products

COLLABARATION DIAGRAM:

Customer

checking

Stock Maintenance

1: need some required iitems5: order the items

4: give the list of items8: sell the products

2: check the availabilty6: update the items

3: available7: product list are ready

ACTIVITY DIAGRAM:

Page 95: Case Tools

required items list to stock incharge

check the availabilty

available the items

give the list of items

buy the items

cancel

customer

need the items from the particular date

not available

STATE CHART DIAGRAM:

Page 96: Case Tools

stock in

order the items

items are available

update the items

sell the items

order the items

items are available

update the items

sell the items

stock out

order the items

items are not available

rejectorder the items

items are not available

reject

CODING:Form1.vbPrivate Sub ADD_Click()Form2.Show

End Sub

Private Sub Data1_Validate(Action As Integer, Save As Integer)

End Sub

Private Sub Command1_Click()stock1.Recordset.MoveLast

End Sub

Private Sub Command2_Click()

Page 97: Case Tools

stock1.Recordset.MoveFirst

End Sub

Private Sub delete_Click()Form3.Show

End Sub

Private Sub update_Click()Form4.Show

End Sub

Form2.vb

Private Sub ADD_Click()stock1.Recordset.AddNewprodno = ""prodname = ""stock = ""rate = ""

End Sub

Form3.vb

Private Sub delete_Click()stock1.Recordset.delete

End Sub

Form4.vb

Private Sub update_Click()stock1.Recordset.Edit

End Sub

Input forms:

Page 98: Case Tools
Page 99: Case Tools
Page 100: Case Tools
Page 101: Case Tools
Page 102: Case Tools

OUTPUT FORMS:

Page 103: Case Tools
Page 104: Case Tools
Page 105: Case Tools

RESULT: Thus the software has been developed for the stock maintenance successfully.

Page 106: Case Tools

EX NO: REAL TIME SCHEDULERSDATE:AIM: To develop a software for implementing real time scheduling by using software engineering methodology.DESCRIPTION: 1. USE CASE DIAGRAM:

Customer has 2 choices of operation.Borrow: Customer gives the selected book along with the library card. librarian makes the entry & return the bookReturn: Customer gives the taken book in return section. librarian checks the book and make a note of fine if there Is any delay/damage in the book.

2. INTERACTION DIAGRAM: It has 2 types.

1. Sequence diagram2. Collaboration diagram.

SEQUENCE DIAGRAM: Customer returns the borrowed book in the return section. Customer selects another book and submits in the entry section along

with the library card. Librarian makes the entry and returns the book.

COLLABORATION DIAGRAM: Customer submits the previously taken book for returning. Librarian makes an entry & returns the card. Customer places another book for borrowing. Librarian makes the entry and returns the book.

3. IMPLEMENTATION DIAGRAM: It has 2 types.

1. Activity diagram.2. State chart (machine) diagram

ACTIVITY DIAGRAM: Customer returns the borrowed book in the return section. Librarian makes the entry and returns the card. Customer selects another books and submits it to the librarian for

entry. Librarian makes the enrollment.

STATECHART (MACHINE) DIAGRAM:Customer:

returns the borrowed book & pays fine(if necessary)

Page 107: Case Tools

Selects another book & submits it to the librarian for entry along with the librarian card.

Librarian: Receives the returned book and checks the date. collects fine for damage/delay in returning the book Makes the entry for the submitted book for borrowing and makes

the enrollment. Returns the book back to the customer.

USECASE DIAGRAM

STATUS OF THE BOOK

SEARCH & ASK FOR THE BOOK

ISSUE OF THE BOOK

LIBRARIANUSER

RETURN THE BOOK

BOOK: SEQUENCE DIAGRAM

Page 108: Case Tools

USERDATA BASE LIBRARIAN

SEARCH THE BOOK

STATUS OF THE BOOK

RESERVE THE BOOK

INTIMATE LIBRARIAN

REQUEST FOR THE BOOK

ISSUE OF THE BOOK

RETURN THE BOOK

VERIFY RETURN DATE & CALCULATE FINE

IF FINE PAY IT

REPEAT THE CHECK

BOOK: COLLOBORATION DIAGRAM

Page 109: Case Tools

USER DATA BASE

LIBRARIAN

3: REPEAT THE CHECK

1: SEARCH THE BOOK4: RESERVE THE BOOK

2: STATUS OF THE BOOK

6: REQUEST FOR THE BOOK8: RETURN THE BOOK

10: IF FINE PAY IT

7: ISSUE OF THE BOOK

5: INTIMATE LIBRARIAN

9: VERIFY RETURN DATE & CALCULATE FINE

BOOK: STATE CHART DIAGRAMBOOK SEARCHING

SERACH BASED ON AUTHOR

SERACH BASED ON TITLE

SERACH BASED ON ISBN

SERACH BASED ON AUTHOR

SERACH BASED ON TITLE

SERACH BASED ON ISBN

BOOK ISSUE

IS ELIGIBLE FOR LENDING

ISSUE THE ITEM

UPDATE THE DATABASE

IS ELIGIBLE FOR LENDING

ISSUE THE ITEM

BOOK RETURN

VERIFY RETURN DATE

CALCULATE FINE

PAY THE FINE, ELSE VACATE THE LIBRARY

RETURN THE BOOK

VERIFY RETURN DATE

CALCULATE FINE

PAY THE FINE, ELSE VACATE THE LIBRARY

RETURN THE BOOK

UPDATE THE DATABASE

Page 110: Case Tools

BOOK: ACTIVITY DIAGRAM

RESERVE THE BOOK

AVAIL

REQUEST THE LIBRARIAN

ISSUE OF THE BOOK

CHECK FOR FINE

PAY THE FINE

YES

SEARCH FOR SOME OTHER BOOK

OK

SEARCH BOOK

YES

DO SOME OTHER ACTIVITY / GO OUT

NO

BOOK RETURN

NO

YES

NO

CODING:MAIN.FRM:private Sub Label1_Click()Form2.ShowEnd SubPrivate Sub Label2_Click()Form5.ShowEnd Sub

Page 111: Case Tools

Private Sub Label3_Click()Form3.ShowEnd SubPrivate Sub Label4_Click()Form4.ShowEnd SubADD.FRM:private Sub addbook_Click() rs.Open "library", cn, adOpenDynamic, adLockOptimistic, adCmdTable rs.AddNew rs!bno = bno.Text rs!title = title.Text rs!aname = aname.Text rs!category = category.Text rs!price = price.Text rs!bstatus = "Available" rs!studid = "" rs.Update MsgBox "New Book Added", vbInformation rs.CloseEnd SubPrivate Sub clear_Click() bno.Text = "" title.Text = "" aname.Text = "" category.Text = "" price.Text = ""End SubPrivate Sub done_Click()Unload MeEnd SubPrivate Sub Form_Load()ConnectEnd SubISSUE.FRM:Private Sub Command3_Click()Unload MeEnd SubPrivate Sub Form_Load()connectEnd SubPrivate Sub issuebook_Click() str = "select count(*) from library where studid='" & studid.Text & "';" rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText If rs.Fields(0) >= 3 Then MsgBox "Already You Have Taken Maximum Of Three Books", vbCritical

Page 112: Case Tools

rs.Close Exit Sub Else rs.Close End If str = "select * from library where bno='" & bno.Text & "';" rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText If rs.BOF And rs.EOF Then rs.Close MsgBox "Not Found", vbCritical Else rs!studid = studid.Text rs!dat = Date rs!bstatus = "Not Available" rs.Update rs.Close MsgBox "Book Issued", vbInformation End IfEnd Sub

RECEIVE.FRM:Dim diff As IntegerPrivate Sub receive_Click() str = "select * from library where bno='" & bno.Text & "';" rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText If rs.BOF And rs.EOF Then rs.Close MsgBox "Not Found", vbCritical Else diff = (Date - DateValue(rs!dat)) - 15 rs!bstatus = "Available" rs!studid = "" rs!dat = "" rs.Update MsgBox "Book Received", vbInformation If diff > 0 Then MsgBox "You Are Late By " & diff & " Days, Pay Fine Rs." & diff, vbCritical End If rs.Close End IfEnd SubPrivate Sub exit_Click() Unload MeEnd SubPrivate Sub Form_Load() connect

Page 113: Case Tools

End Sub

SEARCH.FRM:Private Sub Form_Load()connectEnd SubPrivate Sub search_Click() str = "select * from library where bno='" & bno.Text & "';" rs.Open str, cn, adOpenDynamic, adLockOptimistic, adCmdText If rs.BOF And rs.EOF Then rs.Close MsgBox "Not found", vbCritical Else title.Text = rs!title aname.Text = rs!aname bstatus.Text = rs!bstatus studid.Text = rs!studid rs.Close End IfEnd SubMODULE:Public cn As ConnectionPublic rs As RecordsetPublic str As StringFunction connect() Set cn = New ADODB.Connection Set rs = New ADODB.Recordset cn.Provider = "microsoft.jet.oledb.4.0" cn.Open App.Path & "\" & "Library.mdb"End Function

LIBRARY MANAGEMENT:

Page 114: Case Tools

Figure(1)

ADD BOOK:

Figure(2)

Page 115: Case Tools

Figure(3)BOOK ISSUE:

Figure(4)

Page 116: Case Tools

Figure(5)BOOK RECEIVE:

Figure(6)

Page 117: Case Tools

Figure(7) BOOK SEARCH:

Figure(8)

Page 118: Case Tools

Figure(9) DATABASE:

Page 119: Case Tools

RESULT: Thus the project, online library management was build and executed successfully

Page 120: Case Tools

EX NO: COURSE REGISTRATION SYSTEMDATE:AIM: To implement the program for student course registration using Microsoft Visual Basic6.0 and Microsoft Access.PROCEDURE1. Select the start ->program->Microsoft visual stdio6.0-> Microsoft visual

basic6.02. Select new -> standard EXE and click open.3. Design the form2 to register the student as academic and personal details in

their registration.4. Design the form3 and form4 as per the department details from that college.5. Design the form5 to display the student detail from the entered information.6. Design the form6 as search that particular register number available in the data base.7. Type the coding and link that particular one.8. Select the start ->program->Ms-access->create new database and enter the field

name, data type and description.9. Goto control panel->Administrative Tools->Data sourse(ODBC)->add the database

Ms access driver(*.mdb) select the source and click ok.

USECASE DIAGRAM:

Page 121: Case Tools

Data For Registration

Search

AdministratorIf Found Display Msg To Admin

Message passing to admin

Database

If Not Found Display Msg

INTERACTION DIAGRAMA) SEQUENCE DIAGRAM:

Administrator Database

Registration details

Record registered

Searching for data

Displays data or data not found

B) COLLABORATION DIAGRAM:

Administrator

Enter Registration Details

Registrated In DataBase

1: Enter The details

2: Information stored in DataBase

3: Regisered info Msg Displayed To Admin

4: Searching for registered data

5: Displays the registered data or displays data not found

STATE MACHINE DIAGRAMA) ACTIVITY DIAGRAM:

Page 122: Case Tools

START

Administrator

Registration Searching

Database

END

B) STATE DIAGRAM:

START

Administrator Registering data

Database ENDData registered

START

Administrator Search data

Database Displays data or data not found END

CODING:MAIN.frmPrivate Sub Command1_Click()REGISTRATION.ShowMAIN.HideEnd SubRegistration.frmPrivate Sub Command4_Click()

Page 123: Case Tools

Adodc1.Recordset.AddNewCommand4.Visible = FalseCommand2.Visible = TrueEnd SubPrivate Sub Command1_Click()If Not REGISTRATION.Branch.ListIndex = 1 ThenMsgBox "hai"CS.ShowElseIT.ShowEnd IfEnd Sub Private Sub Command2_Click()If SSLC <= 59 And HSC <= 59 Then a = MsgBox("you are not eligible for registration", vbInformation)Else a = MsgBox("Registration done", vbInformation)End IfAdodc1.Recordset.UpdateEnd SubPrivate Sub Command3_Click()Search.ShowEnd SubCS.frmPrivate Sub Command1_Click()CS.HideREGISTRATION.ShowEnd SubIT.frmPrivate Sub Command1_Click()IT.HideREGISTRATION.ShowEnd SubSearch.frmPrivate Sub Command1_Click()With Search.Adodc1.RecordSource = "Select * From Register Where RegNo=" & Trim(Search.Text1.Text).Adodc1.RefreshIf .Adodc1.Recordset.EOF = True Then MsgBox "Not Found", vbInformationElse SearchResult.ShowEnd IfEnd WithEnd Sub

Page 124: Case Tools

FORM DESIGN

Page 125: Case Tools
Page 126: Case Tools
Page 127: Case Tools
Page 128: Case Tools

RESULT Thus the program for student course registration using Microsoft Visual Basic 6.0 and Microsoft Access has been successfully executed.EX NO: REMOTE PROCEDURE CALLDATE:AIM: To develop software for implementing remote procedures call by using software engineering methodology.DESCRIPTION:

1. USE CASE DIAGRAM:

Stock in charge updates the stock list.

Stock in charge sells product to the customer.

Customer buys the same product.2. INTERACTION DIAGRAM:

A) SEQUENCE DIAGRAM:

Customer requires some items stock in charge the availability.

Then he provides the given list of items.

Customer order the items and the in charge sell the products.

B) COLLABORATION DIAGRAM:

Customer needs some required items. Stock maintenance checks the availability.

Checking the items, stock in charge gives the list of items.

Customer orders the items and the stock in charge sells the product.

3. IMPLEMENTATION DIAGRAM:

A) ACTIVITY DIAGRAM:

Customer required item list of stock In charge.

Stock in charge checks the availability.

If it is available .It gives the list of items to the customer.

Customer bugs those items.

Page 129: Case Tools

Otherwise cancels the item of list.

B) STATE CHART DIAGRAM:

This diagram provides the separate details of stock.

DATABASE DESCRIPTION: Analyze the project and design the stock maintenance form.

This form provides a separate form for Add, Delete and Update the stock.

In Add form add the stock details.

Similarly in Delete and Update form delete and update the stock list.

USE DIAGRAM

Page 130: Case Tools

user

server

current process

remote view

check data availability

connect to remote server

server connected

INTERACTION DIAGRAMSEQUENCE DIAGRAM

user current process remote view check data availability

connect to the server

server

user is doing his work

user simultaneously checks the remote server

the user checks the availability of the data in the server

if data is available

remote server is connected to user

server replys to user that required data is available

COLLOBRATION

Page 131: Case Tools

user

current process

remote view

check data availability

connect to the server

server

1: user is doing his work

2: the user checks the availability of the data in the server

3: user simultaneously checks the remote server

4: if data is available

5: remote server is connected to user

6: server replys to user that required data is available

STATE MACHINE DIAGRAMACTIVITY DIAGRAM

user

current process

remote view

check the data availability

connect the server

inform user data not available

no

yes

STATE CHART DIAGRAM

Page 132: Case Tools

user process

doing current process

view remote server

ask the availability of data to server

data present and simultaniousaccess is done by user

doing current process

view remote server

ask the availability of data to server

data present and simultaniousaccess is done by user

server process

serverchecks the data availability

askes by userdata is present

server replys user data is available

remote server connected

serverchecks the data availability

askes by userdata is present

server replys user data is available

remote server connected

Page 133: Case Tools

RESULT: Thus the software has been developed for the Remote procedure call successfully

Page 134: Case Tools