0% found this document useful (0 votes)
91 views63 pages

OOAD Lab Record

This document contains the analysis and design of a passport automation system using object-oriented concepts. The system allows applicants to apply for a passport online by entering their personal details and submitting documents. Administrators can process applications, verify details with police, and dispatch passports. The analysis includes use case diagrams showing the interactions between applicants and administrators. It also provides class, sequence, activity, collaboration, and deployment diagrams, as well as code snippets for the system forms and classes.

Uploaded by

Vivek Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views63 pages

OOAD Lab Record

This document contains the analysis and design of a passport automation system using object-oriented concepts. The system allows applicants to apply for a passport online by entering their personal details and submitting documents. Administrators can process applications, verify details with police, and dispatch passports. The analysis includes use case diagrams showing the interactions between applicants and administrators. It also provides class, sequence, activity, collaboration, and deployment diagrams, as well as code snippets for the system forms and classes.

Uploaded by

Vivek Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 63

CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

You Choose, We Do it

St. JOSEPH’S COLLEGE OF ENGINEERING


St. Joseph’s Group of Institutions

OMR, CHENNAI-119
BONAFIDE CERTIFICATE
This is a certified bonafide record book of ____________Anusha B_________

Register No.______312318104023_______Submitted for the University Practical

Examinations held on _____________in Object Oriented Analysis and Design

Laboratory during the year 2020 / 2021

LAB IN – CHARGE HOD

DATE: DATE:

INTERNAL EXAMINER EXTERNAL EXAMINER

DATE: DATE:

St.Joseph’s College of Engineering 1


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

INDEX
Name of the Student: Anusha B
Department: Computer Science and Engineering
Roll No: 18CS133
Reg.No: 312318104023
Name of the lab with code: Object Oriented Analysis and Design: CS8582
Lab Incharge: Dr. Anitarose
Page No Date of Staff Date
S.No. Date Name of the Experiment Mark
Sub Sign
1 18/08/2020 Passport Automation System 3 to 12 25/08/2020

2 25/08/2020 Book Bank 13 to 21 01/09/2020

3 01/09/2020 Exam Registration 22 to 30 08/09/2020

4 08/09/2020 Stock maintenance system 31 to 40 15/09/2020

5 15/09/2020 Online course reservation 41 to 47 22/09/2020


system
6 22/09/2020 E-ticketing 48 to 55 29/09/2020

7 29/09/2020 Software personnel 56 to 63 06/10/2020


management system

EX.NO: 1 PASSPORT AUTOMATION SYSTEM


AIM:

St.Joseph’s College of Engineering 2


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

To create an application for passport automation system using uml concept


SCOPE:
The passport automation system provides an online interface to the user where they can fill in
their personal details and submit the necessary documents to apply for passport.
DEFINITIONS, ACRONYMS AND ABBREVIATIONS:
Administrator – Refers to the super user who is the central authority who has been nested with the
privilege to manage entire system.
Applicant – One who wishes to obtain the passport.
OVERVIEW:
Classified into two main sections namely, Overall Description and Overall Requirements.
OVERALL DESCRIPTION:
This section describes about the use case modeling survey, assumption and dependencies.
❖ Use- Case Model Survey:
Applicant applies for passport online, which is verified by the administrator; the police officer has the
authority to issue/reject the passport. After the interview of an applicant the passport is issued by
post.
● Introduction:
Use case model is a part of UML that defines the functionality of each actor or person involved
in the project, it is done by defining use case for each actor, one or more actors can be
given an use case.
● Survey Description:
Enter information:
The user enters his/her personal information with proof and references.
Queries:
The user can enquire about the issue of passport.
Transaction:
The user can view about the status of passport issue.
Proceed/Reject:
The passport can be issued or rejected by the passport officer and police.
❖ Assumptions and Dependencies:
The applicant and administrator must have basic knowledge of computers and language in the
internet. Applicants may be required to scan the documents and send.
Overall Requirements:
The system gathers requirements such as software to run the database for storing the
details of the customer.
❖ Use-Case Specification:
The candidate enters into the passport site and feed the personal information. The passport department
forwards the information to the police dept. to enquire about the candidate. If everything goes
well the acknowledgement number is provided to the candidate for further clarification with
which the candidate can check his/her status.
❖ Functionality:
The passport automation system is used to facilitate quick processing of acquiring passport.
❖ Usability:
The passport automation system is used to get passport with quick processing and delivery.
❖ Reliability:
The passport automation system assures to provide authenticated passports and confidential.
❖ Performance:
The passport automation system performs immediate actions once the registrations are done.

St.Joseph’s College of Engineering 3


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

USE CASE DIAGRAM:

registration

check status

applicant admin
process
application

dispatch passport

CLASS DIAGRAM:

ACTIVITY DIAGRAM 1:

St.Joseph’s College of Engineering 4


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM 2:

ACTIVITY DIAGRAM 3:

St.Joseph’s College of Engineering 5


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM 1:

SEQUENCE DIAGRAM 2:

St.Joseph’s College of Engineering 6


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

applicant system database

1.enter applicant ID

2.fetch details for the applicant

3.display the status

SEQUENCE DIAGRAM 3:
applicant system database

1.request for registration

2.register form

3.fill in details

4.submit

5.give applicant ID

6.store full details

COLLABORATION DIAGRAM 1:

St.Joseph’s College of Engineering 7


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

username/password authentication succeed


/ /system /admin
administrator panel

details of applications yet to be processed


details of applications dispatched
give details
dispatch eligible passports

enter applicant ID to process

/
/ applican
databas t
e
COLLABORATION DIAGRAM 2:
enter applicant ID
/applicant /system

display the status

fetch details for the applicant

/database

St.Joseph’s College of Engineering 8


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COLLABORATION DIAGRAM 3:

store full details


/system /database

request for registration


fill in details
give applicant ID
register form
submit

/applicant

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

CODING AND FORMS

St.Joseph’s College of Engineering 9


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

package pass;
public class Main {
public static void main(String[] args) {
// TODO code application logic here
new pass().setVisible(true);
}
}

package pass;

public class select extends javax.swing.JFrame {


/** Creates new form select */
public select() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new user().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new login().setVisible(true);
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

St.Joseph’s College of Engineering 10


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

// TODO add your handling code here:


setVisible(false);
new login().setVisible(true);
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new login().setVisible(true);
}

package pass;
public class user extends javax.swing.JFrame {
/** Creates new form user */
public user() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new registre().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new alogin().setVisible(true);
}
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
public class registre extends javax.swing.JFrame {
/** Creates new form registre */
public registre() {

St.Joseph’s College of Engineering 11


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

initComponents();
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String name=jTextField3.getText();
String dob=jTextField1.getText();
String username=jTextField4.getText();
String password=jPasswordField1.getText();
String adds=jTextArea1.getText();
String id=jTextField2.getText();
try {
PreparedStatement psm=null;
Class.forName("com.mysql.jdbc.Driver")
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/stock", "root", "");
String sql="insert into pass
values('"+name+"','"+dob+"','"+username+"','"+password+"','"+adds+"','"+id+"')";
Statement stm=conn.createStatement();
stm.executeUpdate(sql);
JOptionPane.showMessageDialog(null, "Successfully Registered!!");
new cancel().setVisible(true);
} catch(Exception e) {
JOptionPane.showMessageDialog(null, "Error Occured!");
}
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(true);
new cancel().setVisible(true);
}
RESULT:

Thus the application for passport automation system using uml concept has been executed.
Viva Questions:
1. What is UML?
2. Define modeling in UML.
3. What are the advantages of UML?
4. What are the different views in UML?
5. Define SDLC

EX NO: 2 BOOK BANK


AIM

St.Joseph’s College of Engineering 12


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

To create an application for book bank using uml concept.


PROBLEM STATEMENT:
The main aim of the project deals with checking for availability of books and there by supplying and
returning of the books .The main objective of designing and developing a book bank management system
which proves to be manually benefial. (i.e) benefits both the students and the administration. This
provides the overall information of the supplying and returning of books book bank system is where the
books can be collected every semester and must be returned at the end of semester. The system must have
option for new members to enroll for membership by paying deposit. A provision for getting six or seven
books per semester. Membership can be renewed by using register number. A database must be
maintained to guide the issue to mark the details of students. Search option must be provided so that the
members can search for the availability of a particular book.

MODULE DESCRIPTION:
MODULE 1: (HOME PAGE)
It contains the home page which has the login and registration.
MODULE 2: (ADMINISTRATION FORM)
The students’ details are gathered and the information is updated in the database.
MODULE 3:
The member can login and check the availability of books.
USE CASE DIAGRAM:

CLASS DIAGRAM:

St.Joseph’s College of Engineering 13


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM 1: (LOGIN)

ACTIVITY DIAGRAM 2: (ISSUE A BOOK)

St.Joseph’s College of Engineering 14


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM 3: (RETURN A BOOK)

ACTIVITY DIAGRAM 3: (STUDENT DETAILS)

St.Joseph’s College of Engineering 15


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM:

St.Joseph’s College of Engineering 16


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COLLABORATION DIAGRAM:
1: enquiry about books
4: submit details
3: if interested in becoming a member 6: pay initial amount
8: short list books
12: else report delay
13: return book
16: report fine
17: pay fine
/STUDEN /ADMINIST
T RATION
2: send detail scheme
7: issue of id
11: issue book if available
18: refund of money

10: response to request


15: incase due or damage
5: enter student details
9: check availability
14: check if any damage or due

/DATABA
SE

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

CODING AND FORMS

St.Joseph’s College of Engineering 17


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

public class book extends javax.swing.JFrame {


public book() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new login().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new cancel().setVisible(true); }
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class login extends javax.swing.JFrame {
/** Creates new form login */
public login() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String s1=jTextField1.getText();
String s2=jPasswordField1.getText();
System.out.println(s1);
System.out.println(s2);
try
{
ResultSet rs;

St.Joseph’s College of Engineering 18


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:bookbank");
String s="select * from pass where username = '" +s1+"'and password = '"+s2+"'";
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(s);
int count=0;
while(rs.next())
{
count++;
}
if(count==1)
new bb().setVisible(true);
else
JOptionPane.showMessageDialog(null,"Wrong Password");
}
catch (Exception e)
{
JOptionPane.showMessageDialog(null, e.getMessage());
}}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new login().setVisible(true);
}

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class bb extends javax.swing.JFrame {
/** Creates new form bb */
public bb() {

St.Joseph’s College of Engineering 19


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String name=jTextField1.getText();
String author=jTextField2.getText();
try
{
PreparedStatement psm=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:bookbank");
String sql="insert into book values('"+name+"','"+author+"')";
Statement stm=conn.createStatement();
stm.executeUpdate(sql);
JOptionPane.showMessageDialog(null, "Successfully Registered!!");
setVisible(false);
new verify().setVisible(true);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, " Successfully Registered!!");
new verify().setVisible(true);
} }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new bb().setVisible(true); }

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;

St.Joseph’s College of Engineering 20


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

import net.proteanit.sql.DbUtils;
public class verify extends javax.swing.JFrame {
/** Creates new form verify */
public verify() {
initComponents();
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new verify().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
new payment().setVisible(true);
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:bookbank");
String sq="select * from book" ;
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
} catch(Exception e)
{
System.out.println(e.getMessage()); } }
RESULT:
Thus the application for book bank using uml concept has been executed.
Viva Questions:
1. Explain the types of diagrams in UML.
2.Building blocks of UML
3.Relationship in UML.
4.Diagrams in UML.
5.What are the three types of modeling in UML?

St.Joseph’s College of Engineering 21


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

EX NO:3 EXAM REGISTRATION SYSTEM

AIM:
To create an application for exam registration system using uml concept.
PROBLEM STATEMENT:
To create an Exam Registration software that will meet the needs of the applicant and help them in
registering for the exam ,enqiry about the registered subject,modification in database and cancellation for
the registered project.
OVERALL DESCRIPTION:
The Exam Registration system is an integrated system that has four modules as part of it.The four
modules are:
❖ REGISTRATION FOR EXAMS
o In this module,the user can select the subject to register for the exam,enquire about the
registered subject,modification in the student database,cancelling the registered subject.
❖ FORM FOR REGISTRATION
o In this module the user can apply for the exam by giving the details about the candidate
and selecting the subject for registration.
❖ MODIFICATION IN THE DATABASE
o In this module the user can change the data like the phone number, address can be done.
❖ CANCELLATION FOR THE REGISTERED SUBJECT
In this module the user can cancel the name which is registered for the exam.
USE CASE DIAGRAM:

CLASS DIAGRAM:

St.Joseph’s College of Engineering 22


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM:

SEQUENCE DIAGRAM:

St.Joseph’s College of Engineering 23


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COLLABORATION DIAGRAM:
2: Select the subject
3: Apply for the exam
/Student /Exam

6: Note the id

5: Generation of id
7: Modification

4: Information stored

/Databas
e

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

IMPLEMENTATION:

St.Joseph’s College of Engineering 24


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

public class opening extends javax.swing.JFrame {


public opening() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
new register().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
new login().setVisible(true);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new opening().setVisible(true);
}
});
}
privatejavax.swing.JButton jButton1;
privatejavax.swing.JButton jButton2;
privatejavax.swing.JLabel jLabel1;
// End of variables declaration}

St.Joseph’s College of Engineering 25


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

public class register extends javax.swing.JFrame {


public register() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
// student sd=new student();
String a=jTextField1.getText();
String b=jTextArea1.getText();
String c=jTextField2.getText();
String d=(String) jComboBox1.getSelectedItem();
String e=jTextField3.getText();
String f=jTextField4.getText();
String g=(String) jComboBox2.getSelectedItem();
String h=(String) jComboBox3.getSelectedItem();
String i=jTextField5.getText();
String j=jTextField6.getText();
student s=new student(a,b,c,d,e,f,g,h,i,j);
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new register().setVisible(true);
}
});
}
STUDENT:
importjava.sql.*;
importjavax.swing.JOptionPane;
public class student
{

St.Joseph’s College of Engineering 26


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

public String name;


private String address;
private String dob;
private String gender;
private String college;
private String sub;
private String sem;
private String year;
private String deg;
private String branch;
privateint pay;
//public database theDatabase;
/**
@roseuid 54BE161601DA
*/
public student(String
name,Stringaddress,Stringdob,Stringgender,Stringcollege,Stringsubjects,Stringsem,Stringyear,Stringdeg,
String branch )
{
try{
System.out.println(name+address+dob+gender+college+subjects+sem+year+deg+branch);
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:exam");
String sql="insert into studentdetails
values('"+name+"','"+address+"','"+dob+"','"+gender+"','"+college+"','"+subjects+"','"+sem+"','"+year+"','
"+deg+"','"+branch+"')";
Statement stm=conn.createStatement();
stm.executeUpdate(sql);
JOptionPane.showMessageDialog(null, "sucessfullyregisterd") }
catch(Exception ex)
{
System.out.println(ex.getMessage());
JOptionPane.showMessageDialog(null, "error occured in connection");
}
}

St.Joseph’s College of Engineering 27


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

public class login extends javax.swing.JFrame {


public login() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
String s1=jTextField1.getText();
String s2=jPasswordField1.getText();
databasedb=new database(s1,s2);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new login().setVisible(true);
}
});
}
DATABASE:
importjava.sql.*;
importjavax.swing.JOptionPane;
public class database
{
/**
@roseuid 54BE1616026E
*/
public database(String s1,String s2)
{
try{
PreparedStatementpstm;
ResultSetrs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:exam");
String sq="select * from userdetails where username = '" +s1+"'and password = '"+s2+"'" ;
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");

St.Joseph’s College of Engineering 28


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

int count = 0;
while(rs.next())
{
count ++;
}
if(count == 1)
{
new verify().setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null, "INVALID PASSWORD");
}}

importjavax.swing.JOptionPane;
importnet.proteanit.sql.DbUtils;
import java.sql.*;
public class verify extends javax.swing.JFrame {
public verify() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
try
{
//String s=jTextField1.getText();
ResultSetrs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:exam");
String sq="select * from studentdetails ";
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");
// System.out.println("check:"+rs.getInt("count")
jTable1.setModel(DbUtils.resultSetToTableModel(rs));

St.Joseph’s College of Engineering 29


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

}
catch(Exception ex){
JOptionPane.showMessageDialog(null, "error occurs");}
}
private void jButton2ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
new opening().setVisible(true);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new verify().setVisible(true);
}
}); }
RESULT:
Thus the application for exam registration system using uml concept has been executed.
Viva Questions:
1.What is architecture?
2. What are messages?
3.What is component diagram?
4. What are the various components in sequence diagram?
5.What are the parts of the deployment diagram?

St.Joseph’s College of Engineering 30


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

EX NO: 4 STOCK MAINTAINANCE SYSTEM


AIM:
To create an application for Stock maintenance system using uml concept

PROBLEM STATEMENT:
Stock maintenance system is the function of understanding the stock mix of a company and different
demands on stock. The demands are influenced by both external and internal factor and are balanced by
certain purchase and request to keep supplies at a reasonable or prescribed level. They are starting from
request for new stock from stores to head office issues purchase order to vendor, the vendor ships the
goods, ware house receives the goods. Ware house receives the goods, warehouse stocks and distributes
to the stores. The whole economic status is being improved properly if stock is maintained.

USECASE DIAGRAM:

St.Joseph’s College of Engineering 31


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

CLASS DIAGRAM:

St.Joseph’s College of Engineering 32


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM:

St.Joseph’s College of Engineering 33


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM:

COLLABORATION DIAGRAM:
4: require stock information
7: update stock details
9: pay cash
/custome
r /authoriz
er

1: enter log details


2: create account
5: check stock availability
6: return stock availability
3: return log details 8: buy stock
11: delivers
10: billing

12: update stock details


/system /store
keeper

St.Joseph’s College of Engineering 34


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COMPONENT DIAGRAM:

DEPLOYMENT DAIGRAM:

CODING AND FORMS

package Sample;
import java.sql.*;
import javax.swing.JOptionPane;
public class Login extends javax.swing.JFrame {
public Connection con;
public Statement st;
public Login() {
initComponents();

St.Joseph’s College of Engineering 35


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

try
{
Class.forName("com.mysql.jdbc.Driver")
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/stock", "root", "");
st=con.createStatement();
JOptionPane.showMessageDialog(null, "You are now connected...!!!");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to connect");
} }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
String user = jTextField1.getText();
String pass = String.valueOf(jPasswordField1.getText());
String sqlquery1 = "Select * from login where username='"+user+"'and password='"+pass+"'";
ResultSet rs = st.executeQuery(sqlquery1);
if(rs.next())
{
setVisible(false);
new New().setVisible(true);
}
else{
JOptionPane.showMessageDialog(null, "Wrong username or password");
}
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to login");
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new Applicant().setVisible(true);
}

St.Joseph’s College of Engineering 36


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

package Sample;
import java.sql.*;
import javax.swing.JOptionPane;
public class Applicant extends javax.swing.JFrame {
public Connection con;
public Statement st;
/** Creates new form start */
public Applicant() {
initComponents();
try
{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/stock", "root", "");
st=con.createStatement();
JOptionPane.showMessageDialog(null, "You are now connected...!!!");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to connect");
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
String name = jTextField1.getText();
String dob = jTextField2.getText();
String addr = jTextArea1.getText();
String email = jTextField5.getText();
String mob = jTextField4.getText();
String sqlquery1 = "Insert into register
values('"+name+"','"+dob+"','"+addr+"','"+email+"','"+mob+"')";
st.executeUpdate(sqlquery1);
JOptionPane.showMessageDialog(null, "Data successfully inserted");
setVisible(false);

St.Joseph’s College of Engineering 37


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Data insertion failure");
}
new Login().setVisible(true);
}
package Sample;

import java.sql.*;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
import java.lang.String.*;
/**
*
* @author Keerthana
*/
public class Status extends javax.swing.JFrame {
public Connection connect;
public Statement st;
String category;
/** Creates new form Status */
public Status(String c) {
initComponents();
category=c;
try
{
Class.forName("com.mysql.jdbc.Driver");
connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/stock", "root", "");
st=connect.createStatement();
JOptionPane.showMessageDialog(null, "You are now connected...!!!");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to connect");

St.Joseph’s College of Engineering 38


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

}
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
String sqlquery1 = "Select * from details where category='"+category+"'";
ResultSet rs = st.executeQuery(sqlquery1);
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to display stock details");
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
int count,count2;
String stock = jTextField3.getText();
int qty = Integer.parseInt(jTextField1.getText());
String sqlquery1 = "Select * from details where stock='"+stock+"'";
ResultSet rs1 = st.executeQuery(sqlquery1);
while(rs1.next()){
if(qty<=(rs1.getInt(3))){
count=rs1.getInt(3);
count-=qty;
String sqlquery2 = "Update details set qty='"+count+"' where stock='"+stock+"'";
st.executeUpdate(sqlquery2);
JOptionPane.showMessageDialog(null, "Stocks purchased");
setVisible(false);
new Thanks().setVisible(true);
}
else
JOptionPane.showMessageDialog(null, "No stock available");
}
}
catch(Exception e)
{
//JOptionPane.showMessageDialog(null, "Unable to check details");
}
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String reg = jTextField1.getText();
setVisible(false);

St.Joseph’s College of Engineering 39


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

new Thanks().setVisible(true);
RESULT:
Thus the application for Stock maintenance system using uml concept has been executed.
Viva Questions:
1.What are the different elements of a collaboration diagram?
2. What are the elements of activity diagram?
3. What are the different elements of use case?
4. What is the difference between activity and use case diagram?
5. What is component diagram?

St.Joseph’s College of Engineering 40


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

EX NO: 5 ONLINE COURSE RESERVATION SYSTEM


AIM:
To create an application for online course reservation system using uml concept.

PROBLEM STATEMENT:
The software which displays the list of courses available for the mark that the student get and the
student can able to allocate best course from the choice available.It displays and allocates courses based
on student ranking.The student ranking is based on marks,caste and community.Based on caste and
community the ranking may varied.This software allows the student to choose the best college for the
available courses.
USE CASE DIAGRAM:

CLASS DIAGRAM:

St.Joseph’s College of Engineering 41


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM:

St.Joseph’s College of Engineering 42


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

St.Joseph’s College of Engineering 43


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COLLABORATION DIAGRAM:

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

St.Joseph’s College of Engineering 44


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

CODING AND FORMS

package Sample;
public class Welcome extends javax.swing.JFrame {
/** Creates new form Welcome */
public Welcome() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new Applicant().setVisible(true);
}

package Sample;
import java.sql.*;
import javax.swing.JOptionPane;
public class Applicant extends javax.swing.JFrame {
public Connection con;
public Statement st;

St.Joseph’s College of Engineering 45


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

/** Creates new form start */


public Applicant() {
initComponents();
try
{
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/course", "root", "");
st=con.createStatement();
JOptionPane.showMessageDialog(null, "You are now connected...!!!");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to connect");
}
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try{
String name = jTextField1.getText();
String fname = jTextField2.getText();
String dob = jTextField3.getText();
String addr = jTextArea1.getText();
String clgcode = jTextField7.getText();
String drg = jComboBox3.getSelectedItem().toString();
String yr = jTextField6.getText();
String email = jTextField4.getText();
String mob = jTextField5.getText();
String course = jComboBox1.getSelectedItem().toString();
String sch = jComboBox2.getSelectedItem().toString();
String payment="Unpaid";
String sqlquery1 = "Insert into register
values('"+name+"','"+fname+"','"+dob+"','"+addr+"','"+clgcode+"','"+drg+"','"+yr+"','"+email+"','"+mob+
"','"+course+"','"+sch+"','"+payment+"')";
st.executeUpdate(sqlquery1);
JOptionPane.showMessageDialog(null, "Data successfully inserted");
setVisible(false);
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Data insertion failure");
}
new Register().setVisible(true);
}
package Sample;
import java.sql.Connection;

St.Joseph’s College of Engineering 46


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class Register extends javax.swing.JFrame {
public Connection connect;
public Statement st;
/** Creates new form Register */
public Register() {
initComponents();
try
{
Class.forName("com.mysql.jdbc.Driver");
connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/course", "root", "");
st=connect.createStatement();
JOptionPane.showMessageDialog(null, "You are now connected...!!!");
}
catch(Exception e)
{
JOptionPane.showMessageDialog(null, "Unable to connect");
}
}

RESULT:
Thus the application for online course reservation system using uml concept has been executed.
Viva Questions:
1.What is the difference between uses and extends?
2.How do we represent private, public and protected in class diagrams?
3.What does association in a class diagram mean?
4.What is uml use case diagram?
5.What does aggregation mean in a class diagram?

St.Joseph’s College of Engineering 47


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

EXNO: 6 E-TICKETING SYSTEMS


AIM:
To create an application for E-Ticketing systems using uml concept.

PROBLEM STATEMENT:
This project enables a user to perform the following operations.
● Online Booking of tickets
● Online cancellation of tickets
● Online Enquiry system
● Online ticket status checking
The booking service accepts the source;destination derails along with the train name and date of service.
According to the availability of tickets, the particular passenger is allotted a seat on the particular train.
The tickets would be displayed in a particular passenger is allotted a seat on the particular train. The ticket
would redisplay in a printable format along with a unique seat number to differentiate between online
ticket reservations. The cancellation services comes in very handy in case of emergency cancellation
where in a passenger who has already booked his tickets can follow easy steps to cancel his ticket. The
passenger specifies his seat no and other unique identification parameter like credit card number and the
details are validated. If found legal, the ticket is cancelled and the transaction with the bank is nullified.
The train schedule and enquiry features of this system enable the user to interactively identify a suitable
configuration of train timings and fares. This module gives the user complete train details and facilities
the passenger to choose a train of his choice.

USE CASE DIAGRAM:

CLASS DIAGRAM:

St.Joseph’s College of Engineering 48


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM: (CANCELLATION)

ACTIVITY DIAGRAM :( RESERVATION)

St.Joseph’s College of Engineering 49


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM: (CANCELLATION)

St.Joseph’s College of Engineering 50


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM: (RESERVATION)

COLLABORATION DIAGRAM: (CANCELLATION)

/ Login

1: Enter PNR no.

/Ticket_Status 2: Cancel the ticket :


/Cancellation
3: Update the status

St.Joseph’s College of Engineering 51


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

COLLABORATION DIAGRAM: (RESERVATION)

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

FORMS AND CODING:

public class opening extends javax.swing.JFrame {


/** Creates new form opening */
public opening() {

St.Joseph’s College of Engineering 52


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
new login().setVisible(true);
}

public class login extends javax.swing.JFrame {


/** Creates new form login */
public login() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here
String s1=jTextField1.getText();
String s2=jPasswordField1.getText();
if((s1.compareTo("admin")==0)&&(s2.compareTo("admin")==0))
{
new update().setVisible(true);
}
else{
customer s=new customer(s1,s2);
}
private void jButton2ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
dispose();}

St.Joseph’s College of Engineering 53


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

importjava.sql.*;
importjavax.swing.table.TableModel;
//import org.apache.commons.dbutils.DbUtils;
importnet.proteanit.sql.DbUtils;
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
publicNewJFrame() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEventevt) {
// TODO add your handling code here:
try
{
String s=jTextField1.getText();
ResultSetrs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:aero");
String sq="select * from planedetails where number = '" +s+"'" ;
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");
// System.out.println("check:"+rs.getInt("count"));
jTable1.setModel(DbUtils.resultSetToTableModel(rs));}
catch(Exception e)
{System.out.println(e.getMessage());
}
}
private void jButton3ActionPerformed(java.awt.event.ActionEventevt) {
new opening().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEventevt) {

St.Joseph’s College of Engineering 54


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

String s1=jTextField2.getText();
int j=Integer.parseInt(jTextField3.getText());
System.out.println("AD"+s1);
airdatabase l=new airdatabase(s1,j);
} //DECREASE IN TICKET COUNT

RESULT:
Thus the application for E-Ticketing systems using uml concept has been executed.
Viva Questions:
1.What does composition mean in a class diagram?
2. How a uml use case diagram is different from traditional flow chart?
3. Who maintains the UML specification?
4.How the UML specification is updated?
5.On what basis UML modeling tool is selected?

St.Joseph’s College of Engineering 55


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

EX:NO:7 SOFTWARE PERSONNEL MANAGEMENT SYSTEM


AIM:
To create an application for Software personnel management system using uml concept

PROBLEM STATEMENT:
The module should provide users with a system to keep trace of hospitals,features,availability,staffing and
report problems.
The hospital management system helps to make updated data base about the status of faculty members.
The patient records have to be monitored more accurately and with frequent updation of the treatment
details all these requirements have been tried to satisfied project.
It involved in the bus system are doctor,receptionist,cashier and they perform the actions such as giving
treatment payment receiving entering the patient details to new admission all these actions will be
executed.
USE CASE DIAGRAM:

CLASS DIAGRAM:

St.Joseph’s College of Engineering 56


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

ACTIVITY DIAGRAM:

St.Joseph’s College of Engineering 57


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

SEQUENCE DIAGRAM:(LOGIN)

NEW ADMISSION:

PAYMENT SECTION:

St.Joseph’s College of Engineering 58


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

TREATMENT SECTION:

COMPONENT DIAGRAM:

DEPLOYMENT DIAGRAM:

FORMS AND CODING:


package personnel;
/**
*
* @author Elcot

St.Joseph’s College of Engineering 59


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
public class login extends javax.swing.JFrame {
/** Creates new form login */
public login() {
initComponents();
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String s1=jTextField1.getText();
String s2=jPasswordField1.getText();
System.out.println(s1);
System.out.println(s2);
try {
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:pers");
String s="select * from pass where username = '" +s1+"'and password = '"+s2+"'";
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(s);
int count=0;
while(rs.next()) {
count++;
}
if(count==1)
new employ().setVisible(true);
else
JOptionPane.showMessageDialog(null,"Wrong Password");
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}

St.Joseph’s College of Engineering 60


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
setVisible(false);
new login().setVisible(true);
}

package personnel;
/**
*
* @author Elcot
*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
public class employ extends javax.swing.JFrame {
/** Creates new form employ */
public employ() {
initComponents();
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
new employ().setVisible(true);
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
new details().setVisible(true);}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try
{ ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:pers");
String sq="select id from empo" ;

St.Joseph’s College of Engineering 61


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
} catch(Exception e)
{ System.out.println(e.getMessage()); } }

package personnel;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.swing.JOptionPane;
import net.proteanit.sql.DbUtils;
public class details extends javax.swing.JFrame {
/** Creates new form details */
public details() {
initComponents(); }
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {
try {
String s=jTextField1.getText();
ResultSet rs;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connect=DriverManager.getConnection("jdbc:odbc:pers");
String sq="select * from empo where id = '" +s+"'" ;
Statement stmt=connect.createStatement();
rs=stmt.executeQuery(sq);
System.out.println("query executed");
jTable1.setModel(DbUtils.resultSetToTableModel(rs)); }
catch(Exception e) {
System.out.println(e.getMessage()); }}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new employ().setVisible(true); }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

St.Joseph’s College of Engineering 62


CS8582 - Object Oriented Analysis and Design Laboratory Department of CSE 2020-2021

new logout().setVisible(true); }
RESULT:
Thus the application for Software personnel management system using uml concept has been executed.
Viva Questions:
1.Define Object Oriented Analysis.
2.What are the characteristics of an object?
3.Define class.
4.Name two types of object diagram.
5.What is an attribute? Give example.

St.Joseph’s College of Engineering 63

You might also like