Sie sind auf Seite 1von 31

Page | 1

Assignment No:-1
Design a single web page using HTML which would illustrate the basic elements of HTML
tags e.g. background color, hyperlink, color codes, table etc.
Soln:<!---Webpage starts here -->
<html>
<head>
<title>Hii!!!Welcome to a simple HTML Tutorial</title>
</head>
<!---Content starts here -->
<body bgcolor= "#808080">
<body text="#ffffff">
<a href="#color">Color Codes</a>
<br />
<a href="#table">Table Tags</a>
<h1 align="center"> What is HTML?</h1>
<!---Your first table starts here -->
<table border="1">
<td width="1000">
<p><b>HTML is the acronym for HyperText Markup Language </b></p>
<i>The language is made up of a set of codes and symbols that will generate:</i>
<ul>
<li> text, </li>
<li> images,</li>
<li> sounds,</li>
<li> frames </li>
<li> animation on your browser pages. </li>
</ul>
<br />
Two common ways to start your website are either:
<ol>
<li><u>to create your own codes in a simple text editor and save them as a .htm file. or </u></li>
<li><u>use a HTML generator software.</u></li>
</ol>
</td>
</table>
<!---Your first table ends here -->
<h2>Color Codes</h2>
<!---Your second table starts here -->
<table border="0">
<td width="500">
<img src = http://www.theodora.com/gif4/html_colors.gif
Color Codes">

vspace="10" hspace="10" alt="Hexadecimal

Page | 2
<!--http://www.theodora.com/gif4/html_colors.gif vspace="10" hspace="10" alt="Hexadecimal Color
Codes">
<a name="color">
<td align="right" valign="top">
</td>
</td>
</table>
<!---Your second table ends here -->
<a name="table">
<h2>Table tags</h2>
This section will give you more details about table tags
<p>
<!---Your third table starts here -->
<table border="2" bordercolor="#ffffff" cellpadding="1" cellspacing="2" width="70%" valign="middle"
align="center">
<th width="100%" colspan="3" bgcolor="red">Heading</th><tr>
<td colspan="3" height="50" align="center">
This is another part of the content
</td>
</tr>
<tr>
<td align="center" bgcolor="red"><i>Column 1</i></td><td align="center" bgcolor="red"><i>Column
2</i></td><td align="center" bgcolor="red"><i>Column 3</i></td></tr>
<tr>
<td rowspan="4" width="33%" align="center" bgcolor="red"> Cell Spanning in 3 Rows (2nd and 3rd
merged)</td>
<td rowspan="3" width="33%" align="center" bgcolor="red"> Cell Spanning in 2 Rows (1st and 2nd
Cell merged)</td>
<td width="33%" align="center" bgcolor="red">1st Cell</td>
</tr>
<td width="33%" align="center" bgcolor="red">2nd Cell</td>
</tr>
<tr>
<td width="33%" align="center" bgcolor="red">3rd Cell</td>
</tr>
<tr>
<td width="33%" align="center" bgcolor="red">3rd Cell</td><td width="33%" align="center"
bgcolor="red"> 4th Cell</td>
</tr>
</table>
<!---Your third table ends here -->
</body>
<!---Content ends here -->
</html>
<!---Webpage ends here -->

Output:-

Page | 3

Save the html page as first.html and open it in any standard web browser.

Home-work for students: - Design your own web-page using HTML which would display your
updated resume.

Assignment 2:Design a CSS of your own and embed it in your web page. You web page should be your
own home page and it should contain links to your hobbies, your detailed CV & links to
your other updates.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<head>
<title>My first styled page</title>
<link rel="stylesheet" href="linktocssfile.css">
</head>
<title>My first styled page</title>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="Home.html">Home page</a>
<li><a href="Hobbies.html">Hobbies</a>
<li><a href="CV.html">My CV</a>
<li><a href="My otherlinks.html">Links</a>

Page | 4
</ul>
<!-- Main content -->
<h1>My first styled page</h1>
<p>Welcome to my Home page!
<p>Please click on the links to procees
<p>Have a good day!!!!!!!!!!
<address>15th June 2013.</address>
</body>
</html>
%%%%%%%%%%%%%%%%%%% linktocssfile.css %%%%%%%%%%%%%%%%
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }

Page | 5
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }

Output:Save the html page as illustrate_css.html and open it in any standard web browser.
Home-work for students: - In the above web page, try to create the hyperlinks using the concept
of HTML.

Assignment:-3
Redesign your home page using XHTML and CSS.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/TR/xhtml1" xml:lang="en" lang="en">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<head>
<head>
<title>My first styled page</title>
<link rel="stylesheet" href="a.css">
</head>

Page | 6
<title>My first styled page</title>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="Home.html">Home page</a>
<li><a href="Hobbies.html">Hobbies</a>
<li><a href="CV.html">My CV</a>
<li><a href="My otherlinks.html">Links</a>
</ul>
<!-- Main content -->
<h1>My first styled page</h1>
<p>Welcome to my Home page!
<p>Please click on the links to procees
<p>Have a good day!!!!!!!!!!
<address>15th June 2013.</address>
</body>
</html>
%%% %%%%%a.css%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;

Page | 7
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }

Output:Save the html page as illustrate_xhtml.html and open it in any standard web browser.

Page | 8

Home-work for students: - In the above web page, try to create the hyperlinks using the concept
of HTML and CSS.
Assignment-4

Use Javascript to design your Gmail login page containing your User-login and password.
You can use XHTML & CSS as an addition to design your page in a professional manner

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>Gmail</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="images/icon.ico" />
<script type="text/javascript" src="iepngfix_tilebg.js"></script>
<script type="text/javascript" src="iepngfix.js"></script>
</head>

Page | 9
<body>
<div id="mainWrap">
<div id="mainPanel">
<div id="menu">
<ul>
<li><a href="#"><span>Home</span></a></li>
<li><div class="blank"></div></li>
<li><a href="#"><span>Search&nbsp</span></a></li>
<li><div class="blank"></div></li>
<li><a href="#"><span>Support</span></a></li>
<li><div class="blank"></div></li>
<li><a href="#"><span>FaceBook</span></a></li>
<li><div class="blank"></div></li>
<li><a href="#"><span>Google+</span></a></li>
<li><div class="blank"></div></li>

</ul>
</div>
<div id="loginPanel">
<h2>User Login</h2>
<input name="name" type="text" value="User Name" onfocus="if(this.value=='User
Name')this.value=''" onblur="if(this.value=='')this.value='User Name'"/>
<div class="blank"></div>
<input name="name" type="text" value="Password" onfocus="if(this.value=='Password')this.value=''"
onblur="if(this.value=='')this.value='Password'"/>
<p>Not yet a Member? <a href="#">Register Now</a></p>
<a href="#" class="login">Login</a>

P a g e | 10
</div>

</div>
</div>
<div id="rightPanel">
<h2>Have a good day!!!!!!!!!!</h2>
<div class="pic1"></div>
<a href="#" class="view"></a>
<div class="pic2"></div>
<a href="#" class="view"></a>
<div class="pic3"></div>
<a href="#" class="view"></a>
<div class="contacts">

</ul>
</div>
</div>
</div>
</div>
</body>
</html>

Output:-

Save the html page as illustrate_javascript.html and open it in any standard web browser

P a g e | 11

Home-work for students: - Write a JavaScript code to validate your email-id.

Assignment:-5
Use JavaScript to demonstrate a page creating a cookie, setting the value of the cookie,
checking whether the cookie is created or not.
Soln:<!DOCTYPE html>
<html>
<head>
<script>
function getCookie(c_name)
{
var c_value = document.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1)
{
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1)
{
c_value = null;
}
else
{

P a g e | 12
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1)
{
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
}
function setCookie(c_name,value,exdays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=c_name + "=" + c_value;
}
function checkCookie()
{
var username=getCookie("username");
if (username!=null && username!="")
{
alert("Welcome again " + username);
}
else
{
username=prompt("Please enter your name:","");
if (username!=null && username!="")
{
setCookie("username",username,365);
}
}
}
out.print("Name : " + cookie.getName( ) + ", ")
out.print("Value: " + cookie.getValue( )+" <br/>");
function eraseCookie(c_name) {
createCookie(cookie_name,"",-1);
}
</script>
</head>
<body onload="checkCookie()">
</body>
</html>
Output:-

P a g e | 13

Save the html page as cookie.html and open it in any standard web browser

Home-work for students: - In the above web page that you have designed using a cookie, write
the code accordingly to delete the cookie at startup that you had created.

Assignment-6
a) Implement the following regular expression in Perl: a*bc
Soln:$length = 5;
$char = 'a';
$x = 'aaaaabc';

P a g e | 14

$x =~ /(??{$char x $length})/x; # matches, there are 5 of 'a'


print $x
Output:Save the program as regular.pl and open command prompt:C:\Perl\bin>perl -w regular.pl
aaaaabc

Home-work for students: - Write a program in PERL to check whether a given number is zero, odd or
even.

b) A program that uses the return value from a built-in function to create an associative
array.
Soln:#!/usr/local/bin/perl
$inputline = <STDIN>;
$inputline =~ s/^\s+|\s+\n$//g;
%fruit = split(/\s+/, $inputline);
print ("Number of bananas: $fruit{\"bananas\"}\n");

Output:Save the program as associative.pl and open command prompt:C:\Perl\bin>perl -w associative.pl


oranges 5 apples 7 bananas 11 cherries 6
Number of bananas: 11
Home-work for students: - Write a program in PERL to print prime numbers from 0 to 200.

c) Write a program in PERL to search for a given string within an array of strings. Both
the string and the array of strings are given to you in the form of static declaration.
Soln:#!/usr/bin/perl -w
$searchfor = "Tom";
@composers = ("Tom", "Jerry", "Nick", "Joe", "Mira",
"Mary", "Hover", "Brahms", "Chaplin", "Nick");

P a g e | 15
$prompt = "$searchfor is not found!\n";
foreach $name (@composers) {
if ($name eq $searchfor) {
$prompt = "$searchfor is found!\n";
last;
}
}
print $prompt;

Output:Save the program as search.pl and open command prompt:C:\Users\>cd\


C:\>cd C:\Users\Desktop
C:\Users\Desktop>perl -w search.pl
Tom is found

Home-work for students: - Write a program in PERL to perform linear search on an array of numbers.
d) Create a subroutine in PERL programming language to check whether a given string is
a palindrome or not.
Soln:#!/usr/bin/perl w
sub isPalindrome($);
print "Enter a string > ";
chomp(my $str = <STDIN>);
if ($str ne ) {
print "$str is ", isPalindrome($str)?"":"not ", "a palindrome.\n";
} else {
print "The string should not be empty!\n";
}
sub isPalindrome($) {
my $string = $_[0];
my $ctr_l = 0;
my $ctr_r = length($string)-1;
while ($ctr_l <= $ctr_r) {
my $leftchar = lc substr($string, $ctr_l, 1);
my $rightchar = lc substr($string, $ctr_r, 1);
if ($leftchar ne $rightchar) {
return 0;
} else {
$ctr_l++;
$ctr_r--;
}
}
return 1;
}

P a g e | 16

Output:Save the program as palindrome.pl and open the command prompt:C:\Users\Desktop\NEWFOL~2>perl -w palindrome.pl
Enter a string > madam
madam is a palindrome.

Home-work for students: - Create a subroutine in PERL that calculates the sum of the series 0 + 1 + 2
+ ... + 100 and prints the value.

Assignment -7
Write a CGI script with HTML embedded to wish a visitor of the page good morning or
good afternoon depending on the time.
Soln:#!C:/Perl/bin/perl
use CGI;
use CGI::Carp "fatalsToBrowser";
$obj = new CGI;
$params = $obj->Vars;
$visitor = $params->{'name'};
@timeFields = localtime time;
$hour = $timeFields[2];
print "Content-Type: text/html\n\n";
if ($hour < 12) {
$greeting = 'Good morning';
} else {
$greeting = 'Good afternoon';
}
if (!defined $visitor or $visitor !~ /\w/) {
$visitor = 'visitor';
}
print qq~
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head><title>Greetings</title></head>
<body>
<p>$greeting, $visitor!</p>

P a g e | 17
</body>
</html>
~;
Output:Save the above program as greeting.pl and run in apache tomcat server as:http://localhost/cgi-bin/greeting.pl
Good morning visitor

Assignment-8
Write a simple UDP socket program in C to illustrate sending of a datagram from a client
to server
Soln:Server program:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

#define MYPORT "4950" // the port users will be connecting to

#define MAXBUFLEN 100

P a g e | 18

// get sockaddr, IPv4 or IPv6:


void *get_in_addr(struct sockaddr *sa)
{
if (sa->sa_family == AF_INET) {
return &(((struct sockaddr_in*)sa)->sin_addr);
}

return &(((struct sockaddr_in6*)sa)->sin6_addr);


}

int main(void)
{
int sockfd;
struct addrinfo hints, *servinfo, *p;
int rv;
int numbytes;
struct sockaddr_storage their_addr;
char buf[MAXBUFLEN];
size_t addr_len;
char s[INET6_ADDRSTRLEN];

memset(&hints, 0, sizeof hints);


hints.ai_family = AF_UNSPEC; // set to AF_INET to force IPv4
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_PASSIVE; // use my IP

P a g e | 19

if ((rv = getaddrinfo(NULL, MYPORT, &hints, &servinfo)) != 0) {


fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
return 1;
}

// loop through all the results and bind to the first we can
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("listener: socket");
continue;
}

if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {


close(sockfd);
perror("listener: bind");
continue;
}

break;
}

if (p == NULL) {
fprintf(stderr, "listener: failed to bind socket\n");

P a g e | 20

return 2;
}

freeaddrinfo(servinfo);

printf("listener: waiting to recvfrom...\n");

addr_len = sizeof their_addr;


if ((numbytes = recvfrom(sockfd, buf, MAXBUFLEN-1 , 0,
(struct sockaddr *)&their_addr, &addr_len)) == -1) {
perror("recvfrom");
exit(1);
}

printf("listener: got packet from %s\n",


inet_ntop(their_addr.ss_family,
get_in_addr((struct sockaddr *)&their_addr),
s, sizeof s));
printf("listener: packet is %d bytes long\n", numbytes);
buf[numbytes] = '\0';
printf("listener: packet contains \"%s\"\n", buf);

close(sockfd);

return 0;

P a g e | 21

Client program:-

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>

#define SERVERPORT "4950" // the port users will be connecting to

int main(int argc, char *argv[])


{
int sockfd;
struct addrinfo hints, *servinfo, *p;
int rv;
int numbytes;

if (argc != 3) {
fprintf(stderr,"usage: talker hostname message\n");

P a g e | 22

exit(1);
}

memset(&hints, 0, sizeof hints);


hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;

if ((rv = getaddrinfo(argv[1], SERVERPORT, &hints, &servinfo)) != 0) {


fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
return 1;
}

// loop through all the results and make a socket


for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("talker: socket");
continue;
}

break;
}

if (p == NULL) {
fprintf(stderr, "talker: failed to bind socket\n");

P a g e | 23

return 2;
}

if ((numbytes = sendto(sockfd, argv[2], strlen(argv[2]), 0,


p->ai_addr, p->ai_addrlen)) == -1) {
perror("talker: sendto");
exit(1);
}

freeaddrinfo(servinfo);

printf("talker: sent %d bytes to %s\n", numbytes, argv[1]);


close(sockfd);

return 0;
}

Output:Run client program as:


guest-XuXjwP@paroma-desktop:~/Desktop$ gcc -g -o bb UDP_client.c
guest-XuXjwP@paroma-desktop:~/Desktop$ ./bb 127.0.0.1 4950
talker: sent 4 bytes to 127.0.0.1

Run server program as:


guest-XuXjwP@paroma-desktop:~/Desktop$ gcc -g -o aa UDP_server.c
UDP_server.c: In function main:

P a g e | 24
UDP_server.c:79:17: warning: passing argument 6 of recvfrom from incompatible pointer type [enabled
by default]
In file included from UDP_server.c:11:0:
/usr/include/x86_64-linux-gnu/sys/socket.h:175:16: note: expected socklen_t * __restrict__ but
argument is of type size_t *
guest-XuXjwP@paroma-desktop:~/Desktop$ ./aa
listener: waiting to recvfrom...
listener: got packet from 127.0.0.1
listener: packet is 4 bytes long
listener: packet contains "4950"

Assignment:-9
Write a Java applet program to input two floating point numbers from the user and print
their sum. You have to use Input Dialog Box for taking the inputs.
Soln:// AdditionApplet.java
// Adding two floating-point numbers.
// Java core packages
import java.awt.Graphics; // import class Graphics
// Java extension packages
import javax.swing.*;
// import package javax.swing
public class AdditionApplet extends JApplet {
double sum; // sum of values entered by user
// initialize applet by obtaining values from user
public void init()
{
String firstNumber; // first string entered by user
String secondNumber; // second string entered by user
double number1;
// first number to add
double number2;
// second number to add
// obtain first number from user
firstNumber = JOptionPane.showInputDialog(
"Enter first floating-point value" );

P a g e | 25

// obtain second number from user


secondNumber = JOptionPane.showInputDialog(
"Enter second floating-point value" );
// convert numbers from type String to type double
number1 = Double.parseDouble( firstNumber );
number2 = Double.parseDouble( secondNumber );
// add numbers
sum = number1 + number2;
}
// draw results in a rectangle on applets background
public void paint( Graphics g )
{
// call inherited version of method paint
super.paint( g );
// draw rectangle starting from (15, 10) that is 270
// pixels wide and 20 pixels tall
g.drawRect( 15, 10, 270, 20 );
// draw results as a String at (25, 25)
g.drawString( "The sum is " + sum, 25, 25 );
} // end method paint
} // end class AdditionApplet
//AdditionApplet.html
<html>
<applet code = "AdditionApplet.class" width = "300" height = "65">
</applet>
</html>
Output:C:\Users\Parama Bagchi\Documents>javac AdditionApplet.java
C:\Users\Parama Bagchi\Documents>appletviewer AdditionApplet.html

P a g e | 26

Home-work for students:- Display any image using Applet


Assignment:-10
Create a simple calculator application using Java RMI.
Soln:Calculator.java
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Calculator extends Remote
{
public long addition(long a,long b) throws RemoteException;
public long subtraction(long a,long b) throws RemoteException;
public long multiplication(long a,long b) throws RemoteException;
public long division(long a,long b) throws RemoteException;
}
CalculatorImpl.java:
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class CalculatorImpl extends UnicastRemoteObject implements Calculator
{
protected CalculatorImpl() throws RemoteException
{

P a g e | 27
super();
}
public long addition(long a, long b) throws RemoteException
{
return a+b;
}
public long subtraction(long a, long b) throws RemoteException
{
return a-b;
}
public long multiplication(long a, long b) throws RemoteException
{
return a*b;
}
public long division(long a, long b) throws RemoteException
{
return a/b;
}
public long addition(long a, long b) throws RemoteException
{
return a+b;
}
}
CalculatorServer.java:
import java.rmi.Naming;
public class CalculatorServer
{
CalculatorServer()
{
try
{
Calculator c = new CalculatorImpl();
Naming.rebind("rmi://localhost:1099/CalculatorService", c);
}
catch (Exception e)
{

P a g e | 28
System.out.println(Exception is : +e);
}
}
public static void main(String[] args)
{
new CalculatorServer();
}
}
CalculatorClient.java:
import java.rmi.Naming;
public class CalculatorClient
{
public static void main(String[] args)
{
try
{
Calculator c = (Calculator) Naming.lookup("//127.0.0.1:1099/CalculatorService");
System.out.println("Addition : "+c.addition(10,5));
System.out.println("Subtraction : "+c.subtraction(10,5));
System.out.println("Multiplication :"+c.multiplication(10,5));
System.out.println("Division : "+c. division(10,5));
}
catch (Exception e)
{
System.out.println(Exception is : +e);
}
}
}
Output:Compile the all four source(java) files:
javac Calculator.java
javac CalculatorImpl.java
javac CalculatorClient.java
javac CalculatorServer.java
After compiled, in the folder we can see the four class files such as
Calculator.class
CalculatorImpl.class

P a g e | 29
CalculatorClient.class
CalculatorServer.class
rmic CalculatorImpl
The above command produce the CalculatorImpl_Stub.class file.
start rmiregistry
So the system will open rmiregistry.exe (like a blank command prompt)
Run the Server side class:
Java CalculatorServer
Run the Client side class(at another JVM):
Java CalculatorClient
Addition : 15
Subtraction : 5
Multiplication : 50
Division : 2
Home-work for students:- Write a simple UDP server program in Java that waits for clients requests
and then accepts the message (datagram) and sends back the same message .

Assignment:-11
Create a simple DTD.
Soln:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<p>
<a href="http://validator.w3.org/check/referer">
<img src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0!" height="31" width="88" />
</a>
</p>
Output:-

P a g e | 30

Home-work for students: - Test the above example by several DTD templates.

P a g e | 31

END

Das könnte Ihnen auch gefallen