LIST OF EXPERIMENTS
CYCLE – 1
1. 2. 3. 4.
Studen Studentt Mark Mark Analyz Analyzing ing Syste System m Quiz Sy System Course Course Registr Registrati ation on Syste System m Expe Experrt Sy System stem
CYCLE – 2
1. 2. 3. 4. 5.
Online Online Ticket Ticket Reserv Reservati ation on Syst System em Payr Payrol olll Syst System em ATM Sy Systems ems Stoc Stock k Main Mainte tena nanc ncee Real Real-T -Tim imee Sched Schedul uler er
LIST OF EXPERIMENTS
CYCLE – 1
1. 2. 3. 4.
Studen Studentt Mark Mark Analyz Analyzing ing Syste System m Quiz Sy System Course Course Registr Registrati ation on Syste System m Expe Experrt Sy System stem
CYCLE – 2
1. 2. 3. 4. 5.
Online Online Ticket Ticket Reserv Reservati ation on Syst System em Payr Payrol olll Syst System em ATM Sy Systems ems Stoc Stock k Main Mainte tena nanc ncee Real Real-T -Tim imee Sched Schedul uler er
STUDENT MARK ANALYSING SYSTEM EX NO: DATE: AIM: To implement the program for student mark analyzing system using Microsoft Visual Basic 6.0 and Microsoft Access. PROCEDURE: 1. Select Select the Start->Pro Start->Program-> gram->Micro Microsoft soft Visual Visual Studio Studio 6.0-> Microsoft Microsoft Visual Visual Basic 6.0
2. Select Select NewNew->St >Standa andard rd EXE EXE and clic click k open open 3. Design Design the Login Login form form to check check student’s student’s Academi Academicc and Personal Personal detail detailss 4. Design Design the Academi Academicc form for displa displaying ying the the student student mark mark 5. Design Design the Personal Personal form form for display displaying ing the student student personal personal informa information tion 6. Type the the coding coding for Academi Academicc and Personal Personal to to get the student student informat information ion 7. Select Select the Start-> Start-> Progra Program->Mi m->Microso crosoft ft Access->Cr Access->Create eate new databas databasee and enter the field name , data type and description 8. Go to Control Control panel panel ->Adminis ->Administrati trative ve tools ->Data ->Data source source (ODBC) (ODBC) ->Add ->Add the database Microsoft Access Driver (*.mdb). select the source and click ok
USECASE DIAGRAM
Add new
Academic
Administrator
Personal
Register number
Register number not found
INTERACTION DIAGRAM A) SEQUENCE DIAGRAM
Delete
Update
Database
Administrator
Database 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 detail s (update d m sg)
B) COLLABORATION DIAGRAM:
1: Enter the register number
7: data is(updated,deleted,added )
5: Administrator enter personal
3: Administrator enters Ac ademic Databas e
Administ rator 8: Displays (updated ,added,deleted)message 2: If data found specify(academic or personal) else not found
4: Shows Ac ademic details
STATE MACHINE DIAGRAM A) ACTIVITY DIAGRAM :
6: Shows personal details
START
Administrator
Academic
Personal
Database
END
B) STATE DIAGRAM: START
enter the register number
Administrator
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
Enters Academic
data(Update or delete or add)
Database
D i s p l a y s m o d i fi e d message
END
START
Administrator
Updates personal
Database
Displays updated message
E ND
CODING: LOGIN FORM: ACADEMIC: Private Sub Command1_Click() With Form3 .Adodc1.RecordSource = "Select * From Register Where RegNo= " & Trim(Form1.Text1.Text) .Adodc1.Refresh If .Adodc1.Recordset.EOF = True Then MsgBox "Not Found", vbInformation Else Form3.Show End If End With End Sub PERSONAL: Private Sub Command2_Click() With Form2 .Adodc1.RecordSource = "Select * From Register Where RegNo=" & Trim(Form1.Text1.Text) .Adodc1.Refresh If .Adodc1.Recordset.EOF = True Then
MsgBox "Not Found", vbInformation Else Form2.Show End If End With End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me Unload Form2 Unload Form3 End Sub PERSONAL FORM: BACK: Private Sub Command1_Click() Form2.Hide Form1.Show End Sub UPDATE: Private Sub Command2_Click() Adodc1.Recordset.Update MsgBox "RECORD UPDATED" End Sub
Private Sub Form_Load() Adodc1.Visible = False End Sub ACADEMIC FORM: BACK: Private Sub Command1_Click() Form3.Hide Form1.Show End Sub ADD NEW: Private Sub Command2_Click() Adodc1.Recordset.AddNew Text1.SetFocus End Sub DELETE: Private Sub Command3_Click() Adodc1.Recordset.Delete
MsgBox "RECORD DELETED" End Sub UPDATE: Private Sub Command4_Click() Adodc1.Recordset.Update MsgBox "RECORD UPDATED" End Sub
Private Sub Form_Load() Adodc1.Visible = False End Sub
FORM DESIGN: LOGIN FORM:
PERSONAL FORM:
ACADEMIC FORM:
SEARCHING:
STUDENT ACADEMIC DETAILS:
STUDENT PERSONAL DETAILS:
ACADEMIC MODULES: ADD NEW:
UPDATION:
DELETION:
PERSONAL MODULE: UPDATION:
UNAVAILABLE RECORD:
RESULT: Thus the software for student mark analyzing system was developed successfully.
QUIZ SYSTEM EX NO: DATE: 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:
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
Ans wer the question
Participant(s)
Judge Provide m ark if correct
Announce the results
SEQUENCE DIAGRAM
P ARTICIP A NTS
JUDGE DATABASE
Introduce himseif
Query the participant Ans wering the question
Add m ark if answer is c orrect
Update mark and inform the judge
Repeat for "N" Quest ions
Inform the status of the participants
Go to next round, if Qualified
Announce the final results
COLLABORATION DIAGRAM 6 : R e p e a t fo r " N " Q u e s t io n s 8 : G o t o n e x t ro u n d , i f Q u a lifi e d 1 : In t ro d u c e h im s e if 3 : A n s w e rin g t h e q u e s t io n PARTICIPANTS
JUDGE 2 : Q u e r y t h e p a r t ic i p a n t 7 : In f o r m t h e s t a t u s o f th e p a r ti c ip a n t s 9 : A n n o u n c e t h e fin a l r e s u l t s
4 : A d d m a r k i f a n s w e r i s c 5o :r reU cp td a t e m a r k a n d i n
DATABASE
STATE DIAGRAM
Querying Put up Questions & Options
Not answered, provide clues with reduced points
Check the time
Answering and Verification Answer the question
If answer is correct
Add one point
Yes
No
Proceed to next question
Update the Points Go to next round & start the query
Yes
Update the points
Calculate individual point(s)
If qualified
No
Eliminate the participants
Final Result Select top three members
Announce the final result
ACTIVITY DIAGRAM Querythe participants
Answering question
Answer is correct Yes No
No
No
Updatetheresults
Nochange
Endofcurrent round Yes Ifqualified
Yes
Endof rounds
No Elim inatethe participants Announcethefinal result
Yes
CODING Main.frm Private Sub Command1_Click () Unload Me Form2.Show End Sub Private Sub Command2_Click () Form7.Show End Sub Private Sub Command3_Click () Unload Me Form12.Show End Sub Rule1.frm Private Sub Command4_Click () Unload Me Form3.Show End Sub Round11.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option3.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF& End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click () Unload Me Form4.Show End Sub Private Sub Form_Load() Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub
Round12.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option3.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF& End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click () Unload Me Form5.Show End Sub Private Sub Form_Load () Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub Round13.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option2.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF& End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click () Unload Me
Form6.Show End Sub Private Sub Form_Load () Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub Score1.frm Private Sub Command1_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me Form1.Show End Sub Private Sub Command2_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me End Sub Rule2.frm Private Sub Command4_Click () Unload Me Form8.Show End Sub Round21.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option4.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF& End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click ()
Unload Me Form9.Show End Sub Private Sub Form_Load () Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub Round22.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option1.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF& End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click () Unload Me Form10.Show End Sub Private Sub Form_Load () Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub Round23.frm Private Sub Command1_Click () Data1.Recordset.Edit If Option2.Value = True Then Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Shape1.FillColor = &HFF00& Else Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) - 5 Shape1.FillColor = &HFF&
End If Data1.Recordset.Update Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False End Sub Private Sub Command2_Click () Unload Me Form11.Show End Sub Private Sub Form_Load () Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub Score2.frm Private Sub Command1_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me End Sub Private Sub Command2_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me End Sub
Rule3.frm Private Sub Command4_Click () Unload Me Form13.Show End Sub Round3.frm Option Explicit Dim t As Variant Private Sub Form_Load () Label1.Caption = 30 Option1.Value = False Option2.Value = False
Option3.Value = False Option4.Value = False Option5.Value = False Option6.Value = False Option7.Value = False Option8.Value = False Option9.Value = False Option10.Value = False Option11.Value = False Option12.Value = False Option13.Value = False Option14.Value = False Option15.Value = False Option16.Value = False End Sub Private Sub Option1_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Data1.Recordset.Update End Sub Private Sub Option11_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Data1.Recordset.Update End Sub Private Sub Option16_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Data1.Recordset.Update End Sub Private Sub Option8_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = Data1.Recordset.Fields (0) + 10 Data1.Recordset.Update End Sub Private Sub Timer1_Timer () If t = 0 Then Label1.Caption = 22 Frame1.Enabled = False Option1.Enabled = False Option2.Enabled = False Option3.Enabled = False Option4.Enabled = False Option5.Value = False Option6.Value = False Option7.Value = False
Option8.Value = False Label1.Caption = 18 t=t+1 Else If t = 1 Then Frame2.Enabled = False Option5.Enabled = False Option6.Enabled = False Option7.Enabled = False Option8.Enabled = False Option9.Value = False Option10.Value = False Option11.Value = False Option12.Value = False Label1.Caption = 14 t=t+1 Else If t = 2 Then Frame3.Enabled = False Option9.Enabled = False Option10.Enabled = False Option11.Enabled = False Option12.Enabled = False Option13.Value = False Option14.Value = False Option15.Value = False Option16.Value = False Label1.Caption = 8 t=t+1 Else If t = 3 Then Frame4.Enabled = False Option13.Enabled = False Option14.Enabled = False Option15.Enabled = False Option16.Enabled = False Timer1.Enabled = False Unload Me Form14.Show End If End Sub Score3.frm Private Sub Command1_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me Form1.Show
End Sub Private Sub Command2_Click () Data1.Recordset.Edit Data1.Recordset.Fields (0) = 0 Data1.Recordset.Update Unload Me End Sub
FORM DESIGN Main.frm
Rule1.frm
Round11.frm
Round12.frm
Round13.frm
Score1.frm
Rule2.frm
Round21.frm
Round22.frm
Round23.frm
Score2.frm
Rule3.frm
Round3.frm
Score3.frm
DATABASE WINDOW
RESULT: Thus the software has been developed for quiz system successfully.
EX NO: DATE
ONLINE RESERVATION SYSTEM
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.
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:
Request for reservation status Passing Availability to officer
Seats Available
Passing availability to passenger Reserved
Ticket Reserved
Officer Checking Database Checking status
Passenger
Reservation failed Passing inavailability
Passing inavailability to passanger
2. INTERACTION DIAGRAM: A) SEQUENCE DIAGRAM:
Seats not available
Passenger
Officer
Database
Requesting Ticket Checking Status of Availability
Availability:- Yes Ticket is Available
Reserve Ticket Ticket Reserved
Availability:- No Reservation Failed
B) COLLABORATION DIAGRAM:
1 : R e q u e s t i n g Ti c k e t & R e s e rve T i c k e t Passeng e r
Officer
4: Tick et is A vailable & Res ervation Failed 3: A vailability :-Yes & A vailability :- No 2 : C h e c k i n g S t a t u s o f A v a il a b il it y & t i c k e t
Databas e
ACTIVITY DIAGRAM:
P a s s e n g e r
R e q ue s tfo r rese rv atio nsta tu s
R eserv atio noffice r
C h e ck database
A v a ila b le
N o t av ailab le
R e s e rv e d
N o t R e s e rv e d
N ew StateInform topa ssen ge r
STATE DIAGRAM: Passenger Requesting
Officer
Database Checking Availability
Available
For
Request to Database for Vacancy Officer
Check the Database
For
Not Available
Response to request
Administrator
Ticket Reserved Available
Officer
Check the Database
Not available
Reservatio n Failed
Coding
Private Sub Command1_Click()
Response to request
Passenger
Data1.Recordset.AddNew End Sub Private Sub Command2_Click() If Data1.Recordset.EOF = True Then MsgBox ("No more files to delete") Else Data1.Recordset.Delete Data1.Recordset.MoveFirst End If End Sub Private Sub Command3_Click() Data1.Refresh End Sub Private Sub Command4_Click() Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified End Sub Private Sub Command5_Click() Data1.Recordset.MoveFirst End Sub Private Sub Command6_Click() If Data1.Recordset.BOF = True Then MsgBox ("No Files to see before") Else Data1.Recordset.MovePrevious End If End Sub Private Sub Command7_Click() If Data1.Recordset.EOF = True Then MsgBox ("No More Files") Else Data1.Recordset.MoveNext End If End Sub Private Sub Command8_Click() Data1.Recordset.MoveLast End Sub Private Sub Command9_Click()
Unload Me End Sub Input
Output
RESULT: Thus the software for online ticket reservation has been successfully developed.
PAYROLL PROCESSING
EX NO: DATE : 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. •
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
COLLECTEMPLOYEE DETAILS
CALCULATE SALARY DETAILS
EMPLOYEE
ACCOUNTANT
UPDATE THE DATABASE
ISSUE THE SALARY
SEQUENCE DIAGRAM EM PLO YEE
ACC OU N TAN T
DAT ABASE
EMPLOYEENAM E EMP LOYE EID
VER IFYTH EDAT A GE TTH EBASICPAYDE TA IL
CALC ULAT EHR A,DA,PA,GR OSS&NE TSALARY
UPD ATETHEDATABASE
GIVETH ESALA RY
COLLABORATION DIAGRAM 5: CALCULATE HRA,DA,PA,GROSS & NET SALARY
1: EMPLOYEE NAME 2: EMPLOYEE ID EMPLOYEE
ACCOUNTANT 7: GIVE THE SALARY
4: GET THE BASIC PAY DETAIL
3: VERIFY THE DATA 6: UPDATE THE DATABASE
DATA BASE
STATE CHART DIAGRAM DATA COLLECTION GET EMPLOYEE ID & NAME
VERIFY THE ID
CALCULATION GET THE BASIC PAY
UPDATE THE DETAILS IN DATA BASE
CALCULATE THE HRA, DA, PA, GROSS, NET SALARY
ISSUE OF SALARY
ACTIVITY DIAGRAM G E TT H EE M P L O Y E E D E T A IL S
V E R IF Y T H ED A T A N O
IFC O R R E C T Y E S G E TT H EB A S ICP A Y F R O MD A T A B A S E
C A L C U L A T ET H EH R A ,D A , P A ,G R O S S ,N E TS A L A R Y
U P D A T ET H ED A T A B A S E
form1
Private Sub Command1_Click() If Text1.Text = "vinoth" Then ElseIf Text2.Text = "engineer" Then Form2.Show Else MsgBox ("Wrong username or Password") Text1.Text = "" Text2.Text = "" Text1.SetFocus End If End Sub Form2
Private Sub Command2_Click() Form3.Show End Sub Private Sub Command3_Click() Form3.Show Form3.add.Visible = False Form3.update.Visible = False Form3.delete.Visible = False End Sub Form3
Option Explicit
Private Sub add_Click() Form3.Data1.Recordset.AddNew End Sub
Private Sub bs_LostFocus() 'PF pf.Text = Val(bs.Text) * 0.12 'da da.Text = Val(bs.Text) * 0.45 'hra hra.Text = Val(bs.Text) * 0.25
'gross salary gross.Text = Val(bs.Text) + Val(pf.Text) + Val(da.Text) + Val(hra.Text) 'net salary net.Text = Val(gross.Text) - Val(bs.Text) End Sub
Private Sub update_Click() Form3.Data1.UpdateRecord Form3.Data1.Recordset.Bookmark = Form3.Data1.Recordset.LastModified End Sub Private Sub delete_Click() If Form3.Data1.Recordset.EOF = True Then MsgBox ("No more record to Delete") Else If Form3.Data1.Recordset.BOF = True Then MsgBox ("No Record Have Been yet Entered to Delete") Else Form3.Data1.Recordset.delete Form3.Data1.Recordset.MoveNext End If End If End Sub Private Sub exit_Click() End End Sub
Output
Form1
form2
form3
viewing
Updation
Form3
RESULT: Thus the software has been developed for employee payroll system successfully.
EXPERT SYSTEM EX NO: DATE: 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 concept 2. 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.
USE CASE DIAGRAM:
Click Mouse Button to Move the object(car)
Player wins when the score reaches the target Player The game Ends when our car crashes an opposite object(car)
SEQUENCE DIAGRAM:
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:
3. STATE MACHINE DIAGRM : A. ACTIVITY DIAGRAM:
START
System / User Interface
player
Press Left / Right to Play The Game
If Score Is Above 50 Player Wins Player Plays The Game
If Gam e Over Play Again / Exit If Player Hits A n Object / Car...
B.STATE CHART MACHINE:
Player
Wait A Minitue
Press Left / Right Key of mouse to Play
Start
Player Plays The Game
End
End Player
Read the Score From The Score Box
If Game Is Completed Display The Score
Start
If Score Is Belove 50 Display game Over
If Score Is Above 50 Display Winner
End
CODING: // import java.awt.*; import java.applet.*; import java.awt.image.*; public class Car extends Applet implements Runna ble
{ 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);
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) {
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);
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);
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)
{ 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 {
Thread.sleep(Car.delay); } catch(InterruptedException exp) { } } } } FORM DESIGN
RESULT: Thus the project under Expert System by using the concept of Artificial intelligence has been designed successfully and its working is verified.
ATM SYSTEMS EX NO: DATE: 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.
USECASE DIAGRAM
In s e r t c a r d & V e r ifi c a t i o n
S e l e c t t y p e o f T ra n s a c t io n
C u s to m e r
A TM P e r fo r m t h e T ra n s a c t io n
T a k e t h e c a rd SEQUENCE DIAGRAM
CUSTOMER
ATM MACHINE
DATABASE
Insert the card
Enterpassword Check password
Prompt for Transaction type Select type of transaction
Check the account Performtransaction
Update the account
Repeat Transactions
Take the card
COLLABORATION DIAGRAM 9: Repeat Transactions 1: Insert the card 2: Enter password 5: Select type of transaction CUSTOMER
ATM MACHINE 7: Perform transaction 10: Take the card
4: Prompt for Transaction type 3: Check password 6: Check the account 8: Update the account DATABASE
STATE CHART DIAGRAM
A T M P ro c e s s I n s e r t C a Er d n t e r P iSn e l e c t T y p eP eo rf f o r m t h Te a k e t h eT a k e t h e T r a n s a c t i o Tn r a n s a c t i o Mn o n e y C a r d
I n s e r t C a r d & V e r if i c a t i o n S t a t e I n s e r t C a rE d n t e r C o r r eC ch t e c k t h e P IN P IN W ro n g
C o r r e Sc tp e c i f y t h e T ra n s a c tio n T y p e
M achi
Transaction Type Select the Transaction
Savings A/ C
Current A/ C
Select_1
Withdrawal
Select_2
Deposit
Withdraw
Deposite
Perform t he Transaction
YES
NO NewState
ACTIVITY DIAGRAM
Go to select the transaction state
Insert card
Enter pin Passwordnot accepted
Passwordaccepted Select Typeof Transaction
Current A/C
Withdraw
Savings A/C
Deposit
Withdrawl
Deposite
Select Option
Performthe Trasaction Select Another T ransaction Nom oreTransaction Takethecard
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
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
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
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
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
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"
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()
‘ 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, adLock Optimistic, adCmdTable rs.AddNew rs!Amount = Val(Txtsamound.Text) rs!Date = Date rs!Time = Time
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, adLock Optimistic, 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
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, adLock Optimistic, 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
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
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" Set rs = New ADODB.Recordset Set cmd = New ADODB.Command End Function
’ Database path and name
FORMS:
1. Login Form
Frame
Flex Grid control
Database Table Details 1. Deposit
2. New customer
RESULT: Thus the software has been developed for ATM system successfully.
STOCK MAINTANENCE
EX NO: DATE:
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:
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 u pdate the stock list.
USECASE DIAGRAM:
b u y i n g s o m e p ro d u c t
S t oc k In c h arge
update the stock list
selling product
SEQUENCE DIAGRAM
C u s t om e
Customer
Stock Maintenance
checking
needsomerequirediitems
check theav ailabilty
available
givethelist ofitem s
order theitems
updatetheitem s
product list areready
sell theproducts
COLLABARATION DIAGRAM: Custome r
checking 1: need som e required iitems 5: order the items
2: check the availabilty 6: update the items 4: give the list of items 8: sell the products
Stock Maintenance
ACTIVITY DIAGRAM:
3: available 7: product list are ready
custom er
requireditem s list tostock incharge
needtheitems fromthe particular date
check theav ailabilty
availablethe items
give thelist of items
buy theitems
STATE CHART DIAGRAM:
not available
cancel
stock in
order the it e m s
items are available
update the items
se ll the i te m s
stock out
order the i te m s
i te m s a r e n o t available
reject
CODING: Form1.vb Private 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()
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.AddNew prodno = "" 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:
OUTPUT FORMS:
RESULT: Thus the software has been developed for the stock maintenance successfully.
REAL TIME SCHEDULERS EX NO: DATE: 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 book • Return: 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 diagram 2. 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)
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
SEARCH & ASK FOR THE BOOK
STATUS OF THE BOOK
USER
LIBRARIAN ISSUE OF THE BOOK
RETURN THE BOOK
BOOK: SEQUENCE DIAGRAM
DATA BASE
USER
LIBRARIAN
SEARCH THE BOOK
STATUS OF THE BOOK
REPEAT THE CHECK
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
BOOK: COLLOBORATION DIAGRAM
3: REPEAT THE CHECK 1: SEARCH THE BOOK 4: RESERVE THE BOOK USER
DATA BASE 2: STATUS OF THE BOOK
6: REQUEST FOR THE BOOK 8: RETURN THE BOOK 10: IF FINE PAY IT
9: VERIFY RETURN DATE & CALCULATE FINE
7: ISSUE OF THE BOOK 5: INTIMATE LIBRARIAN
LIBRARIAN
BOOK: STATE CHART DIAGRAM BOOK SEARCHING
SERACH BASED ON AUTHOR
SERACH BASED ON TITLE
SERACH BASED ON ISBN
B O O K IS S U E
IS E LIGIBLE F OR LENDING
ISSUE THE ITEM
UPDATE THE DATABASE
BOOK RETURN
RETURN THE BOOK
VERIFY RETURN DATE
CALCULATE FINE
P A Y T H E F IN E , E L S E V A C A T E T H E L IB R A R Y
BOOK: ACTIVITY DIAGRAM YES
SEARCH BOOK
AVAIL
NO
SEARCH FOR SOME OTHER B OOK
YES
NO
RESERVE THE BOOK
DO SOME O THER ACTIVITY / GO OUT
REQUEST THE LIBRARIAN
ISSUE OF THE BOOK
BOOK RETURN
CHECK FOR FINE
NO
CODING: MAIN.FRM: private Sub Label1_Click() Form2.Show End Sub Private Sub Label2_Click() Form5.Show End Sub
OK
YES
PAY THE FINE
Private Sub Label3_Click() Form3.Show End Sub Private Sub Label4_Click() Form4.Show End Sub ADD.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.Close End Sub Private Sub clear_Click() bno.Text = "" title.Text = "" aname.Text = "" category.Text = "" price.Text = "" End Sub Private Sub done_Click() Unload Me End Sub Private Sub Form_Load() Connect End Sub ISSUE.FRM: Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() connect End Sub Private 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
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 If End Sub RECEIVE.FRM: Dim diff As Integer Private 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 If End Sub Private Sub exit_Click() Unload Me End Sub Private Sub Form_Load() connect
End Sub SEARCH.FRM: Private Sub Form_Load() connect End Sub Private 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 If End Sub MODULE: Public cn As Connection Public rs As Recordset Public str As String Function 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:
Figure(1) ADD BOOK:
Figure(2)
Figure(3) BOOK ISSUE:
Figure(4)
Figure(5) BOOK RECEIVE:
Figure(6)
Figure(7) BOOK SEARCH:
Figure(8)
Figure(9) DATABASE:
RESULT: Thus the project, online library management was b uild and executed successfully
EX NO: COURSE REGISTRATION SYSTEM DATE: AIM: To implement the program for student course registration using Microsoft Visual Basic6.0 and Microsoft Access. PROCEDURE 1. Select the start ->program->Microsoft visual stdio6.0-> Microsoft visual basic6.0 2. 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:
Search
Database
Data For Registration
Administrator
If Found Display Msg To Admin
If Not Foun d Display
Message pass ing to admin
INTERACTION DIAGRAM A) SEQUENCE DIAGRAM: Administrator
Database Registration details
Record registered Searching for data
Displays data or data not found
B) COLLABORATION DIAGRAM:
Administrator
4: Searching for registered data 5: Displays the registered data or displays data not found
1: Enter The details 3: Regisered info Msg Displayed To Admin
2: Information stored in DataBase Enter Registration Details
STATE MACHINE DIAGRAM A) ACTIVITY DIAGRAM:
Registrated In DataBase
START
Administrator
Registration
Searching
Database
END
B) STATE DIAGRAM: START
Administrator
Registering data
Database
Data registered
E ND
START
Administrator
Search data
CODING: MAIN.frm Private Sub Command1_Click() REGISTRATION.Show MAIN.Hide End Sub Registration.frm Private Sub Command4_Click()
Database
Displays data or data not found
EN
Adodc1.Recordset.AddNew Command4.Visible = False Command2.Visible = True End Sub Private Sub Command1_Click() If Not REGISTRATION.Branch.ListIndex = 1 Then MsgBox "hai" CS.Show Else IT.Show End If End 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 If Adodc1.Recordset.Update End Sub Private Sub Command3_Click() Search.Show End Sub CS.frm Private Sub Command1_Click() CS.Hide REGISTRATION.Show End Sub IT.frm Private Sub Command1_Click() IT.Hide REGISTRATION.Show End Sub Search.frm Private Sub Command1_Click() With Search .Adodc1.RecordSource = "Select * From Register Where RegNo=" & Trim(Search.Text1.Text) .Adodc1.Refresh If .Adodc1.Recordset.EOF = True Then MsgBox "Not Found", vbInformation Else SearchResult.Show End If End With End Sub
FORM DESIGN
RESULT Thus the program for student course registration using Microsoft Visual Basic 6.0 and Microsoft Access has been successfully executed. REMOTE PROCEDURE CALL EX NO: DATE: AIM: To develop software for implementing remote procedures call by using software engineering methodology. DESCRIPTION: 1. USE USE CASE CASE DIA DIAGR GRAM AM:: •
Stock in charge updates the stock list.
•
Stock in charge sells product to the customer.
Customer buys the same product. 2. INTERAC INTERACTIO TION N DIAGRA DIAGRAM: M: A) SEQ SEQUEN UENCE CE DIAGRA DIAGRAM: M: •
Customer requires some items stock in charge the availability.
•
Then he provides the given g iven list of items.
•
Customer order the items and the in charge sell the products.
B) COLLAB COLLABORA ORATIO TION N DIAGRA DIAGRAM: M:
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. IMPLEM IMPLEMENT ENTATIO ATION N DIAGRAM DIAGRAM:: A) ACTIVI ACTIVITY TY DIAGRA DIAGRAM: M: •
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 u pdate the stock list.
USE DIAGRAM
current process
user
remote view
check data availability
connect to remote server
server
server connected
INTERACTION DIAGRAM SEQUENCE DIAGRAM us er
c u rre n t p ro c e s s
user is doing his w ork
re m o t e vie w
c h e c k d a ta availability
c o n n e c t t o th e server
server
t h e u s e r c h e c k s t h e a v a il a b i li t y o f th e d a t a i n t h e s e r ve r
u s e r s i m u l t a n e o u s l y c h e c k s t h e r e m o t e s e rve r i f d a t a i s a va i l a b l e
r em o t e s e r ve r i s c o n n e c t e
s e rve r r e p ly s t o u s e r t h a t r e q u i re d d a t a i s a va i la b l e
COLLOBRATION
current process 1: user is doing his work
3: user simultaneously c hecks the remote server user
remote view 6: server replys to user that required data is available
connect to the server
5: remote s erver is connected to user
server
2: the user checks the availability of the data in the server 4: if data is available
check data availability
STATE MACHINE DIAGRAM ACTIVITY DIAGRAM
user
current process
remote view
check the data availability no
informuser data not available
yes connect the server
STATE CHART DIAGRAM
u s e r p ro c e s s
d a t a p re s e n t a n d d o i n g c u r r e nv ite w r e m o t ae s k t h e a v a i l a b i l i t y o f s im u l t a n i o u s a c c e s s is d o n e b y process server d a ta t o s e r ve r
s e rve r p ro c e s s
server
c h e c k s t h e d a t a da av ta ai l ai sb i l i st ye r v e r r e p l y s ru es me ro t e s e r v e r a s k e s b y u s e rp r e s e n t d a t a i s a v a i l a b c l oe n n e c t e d