Professional Documents
Culture Documents
BT 14-01
1. Create a catalog for a shop, which sells computer peripherals using HTML
tables.
Ans:
2. Write a Perl program that records a file with 4 fields form the database. The
fi8elds are Emp_code, Emp_name, Basic_pay, also program to find the following:
HRA=12% of Basic_pay
DA= 6% of Basic_pay
Vehicle Allowance (VA) =2.4% of Basic_pay
Professional tax (PT) =1% of Basic_pay
PF=12% of Basic_pay
Net_pay = Basic_pay+HRA+DA+VA-PF-PT
Require “cgi-lib.pl”;
Print “Content-type:text/html\n\n”;
Use win32::ODBC;
$sql=”select * from feedback;”;
$dsn=”feedback”;
$database=new Win32::ODBC($dsn);
$databse->sql($sql);
print ”<html><head><title>ODBC Example</title></head><body
bgcolor=#fff000>”;
print “<h2>”The Details of Employee Salary</h2><hr>”;
while($database->Fetchrow())
{
($code, $name, $basic)=$database-
>Data(“emp_code”,”emp_name”,”basic_pay”);
$HRA=$basic*0.12;
$DA=$basic*0.06;
$VA=$basic*0.024;
$PT=$basic*0.01;
$PF=$basic*0.12:
$TOTAL=($basic+$HRA+$DA+$VA-($PF+$PT));
print “$code”;
print “$name”;
print “$basic”;
print “$HRA”;
print “$DA”;
print “$VA”;
print “$PT”;
print “$PF”;
print “$TOTAL”;
}
$database->close();
print “</body></html>”;
3. List the various services offered on the Internet.
Ans:
An Internet is an interactive, compiled that can be helpful to accessed through a
corporate Internet or through the Internet applications can perform complex
business processes on either the client or the server. In a server-based Internet
application, the application uses the Http Internet protocol to receive requests from
a client, typically a Web browser, process associated code, and return data to the
browser. There are many Internet services that support different activities on the
Internet. Most Internet services are based on universal resource locator (URL). The
Internet services may use different protocol to operate on the Internet. But the URL
address is unique to a given location or site. For Example: In the address of the
Yahoo Chat service Http://www.yahoomail.com, http:// prefix indicates that it uses
http (hypertext Transfer protocol) and offers web services.
a) World wide web: The World Wide Web is one of the most popular Internet
services. This is a document centric service that provides a pool of information
connected by series of hyperlinks across the network. A user can select specific
information and view/browse them on the terminal. Web servers operate on
hypertext transfer protocol (http) to provide web services. This service is used to
publish online information, gather information interactively. Web servers are
accessed with web browsers like Netscape Navigator, IE.
b) File Transfer Protocol: FTP provides a way of downloading files from remote site
on the Internet. Ftp servers operate on the file transfer protocol. FTP is an ideal
choice organization to distribute texts, documents, programs etc. it is used to
download freeware, shareware’s, or other types of documents. FTP provides the
capability to copy files from the server. An example of an FTP site is
Ftp.yahoomail.com.
c) Network News Transfer Protocol: Network news, also referred to as Usenet, is a
more informal way of communicating with other people with common interests.
Usenet is divided into interest areas, or Newsgroups. Newsgroups can be
subscribed to newsreaders. News servers are dispersed all over the globe and
they host everything form the most bizarre topics to private information forums
for corporations, software applications.
d) E-mail: Electronic mail, known to masses as e-mail, provides a way to get
message form location to another location on the electronic media. An e-mail
server accepts mail message and forwards it to other electronic mail handlers,
which then forwards it to the destination. Using this service, Internet lets
computers communicate that are not directly connected to each other.
1. Create a Catalog for an online shopping company that sells music records using
style-sheets.
Ans
<?xml version=”1.0”?>
<?xml-stylesheet type=”text/css” href=”catalog.css”?>
<catalog>
<cd>
<title>Anmol Ratn</title>
<singer>Md. Rafi</singer>
<country>India</country>
<company>HMV</company>
<price>Rs 260</price>
<year>1997</price>
</cd>
<cd>
<title>Anmol Ratn</title>
<singer>Kishore Da</singer>
<country>India</country>
<company>HMV</company>
<price>Rs 280</price>
<year>1999</price>
</cd>
<cd>
<title>Anmol Ratn</title>
<singer>Lata Maneshkar</singer>
<country>India</country>
<company>HMV</company>
<price>Rs 300</price>
<year>2001</price>
</cd>
<cd>
<title>The Greatest Hits of Manna Da</title>
<singer>Manna Dey</singer>
<country>India</country>
<company>Universal</company>
<price>Rs 220</price>
<year>2002</price>
</cd>
<cd>
<title>Deewana</title>
<singer>Sonu Nigam</singer>
<country>India</country>
<company>Times</company>
<price>Rs 150</price>
<year>1996</price>
</cd>
<cd>
<title>Forever</title>
<singer>Pankaj Udas </singer>
<country>India</country>
<company>Universal</company>
<price>Rs 220</price>
<year>1995</price>
</cd>
<cd>
<title>Together</title>
<singer>Jagjit Singh, Pankaj Udas</singer>
<country>India</country>
<company>HMV</company>
<price>Rs 280</price>
<year>2003</price>
</cd>
<cd>
<title>Sehar</title>
<singer>Jagjit Singh</singer>
<country>India</country>
<company>HMV</company>
<price>Rs 280</price>
<year>1998</price>
</cd>
<cd>
<title>Heart Break</title>
<singer>Michael Jackson</singer>
<country>USA</country>
<company>Universal</company>
<price>Rs 280</price>
<year>2002</price>
</cd>
<cd>
<title>Americal Beauty</title>
<singer>Elton John</singer>
<country>USA</country>
<company>Warner Brothers</company>
<price>Rs 580</price>
<year>2004</price>
</cd>
</catalog>
catalog
{
Font-family:Courier New;
Background-color:#665544;