It6503 WP
It6503 WP
8.Define cascading.
Cascading refers to a certain set of rules that browsers use, in cascading order, to determine how to use the
style information. Such a set of rules is useful in the event of conflicting style information because the rules
would give the browser a way to determine which style is given precedence.
9.What are the style precedence rules when using multiple approaches?
Inline styles override both linked style sheets and style information stored in the document head with
<STYLE> tag. Styles defined in the document head override linked style sheets. Linked style sheets override
browser defaults.
14.What is DOM?
DOM is a W3C supported application program interface(API) that provides a platform and languages neutral
interface to allow developers to programmatically access and modify the content and structure document such
as HTML or XML.
15.What is HTML?
HTML is a language for describing web pages.
HTML stands for Hyper Text Markup Language
HTML is not a programming language, it is a markup
language A markup language is a set of markup tags
HTML uses markup tags to describe web pages
20.What is CSS?
Cascading Style Sheets (CSS) is a slightly misleading term, since a website might have only one CSS file
(style sheet), or the CSS might be embedded within an HTML file. It is better to think of CSS as a technology
(in the singular). CSS is comprised of statements that control the styling of HTML documents. Simply put, an
HTML document should convey content. A CSS document should control the styling of that content.
24.What is the purpose of CSS Box Model and mention its parts also.
The CSS box model is essentially a box that wraps around HTML elements, and it consists of: margins,
borders, padding, and the actual content.
The different parts are:
Margin
Border
Padding
Content
25.Define the term positioning and mention its types also.
The CSS positioning properties allow you to position an element. It can also place an element behind another,
and specify what should happen when an element's content is too big . There are four different positioning
methods.
Static Positioning
Fixed Positioning
Relative Positioning
Absolute Positioning
26.What is JavaScript?
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language
A scripting language is a lightweight programming language A
JavaScript consists of lines of executable computer code A
JavaScript is usually embedded directly into HTML pages
PART – B
4. Explain about XML and how to Create HTML Documents with the help of XML
Elements Character and entity references
Element examples Data types
Paragraphs: Document type declaration
Comments: Semantic HTML
Attributes Delivery
10. How HTML elements can be changed using JavaScript, the HTML DOM and events.
Modifying Element Style Change an
HTML Element
Change the Text of an HTML Element - innerHTML Change an
HTML Element Using Events
Change the Text of an Element - with a Function Using
the Style Object
Change the font and color of an Element
UNIT – II
PART – A
1. Define Java.
Java is an object-oriented language similar to C++, but simplified to eliminate language features that cause
common programming errors. Java source code files (files with a .java extension) are compiled into a format
called bytecode (files with a .class extension), which can then be executed by a Java interpreter.
4. Define Variable
Variables: The basic unit of storage in Java Program. And is defined by the combination of an identifier, a
type, and an optional initializer. The syntax for declaring a variable is: type identifier [= value] [ ,identifier [ =
value]…]; e.g.: int a = 5, b=6;
6. Define Arrays
a. An array is a group of variables of the same data type and referred to by a common name. An array is
contiguous block of memory locations referred by a common name.
E.g. char[] s;
Class[] Obj;
b. Like all objects we use the new keyword to create an array.
s = new char[10];
c. Types of Arrays:
i. One Dimensional Array.
type array_name []; //type is the datatype of the array.
ii. Multi – Dimensional Array.
type array_name = new type [rows] [cols];
7. What is Expression
In Java, arithmetic, boolean, and String expressions are written in conventional mathematical infix notation,
adapted to the standard computer character set (called ASCII).
8. What is Operator
Java provides a rich operator environment. And it can be classified into four groups as:
Arithmetic: Used in mathematical expressions. They are: +, -, *, /.
Bitwise: It operates on individual bits of integer values. They are: &, |, ~,
Relational: Compares two values and determines relationship between them. ==, !=, <, >, <=, and >=
Logical: It is an easy way to handle multiple conditions. They are: &&, || and, !.
16.What is Inheritance?
Inheritance is the capability of a class to use the properties and methods of another class while adding
its own functionality.
It has the following advantages:
o you can customize and enhance working
classes o it is easier to reuse code
o you can take a more general class and modify to suit a particular situation
19.What is Package?
A package is a grouping of related types providing access protection and name space management.
Note that types refers to classes, interfaces, enumerations, and annotation types.
The types that are part of the Java platform are members of various packages that bundle classes by
function: fundamental classes are in java.lang, classes for reading and writing (input and output) are in
java.io, and so on.
To create a package, you choose a name for the package (naming conventions are discussed in the next
section) and put a package statement with that name at the top of every source file that contains the
types. E.g. package graphics;
20.Define Interface
An interface is a group of related methods with empty bodies.
Implementing an interface allows a class to become more formal about the behavior it promises to
provide.
Interfaces form a contract between the class and the outside world, and this contract is enforced at build
time by the compiler.
If your class claims to implement an interface, all methods defined by that interface must appear in its
source code before the class will successfully compile.
21.What is Exception
Handling?
An exception is an event that occurs during the execution of a program that disrupts the normal flow of
instructions.
When an error occurs within a method, the method creates an object and hands it off to the runtime
system. The object, called an exception object, contains information about the error, including its type
and the state of the program when the error occurred.
Creating an exception object and handing it to the runtime system is called throwing an exception.
The set of possible "somethings" to handle the exception is the ordered list of methods that had been
called to get to the method where the error occurred. The list of methods is known as the call stack
The runtime system searches the call stack for a method that contains a block of code that can handle
the exception. This block of code is called an exception handler.
22.What is Multi-Threading?
A thread executes a series of instructions. Every line of code that is executed is done so by a thread.
Some threads can run for the entire life of the applet, while others are alive for only a few milliseconds.
The class java.lang.Thread is used to create and control threads.
To create a thread, a new instance of this class must be created. However, the thread does not start
running right away. Thread.start() must be called to actually make the thread run.
There are two ways to create a thread:
Extend the Thread class.
o With this technique the new class inherits from the class Thread. The thread can start running in
the class's run method.
Implement the Runnable interface.
o This technique is probably more common than extending the Thread class. It is not necessary to
define a new class to run the thread
23.Utility Packages:
The final Java package, java.util, contains a collection of utility classes.
The Utility Package of Java consist of the following components:
o Collections framework o
Legacy collection classes o
Event model
o Date and time facilities
o Internationalization
o Miscellaneous utility classes such as string tokenizer, random-number generator and bit
o Array
36.What is an Instance?
An instance has state, behaviour and identity. The structure and behaviour of similar classes are defined in their
common class. An instance is also called as an object.
45.What gives java it’s “write once and run anywhere” nature?
All Java programs are compiled into class files that contain bytecodes. These byte codes can be run in any
platform and hence java is said to be platform independent.
57. What is garbage collection? What is the process that is responsible for doing that in java?
Reclaiming the unused memory by the invalid objects. Garbage collector is responsible for this process
61. What is the basic difference between string and stringbuffer object?
String is an immutable object. StringBuffer is a mutable object.
PART-B
1. What is inheritance? Explain different types of inheritance supported by java with an example
2. Explain Abstract classes and dynamic binding with an example program
3. What is meant by stream? What are types of stream and classes? Explain with program
4. Write about the properties of Java interface with an example code
5. Explain the InputStream, OutputStream class hierarchy with an example program.
6. Explain the Reader, Writer stream lass hierarchy with an example program
7. Discuss on the visibility of base class members in privately and publicly herited classes
8. What are abstract classes? Give an example (with the program) to illustrate the use of abstract
classes
9. Does Java support multiple inheritances? Justify your answer with a example
10. Explain multi threading in Java
UNIT – III
PART – A
1.Java Database Connectivity:
Java Database Connectivity or in short JDBC is a technology that enables the java program to
manipulate data stored into the database.
JDBC is Java application programming interface that allows the Java programmers to access database
management system from Java code. It was developed by JavaSoft, a subsidiary of Sun Microsystems.
JDBC is consists of four Components: The JDBC API, JDBC Driver Manager, The JDBC Test Suite
and JDBC-ODBC Bridge.
JDBC is an API specification developed by Sun Microsystems that defines a uniform interface for
accessing various relational databases. JDBC is a core part of the Java platform and is included in the
standard JDK distribution.
15.Define IGMP.
It is Internet Group Management protocol. It provides
Broadcasting
Multicasting
20.Define socket
The socket is a software abstraction used to represent the terminals of a connection between two machines or
processes.
35.Define ODBC.
It is a standard for accessing different database systems. There are interfaces for Visual Basic, Visual C++,
SQL and the ODBC driver pack contains drivers for the Access, Paradox, dBase, Text, Excel and Btrieve
databases
38.Define protocol.
A protocol is a formal set of rules that must be followed in order to communicate.
40.Define port.
A port is a logical channel to an application running on a host. ie., The applications running on the host
machines are uniquely identified by port numbers.
PART-B
1. Explain the JDBC database access in detail
2. Implement a simple client-server program using RMI in java that displays a message
3. Explain in detail the creation,instantiation and usage of java beans objects
4. Explain the steps involed to create JDBC connectivity.list the advantages of JDBC.
5. Write a java program using JDBC connection
6. Explain in deatail about TCP sockets with a program
7. Explain in detail about UDP sockets with a program
8. Explain in detail about servlet database connectivity with an example of student database
9. Explain URL Rewriting and classes
Explain InetAddress class in detail
UNIT – IV
PART – A
1.What is Servlets?
Servlets are Java technology's answer to CGI programming. They are programs that run on Web server
and build Web pages.
Java servlets are more efficient, easier to use, more powerful, more portable, and cheaper than
traditional CGI and than many alternative CGI-like technologies.
The Servlet API, contained in the Java package hierarchy javax.servlet, defines the expected
interactions of a Web container and a servlet.
4.What is Container ?
Containers:
Containers (Frames, Dialogs, Windows and Panels) can contain components and
are themselves components, thus can be added to Containers.
Containers usually handle events that occurred to the Components, although nothing
prevents you from handling events in the component.
The method of handling events in the Container (i.e. Frame) is preferred over the
latter, since we want to centralize event handling.
5.Define Component?
They are generally the stuff that the user interacts with
Components are Buttons, TextAreas, Scrollbars, etc. in other words the visible UI controls that the user
interacts with, all of which have been added to a Container.
9.What is ActionListener:
This interface defines the method that an object must implement to listen for action events on AWT
components.
When an ActionEvent occurs, an AWT component notifies its registered ActionListener objects by
invoking their actionPerformed() methods.
The general type is public abstract interface ActionListener extends java.util.EventListener
{// Public Instance Methods public abstract void actionPerformed (ActionEvent e);}
10.What is Painting?
To understand how AWT's painting API works, helps to know what triggers a paint operation in a
windowing environment.
In AWT, there are two kinds of painting operations: system-triggered painting, and application
triggered painting.
System-triggered Painting
App-triggered Painting
11.Servlet containers
A Servlet container is a specialized web server that supports Servlet execution.
It combines the basic functionality of a web server with certain Java/Servlet specific optimizations and
extensions – such as an integrated Java runtime environment, and the ability to automatically translate
specific URLs into Servlet requests.
15.Define JSP.
Java Server Pages (JSP) are simple technology used to generate dynamic HTML on the server side.
16.Define Directives.
Directives are JSP elements that provide global information about an entire JSP page
17.Write down the various attributes for the page directives in JSP.
The page directive defines information that will be globally available for that Java Server Page,
language
extends
import
session
buffer
contenttype
19.What is a layout manager and what are different types of layout managers available in java AWT?
A layout manager is an object that is used to organize components in a container. The different layouts are
available are FlowLayout, BorderLayout, CardLayout, GridLayout and GridBagLayout.
1.Define XML.
XML is a meta-markup language that provides a format for describing structured data. This facilitates more
structured declarations of content and more meaningful search results across multiple platforms.
2.What is XML
XML stands for EXtensible Markup Language
XML is a markup language much like HTML
XML was designed to carry data, not to display data
XML tags are not predefined. We must define our own
tags XML is designed to be self-descriptive
XML is a W3C Recommendation.
5.Define DTD.
A DTD is a set of rules that specifies how to use XML markup. It contains specifications for each element,
including what the element's attributes are, what values the attributes can take on and what elements can be
contained in others.
6.What are the XML rules for distinguishing between the content of a document and the XML markup
element?
1.The start of XML markup elements is identified by either the less than symbol (<) or the ampersand
(&) character
2.Three other characters, the greater than symbol (>), the apostrophe or single quote (‘) and the double
quotation marks (“) are used by XML for markup.
3.To use these special characters as content within your document, you must use the corresponding
general XML entity.
7.What is global.asa file?
The global.asa file is a Active Server Application file you can track and manage the application and session
events, variables and objects. When you start the application the server will load the global.asa file into
memory.
<phonebook>
<number>
</number>
<name>
</name>
</phonebook>
16.What is XSLT?
XSLT stands for XSL Transformations
XSLT is the most important part of XSL
XSLT transforms an XML document into another XML
document XSLT uses XPath to navigate in XML documents
XSLT is a W3C Recommendation
19.What is SOAP?
SOAP is an XML-based protocol to let applications exchange information over
HTTP. SOAP is language independent
SOAP is based on XML
SOAP is simple and extensible
20.What is WSDL?
WSDL is an XML-based language for locating and describing Web services.
WSDL stands for Web Services Description
Language WSDL is based on XML
WSDL is used to describe Web services
21.Create a simple Web Service that converts the temperature from Fahrenheit to
Celsius, and vice versa:
<%@ WebService Language="VBScript" Class="TempConvert" %>
Imports System
Imports System.Web.Services
Public Class TempConvert :Inherits WebService <WebMethod()>
Public Function FahrenheitToCelsius (ByVal Fahrenheit As String) As String
dim fahr fahr=trim(replace(Fahrenheit,",",".")) if fahr="" or IsNumeric(fahr)=false then return "Error"
return ((((fahr) - 32) / 9) * 5) end function <WebMethod()> Public Function CelsiusToFahrenheit (ByVal
Celsius As String) As String dim cel cel=trim(replace(Celsius,",",".")) if cel="" or IsNumeric(cel)=false
then return "Error" return ((((cel) * 9) / 5) + 32) end function end class
PART – B
27.How the template based Transformation achieved with the help of XSLT
XSL Languages-What is XSLT-XSLT Uses XPath-XSLT – Transformation-Correct StyleSheet Declaration-
Create an XSL Style Sheet-Link the XSL Style Sheet to the XML DocumentXSLT Functions
28.How to write the web service and java web service client
JAX RPC technology manages communication between a web service and client. –These are the basic steps for
creating the web service and client-A service endpoint interface must conform to a few rules-Building the
Service -The compile-service Task -The generate-WSDL Task -Packaging and Deploying the Service -
Specifying the Endpoint Address -Deploying the Service
31.Explain SOAP technology for providing the communication between the data object.
What is SOAP-SOAP Syntax-Syntax Rules-Skeleton SOAP Message-SOAP Envelope Element-The
encodingStyle Attribute-SOAP Header Element-SOAP Body Element-SOAP Fault Element-SOAP Fault
Codes-SOAP HTTP Binding-Soap HTTP Binding-A SOAP request-The SOAP response
PART-B
1. Give an XML program for storing book details
2. Explain in detail about Form Navigation with an example
3. Explain in detail to display XML data on browser
4. Explain in detail about various XSL tags with an example
5.Explain briefly XSLT with a program
6. Explain in detail about the web service with a clear illustration
7.Write a client program to access a web service
8.Explain the following in detail
a. UDDI
b. WSDL
9.Explain Java Web Services with an example
10.Discuss about web resources