User Interface Technology Laborator: Description
User Interface Technology Laborator: Description
DATE: / /2023
EXERSICE NO:01
IMAGE MAPPING
AIM:
TO IMPLEMENT THE IMAGE MAPPING TO LOCATE THE AREA BY CLICKING.
DESCRIPTION:
Attributes of area:
CODE:
<html>
<head>
<TITLE>india-map</title>
<style>
body{
background:cyan;
padding-left:350px;
}
nav{
color:black;
text-shadow:2px 2px 4px yellow;
}
</style>
</head>
<body>
<nav>
<h1>CLICK THE AREA TO KNOW THE LOCATION-></H1>
<img src="map.jpg" alt="Workplace" usemap="#indiamap">
<map name="indiamap">
<area shape="rect" coords="154,494,187,471" alt="Computer" href="tn.html">
<area shape="rect" coords="159,418,193,427" alt="Phone" href="andhra.html">
<area shape="rect" coords="54,199,124,205" alt="Coffee" href="rajasthan.html">
<area shape="rect" coords="103,340,155,336" alt="Coffee" href="maharashthra.html">
</map>
</nav>
</body>
</html>
tn.html:
<html>
REGISTER NO:2127210801081 PAGE NO: 1
CS18511--- USER INTERFACE TECHNOLOGY LABORATORy
DATE: / /2023
<head>
<title>tn</title>
<style>
pre{
color:black;
text-shadow:2px 2px 4px grey;
padding-left:350px;
font-style:bold;
}
b{
color:red;
}
</style>
</head>
<body>
<pre>
<b>Tamil Nadu: </b>A Cultural and Natural Wonder
Tamil Nadu is a state in southern India with a rich and
ancient culture that dates back to the Sangam era
(3rd century BCE to 4th century CE).
</pre>
</body>
</html>
maharashtra.html:
<html>
<head>
<title>mahasrashtra</title>
<style>
pre
{color:blue;
text-shadow:2px 2px 4px white;
padding-left:350px;
font-style:bold;
}
b
{
color:white;
}
</style>
</head>
<body>
<pre>
RESULT:
THUS THE PROGRAM TO LOCATE THE AREAS USING IMAGE MAP HAS BEEN
IMPLEMENTED.
EXERSICE NO:02
CREATE THE COLLEGE WEBSITE USING DIFFERENT STYLES IN CSS
AIM:
TO CREATE THE COLLEGE WEBSITE USING DIFFERENT STYLES IN CSS
DESCRIPTION:
<html>
<head>
<title>svce webpage</title>
<style>
body
{
background-image:url('OIP.jpg');
background-repeat:no-repeat;
background-size:100% 100%;
}
h1
{
border:6px solid lightblue;
border-radius:15px;
font-size:26px;
padding-bottom:4px;
}
nav
{
word-spacing:33px;
letter-spacing:5px;
border:2px solid lightblue;
height:25px;
padding:4px;
background-color:grey;
a:link
{
color:white;
}
a:hover
{
REGISTER NO:2127210801081 PAGE NO: 4
CS18511--- USER INTERFACE TECHNOLOGY LABORATORy
DATE: / /2023
a:active
{
color:yellow;
}
#dem
{
color:blue;
text-shadow:2px 2px 4px white ;
}
footer
{
border:1px solid lavender;
background:lavender;
}
div {
border-radius:15px;
width:50%;
height:50%;
position: center;
background:black;
animation-name: example;
animation-duration: 4s;
animation-delay: 2s;
animation-iteration-count:infinite;
}
@keyframes example {
20% {background-image:url('logo1.jpg');background-repeat:no-repeat;width:80%;}
40% {background-image:url('logo2.jpg');background-repeat:no-repeat;width:100%;}
60% {background-image:url('logo3.jpg');background-repeat:no-repeat;width:100%;}
80% {background-image:url('logo4.jpg');background-repeat:no-repeat;width:100%;}
100% {background-image:url('logo5.jpg');background-repeat:no-repeat;width:100%;}
}
<link rel=”stylesheet” href=”ex-style.css”>
</style>
</head>
<body>
<h1>
<img src="logo.jpg" alt="Girl in a jacket" width="45" height="45"><big>SVCE-</big>SRI VENKATESWARA COLLEGE OF
ENGINEERING,PENNALUR-CHENNAI.</h1>
<nav>
<a href="home.html">HOME</a>
<a href="curriculam.html">CURRICULAM</a>
<a href="admission.html">ADMISSION</a>
<a href="regulation.html">REGULATIONS</a>
<a href="contact.html">CONTACT-US</a>
<a href="alumni.html">ALUMNI</a>
Ex-style.css:
<html>
<head>
<style>
#hel
{
color:black;
text-style:bold;
}
</style>
</head>
</html>
Login.html:
<html>
<head>
<style>
h1 {
text-align:center;
text-shadow:cyan;
}
body {
background:url('OIP.JPG');
background-repeat:no-repeat;
}
div
{
border:3px solid black;
padding-top:30px;
background:url('OIF.jpg');
position:right;
width:30%;
height:60%;
border-radius:30px;
color:blue;
}
input
{
text-color:black;
border:2px solid black;
}
nav
{
background:lavender;
}
nav:hover
{
background:lightblue;
}
a:link
{
color:brown;
}
</style>
</head>
<body>
<center>
<div >
<center>
<form>
<h1 style="color:blue;font-size:15px;">USER LOGIN</H2>
<input type="text" id="name" placeholder="Your id"><br><br>
<input type="password" id="password" placeholder=" Enter password">
<input type="password" id="password" placeholder=" Conform password">
<nav>
<button type="button" id="button">cancel</button>
<button type="button" id="button">submit</button>
REGISTER NO:2127210801081 PAGE NO: 7
CS18511--- USER INTERFACE TECHNOLOGY LABORATORy
DATE: / /2023
</nav><center>
<a href="password">change password</a></center>
</form>
</center>
</div>
</center>
</table>
</body>
</html>
OUTPUT:
RESULT:
THUS TO CREATE THE COLLEGE WEBSITE USING DIFFERENT STYLES IN CSS ARE
IMPLEMENTED.
EXERSICE NO:02
DOM PARSER
AIM:
To extract and display student details from an XML file using DOM parsing in Java
ALGORITHM:
Step 1- Import required classes for the file handling XML, parsing, and user input.
Step 2- Define the parser class with the main method.
Step 3- Create a DocumentBuilderFactory and a DocumentBuilder for XML parsing.
Step 4- Parse the XML file and get a root element
Step 5- print the result and display it in columns and rows.
Step 6 – stop.
CODE:
import java.io.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import java.util.*;
XML CODE:
<captain id="2">
<name>kaavya</name>
<year>3rd</year>
<dept>IT</dept>
<age>19</age>
</captain>
</trials>
OUTPUT:
RESULT:
Thus to extract and display student details from an XML file using DOM parsing in Java is
implemented.
EXERSICE NO:02
REGISTER NO:2127210801081 PAGE NO: 11
CS18511--- USER INTERFACE TECHNOLOGY LABORATORy
DATE: / /2023
EXERSICE NO :04
HTTP PROTOCOL
AIM:
TO IMPLEMENT TO RETRIVE THE CONENT OF THE HTML FILE USING HTTP
ALGORITHM:
CODE:
HTTP.JAVA:
import java.io.*;
import java.net.*;
public class http {
public static void main(String[] args)throws Exception
{
URL url=new URL("http://localhost:8080/tcp_udp");
HttpURLConnection con = (HttpURLConnection)url.openConnection();
con.setRequestMethod("GET");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
while((inputLine = in.readLine())!=null){
System.out.println(inputLine);
}
in.close();
}
}
FILE IN HTML:
OUTPUT:
RESULT:
THUS IMPLEMENTED THE PROGRAM USING HTTP TO RETRIVE CONTENT OF HTML FILE
EXERSICE NO:05
FILE TRANSFER PROTOCOL(FTP)
AIM:
TO IMPLEMENT THE PROGRAM OF CLIENT AND SERVER USING FTP.
ALGORITHM:
1. Create a ServerSocket object with the desired port number.
2. Call the accept() method of the ServerSocket object to wait for a client to connect. This method
blocks until a client connects.
3. Get the input stream of the client socket using the getInputStream() method of the Socket object.
4. Create a BufferedReader object using an InputStreamReader object and the input stream from
the client socket.
5. Read the name of the file from the BufferedReader object using the readLine() method.
6. Create a PrintWriter object using the output stream from the client socket.
7. Open the file with the given name using a FileInputStream object.
8. Read the contents of the file byte by byte using the read() method of the FileInputStream object.
9. Write each byte to the PrintWriter object using the write() method.
10. Flush the PrintWriter object to ensure that all bytes are sent to the client.
11. Close the FileInputStream object, the PrintWriter object, and the client socket.
CODE:
FTPSERVER JAVA:
import java.io.*;
import java.net.*;
import java.io.*;
import java.net.*;
OUTPUT:
RESULT:
THUS IMPLEMENTED THE PROGRAM OF CLIENT AND SERVER USING FTP.