Professional Documents
Culture Documents
No 1)
College.html
<html>
<head>
<title>USE of INTERNAL and EXTERNAL STYLESHEETS
</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
<style type="text/css">
.vid{font-family:verdana;font-style:italic;color:red;text-align:center}
.ani{font-family:tahoma;font-style:italic;font-size:20;text-align:center;}
font{font-family:georgia;color:blue;font-size:20}
ul{list-style-type:circle}
</style>
</head>
<body>
<center><p style="font-size:20pt;color:purple">Shree Motilal Kanhaiyalal Fomra
Institute Of Technology</br>
<p style="font-size:12pt;color:purple">Approved by AICTE, New Delhi & Affilated
to ANNA UNIVERSITY, Chennai</h4></br>
<p style="font-size:12pt;color:purple">Old Mahabalipuram Road, (I.T Highway),
Near Kelambakkam,Chennai - 603 103.</br>
<img src="clg.jpg"></center>
<h2 class="vid"><a href="home.html">HOME</h2>
<h2 class="vid"><a href="department.html">DEPARTMENT</h2>
<h2 class="vid"><a href="result.html">RESULT</h2>
<h2 class="vid"><a href="home.html">CONTACT US</h2>
</body>
</html>
Department.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body>
<h3>Departments</h3>
<font>
<ol style="list-style-type:lower-alpha">
<li>COMPUTER SCIENCE AND ENGINEERING
<li>INFORMATION TECHNOLOGY
<li>BIO MEDICAL ENGINEERING
<li>INFORMATION TECHNOLOGY
<li>ELECTRONICS AND COMMUNICATION ENGINEERING
<li>ELECTRICAL AND ELECTRONICS ENGINEERING
<li>MECHANICAL ENGINEERING
<LI>CIVIL ENGINEERING
</ol>
<font>
</body>
</html>
Home.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body bgcolor="pink">
<h3>MOTILAL KANHAIYALAL FOMRA CHARITABLE TRUST</h2>
<p>Greetings to all. We, Shree Motilal Kanhaiyalal Fomra Institute of
Technology,</br> welcomes you to this great institution.</br> The Motilal
Kanhaiyalal Fomra Charitable Trust was founded during the year 1995 by Late
Shree Kanhaiyalalji F</br>omra, with a view to promote the cause of education
and to help the economically and socially under privileged students.<br> This is
an ISO 9001:2008 certified institution.
</body>
</html>
Result.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body>
<h3>Results of cse students</h3>
<table width="100%" cellspacing="2" cellpadding="2" border="5">
<tr>
<th>S.NAME</th>
<th>MARKS</th>
<th>RESULT</th>
</tr>
<tr>
<td align="center">Dinesh</td>
<td align="center">100</td>
<td align="center">pass</td>
</tr>
<tr>
<td align="center">Bala</td>
<td align="center">99</td>
<td align="center">pass</td>
</tr>
<tr>
<td align="center">Gopi</td>
<td align="center">98</td>
<td align="center">pass</td>
</tr>
</table>
</body>
</html>
Xyz.html
h3{font-family:arial;font-size:20;color:cyan}
table{border-color:green}
td{font-size:20pt;color:magenta}
EX.No 2: Create a web page containing details about the placement cell in
your college using cascading style sheets.
Program
Placementcell.html
<html>
<head>
<title>SMK FOMRA PLACEMENT CELL
</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
<style type="text/css">
.vid{font-family:verdana;font-style:italic;color:red;text-align:center}
.ani{font-family:tahoma;font-style:italic;font-size:20;text-align:center;}
font{font-family:georgia;color:blue;font-size:20}
ul{list-style-type:circle}
</style>
</head>
<body>
<center><p style="font-size:20pt;color:red">SMK FOMRA PLACEMENT
CELL</br>
<p style="font-size:12pt;color:purple">Approved by AICTE, New Delhi &
Affilated to ANNA UNIVERSITY, Chennai</h4></br>
<p style="font-size:12pt;color:purple">Old Mahabalipuram Road, (I.T
Highway), Near Kelambakkam,Chennai - 603 103.</br>
<img src="clg.jpg"></center>
<h2 class="vid"><a href="placed.html">PLACED STUDENTS
DETAIL</h2>
<h2 class="vid"><a href="companies.html">COMPANIES VIITED</h2>
<h2 class="vid"><a href="schedule.html">PLACEMENT SCHEDULE</h2>
<h2 class="vid"><a href="gallary.html">GALLARY</h2>
Placed .html
<html>
<head>
<title>SMK FOMRA PLACEMENT CELL</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
<style type="text/css">
.vid{font-family:verdana;font-style:italic;color:red;text-align:center}
.ani{font-family:tahoma;font-style:italic;font-size:20;text-align:center;}
font{font-family:georgia;color:blue;font-size:20}
ul{list-style-type:circle}
</style>
</head>
<body>
<center><p style="font-size:20pt;color:red">SMK FOMRA PLACEMENT
CELL</br>
<p style="font-size:12pt;color:purple">Approved by AICTE, New Delhi &
Affilated to ANNA UNIVERSITY, Chennai</h4></br>
<p style="font-size:12pt;color:purple">Old Mahabalipuram Road, (I.T
Highway), Near Kelambakkam,Chennai - 603 103.</br>
<img src="clg.jpg"></center>
<h2 class="vid"><a href="placed.html">PLACED STUDENTS
DETAIL</h2>
<h2 class="vid"><a href="companies.html">COMPANIES VIITED</h2>
<h2 class="vid"><a href="schedule.html">PLACEMENT SCHEDULE</h2>
Companies.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body>
<h3>COMPANIES VISITED</h3>
<font>
ON CAMPUS DETAILS</br>
<ol style="list-style-type:lower-alpha">
<li>HCL TECHNOLOGIS
<li>COGNIZANT TECHNOLOGIES
<li>WIPRO
<li>VIRTUSA
<li>HP
<li>MPHASIS
<li>SAINT GOBAIN
</ol>
<font>
OFF CAMPUS DETAILS</br>
<ol style="list-style-type:lower-alpha">
<li>INFOSYS
<li>ATHENA HEALTH CARE
<li>AMERICAN MEGA TRENDS
<li>FLEXTRONIXS
<li>ASHOK LEYLAND
<li>HANI SOLUTONS
</ol>
</body>
</html>
Schedule.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body>
<h3>PLACEMENT SCHEDULE</h3>
<table width="100%" cellspacing="2" cellpadding="2" border="5">
<tr>
<th>COMPANY</th>
<th>DEPARTMENT</th>
<th>DATE</th>
<th>VENUE</th>
</tr>
<tr>
<td align="center">HCL</td>
<td align="center">BME</td>
<td align="center">21-04-2015</td>
<td align="center">SNN</td>
</tr>
<tr>
Gallery.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body bgcolor="gray">
<center><h3>PHOTO GALLARY</h3></center>
<table width="100%" border="0">
<tr>
<td align="center"><img src="clg.jpg"></td>
<td align="center"><img src="clg.jpg"></td>
</tr></table>
</body>
</html>
EX.No 3
Create a web page using XHTML for Library management system application
Library.html
<html>
<head>
<title>LIBRARY MANAGEMENT SYSTEM
</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
<style type="text/css">
.vid{font-family:verdana;font-style:italic;color:red;text-align:center}
.ani{font-family:tahoma;font-style:italic;font-size:20;text-align:center;}
font{font-family:georgia;color:blue;font-size:20}
ul{list-style-type:circle}
</style>
</head>
<body bgcolor="yellow">
<center><p style="font-size:20pt;color:purple">LIBRARY MANAGEMENT
SYSTEM</br>
<p style="font-size:12pt;color:purple">SMK FOMRA INSTITUTE OF
TECHNOLOGY</br>
<img src="clg.jpg"></center>
<h2 class="vid"><a href="add.html">ADD BOOKs</h2>
<h2 class="vid"><a href="issue.html">ISSUES OF BOOK</h2>
<h2 class="vid"><a href="details.html">BOOK DETAILS</h2>
<h2 class="vid"><a href="report.html">REPORT</h2>
</body>
</html>
Add.html
<html>
<head>
<title>ADD DETAILS</title>
</head>
<body>
<center><h3>ADD BOOK</h3></center>
<form>
Title<input type="text" name="title"></br>
Author<input type="text" name="author"></br>
Year<input type="text" name="year"></br>
ISBN<input type="text" name="isbn"></br>
Date Purchased<input type="text" name="date"></br>
Price<input type="text" name="price"></br>
<input type="submit" value="SAVE" name="save">
<input type="submit" value="CLEAR" name="clear">
</form>
</body>
</html>
Issue.html
<html>
<head>
<title>ISSUE DETAILS</title>
</head>
<body>
<center><h3>ISSUES OF BOOK</h3></center>
<form>
BOOK NO<input type="text" name="bno"></br>
Student ID<input type="text" name="stID"></br>
Details.html
<html>
<head>
<title>BOOK DETAILS</title>
</head>
<body>
<center><h3>BOOK DETAILS</h3></center>
<form>
SEARCH BY BOOK NAME<input type="text" name="stID"></br>
SEARCH BY ISBN<input type="text" name="available"></br>
SEARCH BY AUTHOR<input type="text" name="ISsueDate"></br>
<input type="submit" value="SEARCH" name="save">
</form>
</body>
</html>
Report.html
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="xyz.css" type="text/css">
</head>
<body>
<h3>REPORT</h3>
<tr>
<th>STUDENT NAME</TH>
<th>STUDENT ID</TH>
<th>TITLE</TH>
<th>AUTHOR NAME</th>
<th>DATE OF ISSUE</th>
<th>DATE OF RETURN</th>
</tr>
<tr>
<td align="center">PRABHU</td>
<td align="center">CSC</td>
<td align="center">HCL</td>
<td align="center">PRABHU</td>
<td align="center">CSC</td>
<td align="center">HCL</td>
</tr>
<tr>
<td align="center">SELVI</td>
<td align="center">BME</td>
<td align="center">CSC</td>
<td align="center">HCL</td>
</tr>
</body>
</html>
OUTPUT
11Q
11. a. Create relations using MYSQL for a banking application given below enforcing primary
key and foreign key constraints.
CUSTOMER (CID, CNAME)
ACCOUNT (ANO, ATYPE, BALANCE, CID)
An account can be a savings account or a current account. Check ATYPE in S or C. A
customer can have both types of accounts.
TRANSACTION (TID, ANO, TTYPE, TDATE, TAMOUNT)
TTYPE CAN BE D OR W
D- Deposit; W Withdrawal
The primary keys are underlined.
Develop a java application using database connectivity to list all records from
the above relations and illustrate a join query and an update operation.
Answer
Step 1 : create tables using following sql statements
Customer
create table customer(cname varchar2(20),cid number(5));
Account
create table account(cid number(5),ano number(5),atype varchar(2),balance
number(5));
Transaction
create table trans(tid number(5),ttype varchar2(2),ano number(5),tdate
varchar2(12),tamount number(5));
Step 2 : Open a notepad and type the following code and save the file as .java.
Note ur class name and file name should be same. Here the class name is
BankApplication, so your file name must be BankApplication.java
Step 3 :
Open command prompt and go to the directory where you have saved the above
notepad file
Using cd command.
Step 4 :
Program
BankApplication.java
import java.io.*;
import java.sql.*;
public class BankApplication {
int i = customer_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Customer Registered successfully");
}
else
{
System.out.println("Customer Registration failed");
}
}
atype = dis.readLine();
System.out.println("Enter Balance:");
balance = Integer.parseInt(dis.readLine());
if(i == 1)
{
System.out.println("Account Registered successfully");
}
else
{
System.out.println("Account Registration failed");
}
}
PreparedStatement transaction_psmt =
con.prepareStatement(transactionSQL);
transaction_psmt.setInt(1,tid);
transaction_psmt.setString(2,ttype);
transaction_psmt.setInt(3,ano);
transaction_psmt.setString(4,tdate);
transaction_psmt.setInt(5,tamount);
int i = transaction_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Transaction Registered successfully");
}
else
{
System.out.println("Transaction Registration failed");
}
}
12Q
12. a. Create relations using MYSQL for a bus reservation application given below enforcing
primary key and foreign key constraints.
BUS (ROUTENO, SOURCE, DESTINATION)
PASSENGER (PID, PNAME, DOB, GENDER)
BOOK_TICKET (PID, ROUTENO, JOURNEY_DATE, SEAT_NO)
The primary keys are underlined.
Develop a java application using database connectivity to list all records from
the above relations and illustrate a join query and an update operation.
Answer
Step 2 : Open a notepad and type the following code and save the file as .java.
Note ur class name and file name should be same. Here the class name is
BusApplication, so your file name must be BusApplication.java
Step 3 :
Open command prompt and go to the directory where you have saved the above
notepad file
Using cd command.
Step 4 :
Compile the file using javac filename.java
If your file name is BusApplication.. then.. javac BusApplication.java
To run : java BusApplication
Step 5 :
Run the file using java filename.
Program
import java.io.*;
import java.sql.*;
i = bus_psmt.executeUpdate();
j = pass_psmt.executeUpdate();
book_psmt.setString(3,j_date);
book_psmt.setInt(4,n);
k = book_psmt.executeUpdate();
}
}
13Q
13. a. Create relations using MYSQL for a student enrollment application given below enforcing
primary key and foreign key constraints.
STUDENT (ROLLNO, NAME, DATE_OF_BIRTH, GENDER, BRANCH_CODE)
BRANCH (BRANCH_CODE, BRANCH_NAME)
COURSE (CCODE, CNAME, CREDITS)
ENROLLS (ROLLNO, CCODE, SESS, GRADE)
SESS can take the values APRIL2014, NOVEMBER2014
The primary keys are underlined.
Develop a java application using database connectivity to list all records from
the above relations and illustrate a join query and an update operation.
Answer
Step 3 :
Open command prompt and go to the directory where you have saved the above
notepad file
Using cd command.
Step 4 :
Compile the file using javac filename.java
If your file name is Student.. then.. javac Student.java
To run : java Student
Step 5 :
Run the file using java filename.
Program
import java.io.*;
import java.sql.*;
st_psmt.setString(4,gender);
st_psmt.setInt(5,bcode);
int i = st_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Student Registered successfully");
}
else
{
System.out.println("Student Registration failed");
}
}
con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","scott","3K
amal94");
String branchSQL = "INSERT INTO branch(bname,bcode) VALUES(?,?)";
int i = branch_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Branch Registered successfully");
}
else
{
System.out.println("Branch Registration failed");
}
}
ccode = Integer.parseInt(dis.readLine());
System.out.println("Enter Course Credits :");
credits = Integer.parseInt(dis.readLine());
int i = course_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Course Registered successfully");
}
else
{
System.out.println("Course Registration failed");
}
}
14Q
14. a. Create relations using MYSQL for an order processing application given below enforcing
primary key and foreign key constraints.
CUSTOMER (CID, NAME)
PRODUCT (PCODE, PNAME, UNIT_PRICE)
CUST_ORDER (OCODE, ODATE, CID)
ORDER_PRODUCT (OCODE, PCODE, NOU)
NOU Number of Units
An order can contain many products. The primary keys are underlined.
Develop a java application using database connectivity to list all records from
the above relations and illustrate a join query and an update operation
Answer
Step 1 : create tables using following sql statements
Customer
create table customer(cname varchar2(20),cid number(5));
Products
create table product(pcode number(5),pname varchar2(15),unit_price
number(3));
Orders
create table orders(ocode number(5),odate varchar2(12),cid number(5));
Step 2 : Open a notepad and type the following code and save the file as .java.
Note ur class name and file name should be same. Here the class name is
OrderProducts, so your file name must be OrderProducts.java
Step 3 :
Open command prompt and go to the directory where you have saved the above
notepad file
Using cd command.
Step 4 :
Compile the file using javac filename.java
If your file name is OrderProducts.. then.. javac OrderProducts.java
To run : java Student
Step 5 :
Run the file using java filename.
Program
import java.io.*;
import java.sql.*;
public class OrderProducts {
cname = dis.readLine();
System.out.println("Enter customer ID :");
cid = Integer.parseInt(dis.readLine());
int i = user_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Registered successfully");
}
else
{
System.out.println("Registration failed");
}
String pname;
int pcode,unit_price;
int i = product_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Product entered successfully");
}
else
{
System.out.println("Product register failed");
}
}
order_psmt.setString(2,odate);
order_psmt.setInt(3,cid);
int i = order_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Order Registered successfully");
}
else
{
System.out.println("Order Registration failed");
}
}
15Q
15. a. Create relations using MYSQL for a transport management system application given below
enforcing primary key and foreign key constraints.
DRIVER (DCODE, DNAME, DOB, GENDER)
CITY (CCODE, CNAME)
TRUCK (TRUCKCODE, TTYPE)
TTYPE can take two values (L,H)
L-Light
H- Heavy
Each truck is assigned a unique truck code. There can be many trucks belonging to the same truck
type.
DRIVE_TRUCK (TRUCKCODE, DCODE, DOT, CCODE)
DOT Date of Trip
The primary keys are underlined.
Develop a java application using database connectivity to list all records from
the above relations and illustrate a join query and an update operation.
Answer
Step 1 : create tables using following sql statements
Driver
create table driver(did number(5),dname varchar2(20),dob varchar2(12),gender
varchar2(6));
City
create table city(ccode number(5),city varchar2(15));
Truck
create table truck(tcode number(5),ttype varchar2(10));
Step 2 : Open a notepad and type the following code and save the file as .java.
Note ur class name and file name should be same. Here the class name is
Student, so your file name must be Student.java
Step 3 :
Open command prompt and go to the directory where you have saved the above
notepad file
Using cd command.
Step 4 :
Compile the file using javac filename.java
Program
import java.io.*;
import java.sql.*;
int i = driver_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Driver Registered successfully");
}
else
{
System.out.println("Driver Registration failed");
}
{
String city;
int ccode;
DataInputStream dis = new DataInputStream(System.in);
System.out.println("Enter city :");
city = dis.readLine();
System.out.println("Enter city ID :");
ccode = Integer.parseInt(dis.readLine());
int i = city_psmt.executeUpdate();
if(i == 1)
{
System.out.println("City Registered successfully");
}
else
{
System.out.println("City Registration failed");
}
int i = truck_psmt.executeUpdate();
if(i == 1)
{
System.out.println("Truck Registered successfully");
}
else
{
System.out.println("Truck Registration failed");
}