Showing posts with label Lab Manual. Show all posts
Showing posts with label Lab Manual. Show all posts

Monday, 1 April 2013

IT2357 Web Technology Fixing the Hotspot - Lab Experiment 1

AIM:

To create the web page using the following

1. To embed image map
2. To fix hotspot 
3. Show all related information when hotspot are clicked



PROGRAM:


 main.html

<html>
<head>
<title> FIRST PROGRAM </title>
</head>
<body bgcolor="Blue">
<center>
<b>HOTSPOT</b>
<hr>
<br><br>
<map name="picture">
<img src="india.jpg" alt="India" usemap="picture">
<area shape="rectangle" coords="224,590,304,706" href="chennai.html" alt="Chennai">
<area shape="rectangle" coords="186,405,243,460" href="mumbai.html" alt="Mumbai">
<area shape="rectangle" coords="254,200,297,246" href="delhi.html" alt="Delhi">
<area shape="rectangle" coords="184,518,232,601" href="Bengaluru.html" alt="Bengaluru">
</center>
</body>
</html
 
 
chennai.html 
 
<html>
<head>
<title> Chennai Information </title>
</head>
<body>
<center>
 Chennai,formerly Madras has a variety of culture and traditions. 
It is home to many temples. The famous temples has also got<b>GI</b> status.
</center>
</body>
</html>
 
 
bengaluru.html 
 
 
<html>
<head>
<title> Begaluru Information </title>
</head>
<body>
<center>
  Bengaluru is a city located in the state of Karnatka. 
It is also referred as <u>Smart City</u> because it houses many IT Concerns.
</center>
</body>
</html>
 
 
 
delhi.html 
 
<html>
<head>
<title> Delhi Information </title>
</head>
<body>
<center>
   Delhi is the capital of India. 
It has a long legacy with many monuments present in and around Delhi.
 The monuments include <i> Taj Mahal, Iron pillar of Mehrauli, Qutub Minar </i> etc
</center>
</body>
</html>
 
 
mumbai.html 
 
<html>
<head>
<title> Mumbai Information </title>
</head>
<body>
<center>
  Bombay (or) Mumbai is India's Business/Economic capital. 
It is also known as <i> Mayapuri-Land of Dreams </i>.
 It houses the world famous <b> Bollywood Industry</b>
</center>
</body>
</html> 








  



Wednesday, 26 December 2012

IT2305 JAVA PROGRAMMING LAB MANUAL VIVA QUESTION - Anna University - COMMON TO INFORMATION TECHNOLOGY

JAVA LAB VIVA QUESTIONS

 Object     :    Objects have states and behaviors. Example: A dog has states-color, name, breed as
     well as behaviors -wagging, barking, eating. An object is an instance of a class.
Class        :      A class can be defined as a template/ blue print that describe the behaviors/states  
        that object of its type suppor
Define overloading    :  Two methods may not have the same name and argument list but
different return types.
Output Statement    :      System.out.println(“”)
Input Statement         :       DataInputStream dis = new DataInputStream()
Define Inheritance         :
The properties( variable & methods)  inherited from various class the processes is known as inheritance
Key words:
extends, super class , base class
super class : the properties are inherited from this class
sub class / derived class : which class is inheriting  properties from  base class
Types :
a.       Single inheritance
b.      Multi level inheritance
c.       Hierarchical inheritance

Interface

Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.

Package

              Collection of classes is known as package . A package is a namespace that organizes a set of related classes and interfaces. Conceptually you can think of packages as being similar to different folders on your computer.

Thread

A thread, in the context of Java, is the path followed when executing a program. All Java programs have at least one thread, known as the main thread, which is created by the JVM at the program’s start, when the main() method is invoked with the main thread. In Java, creating a thread is accomplished by implementing an interface and extending a class. Every Java thread is created and controlled by the java.lang.Thread class.

When a thread is created, it is assigned a priority. The thread with higher priority is executed first, followed by lower-priority threads. The JVM stops executing threads under either of the following conditions:
  • If the exit method has been invoked and authorized by the security manager.
  • All the daemon threads of the program have died.
Define Synchronization :
Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible: thread interference and memory consistency errors. The tool needed to prevent these errors is synchronization.
Define RMI : 
  The Java Remote Method Invocation (RMI) system allows an object running in one Java virtual machine to invoke methods on an object running in another Java virtual machine. RMI provides for remote communication between programs written in the Java programming language.
Exceptions:
 The Java programming language uses exceptions to handle errors and other exceptional events. This lesson describes when and how to use exceptions.
Types of Exception :
 Arithmetic Exception()
Interrupted Exception()
Array IndexOutOfBound Exception()
StringIndexOutOfBound Exception()
ClassNotFoundException()
NegativeArraySizeException()
Description of program:
This program establishes the connection between MySQL database and java files with the help of various types of APIs interfaces and methods. If connection is established then it shows "Connected to the database" otherwise it will displays a message "Disconnected from database".
Connection:                   
This is an interface in  java.sql package that specifies connection with specific database like: MySQL, Ms-Access, Oracle etc and java files. The SQL statements are executed within the context of the Connection interface.
Class.forName(String driver):
This method is static. It attempts to load the class and returns class instance and takes string type value (driver) after that matches class with given string.

DriverManager:
It is a class of java.sql package that controls a set of JDBC drivers. Each driver has to be register with this class.

getConnection(String url, String userName, String password):
This method establishes a connection to specified database url. It takes three string types of arguments like: 

    url: - Database url where stored or created your database
  userName: - User name of MySQL
  password: -Password of MySQL 

con.close():
This method is used for disconnecting the connection. It frees all the resources occupied by the database.

printStackTrace():
The method is used to show error messages. If the connection is not established then exception is thrown and print the message.

Define JVM :
        Java Virual Machine
Define Byte Code:                                                                             
                          Interupted Code  ,Java Programs are Converted into Byte Code Before the Executable code.


Layout Manager:

   To arrange the components in Any particular order
 1.FlowLayout manager
 2.Border Layout Manager
 3.Grid Layout manager


Applet :

Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can't access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining. 
Advantages of Applet:
  • Applets are cross platform and can run on Windows, Mac OS and Linux platform
  • Applets can work all the version of Java Plugin
  • Applets runs in a sandbox, so the user does not need to trust the code, so it can work without security approval
  • Applets are supported by most web browsers
  • Applets are cached in most web browsers, so will be quick to load when returning to a web page
  • User can also have full access to the machine if user allows
Disadvantages of Java Applet:
  • Java plug-in is required to run applet
  • Java applet requires JVM so first time it takes significant startup time
  • If applet is not already cached in the machine, it will be downloaded from internet and will take time
  • Its difficult to desing and build good user interface in applets compared to HTML technology


CS2308 System Software laboratory VIVA QUESTION with ANSWERs (PART 4) - EDITORS

TEXT EDITORS
1. Define interactive editor?
An interactive editor is a computer program that allows a user to create and revise a target document. The term document includes objects such as computer programs, text, equations, tables, diagrams, line art, and photographs any thing that one might find on a printed page.

2. What are the tasks performed in the editing process?
4 tasks
* Select the part of the target document to be viewed and manipulated.
* Determine how to format this view on-line and how to display it.
* Specify and execute operations that modify the target document.
* Update the view appropriately.

3. What are the three categories of editor's devices?
* Text device/ String devices
* Button device/Choice devices
* Locator device

4. What is the function performed in editing phase?
In the actual editing phase, the target document is created or altered with a set of operations such as insert, delete, replace, move and copy.

5. Define Locator device?
Locator devices are two-dimensional analog-to-digital converters that
position a cursor symbol on the screen by observing the user's movement of the device. The most common such devices for editing applications are the mouse and the data tablet.
6. What is the function performed in voice input device?
Voice-input devices, which translate spoken words to their textual
equivalents, may prove to be the text input devices of the future. Voice recognizers are currently available for command input on some systems.
7. What are called tokens?
The lexical analyzer tracks the source program one character at a time by making the source program into sequence of atomic units is called tokens.

8. Name some of typical tokens.
Identifiers, keywords, constants, operators and punctuation symbols such as commas and parentheses are typical tokens.

9. What is meant by lexeme?
The character that forms a token is said to be a lexeme.

10. Mention the main disadvantage of interpreter.
The main disadvantage of interpreter is that the execution time of
interpreted program is slower than that of a corresponding compiled object program.
11. What is meant by code optimization?
The code optimization is designed to improve the intermediate code,
which helps the object program to run faster and takes less space.
12. What is error handler?
The error handler is used to check if there is an error in the program. If any error, it should warn the programmer by instructions to proceed from phase to phase.
13. Name some of text editors.
* line editors
* stream editors
* screen editors
* word processors
* structure editors
14. What for debug monitors are used?
Debug monitors are used in obtaining information for localization of
errors.
15. Mention the features of word processors.
* moving text from one place to another
* merging of text
* searching
* word replacement
16. What are the phases in performing editing process?
* Traveling phase
* Filtering phase
* Formatting phase
* Editing phase
17. Define traveling phase.
The phase specifies the region of interest. Traveling is achieved using operations such as next screenful, bottom, find pattern.

18. Filtering phase.
The selection of what is to be viewed and manipulated in given by
filtering.

19. Editing phase
In this phase, the target document is altered with the set of operations such as insert, delete, replace, move and copy.

20. Define user interface?
User interface is one, which allows the user to communicate with the
system in order to perform certain tasks. User interface is generally designed in a computer to make it easier to use.

21. Define input device?
Input device is an electromechanical device, which accepts data from the outside world and translates them into a form, which the computer can interpret.

22.Define output devices
Output devices the user to view the elements being edited and the results of the editing operations.

23. What are the methods in Interaction language of a text editor?
* Typing -oriented or text command oriented method
* Function key interfaces
* menu oriented method

24. Define interactive debugging systems.
An interactive debugging system provides programmers with facilities
that aid in the testing and debugging of programs.
* Debugging functions and capabilities
* Relationship with other parts of the system
* User interface criteria.

25. Define editor structure.
The command language processor accepts input from the users input
devices and analyzes the tokens and syntactic structure of the commands.

26. Give the components of editor structure 4 components
* Editing component
* Traveling component
* Viewing component
* Display component

27. What are the basic types of computing environments used in editor's functions?
Editor's function in three basic types of computing environments
i. Time sharing ii. Stand-alone iii. Distributed


MORE >>>>

CS2308 System Software laboratory VIVA QUESTION with ANSWERs (PART 3) LOADERS and LINKERS

LOADERS AND LINKERS

1. What are the basic functions of loaders?
* Loading - brings the object program into memory for execution
* Relocation - modifies the object program so that it can be loaded at an address different from the location originally specified
* Linking - combines two or more separate object programs and also
supplies the information needed to reference them.

2. Define absolute loader.
The loader, which is used only for loading, is known as absolute loader.
e.g. Bootstrap loader

3. What is meant by bootstrap loader?
This is a special type of absolute loader which loads the first program to be run by the computer. (usually an operating system)
4. What are relative (relocative) loaders?
Loaders that allow for program relocation are called relocating
(relocative) loaders.

5. What is the use of modification record?
Modification record is used for program relocation. Each modification
record specifies the starting address and the length of the field whose value is to be altered and also describes the modification to be performed.

6. What are the 2 different techniques used for relocation?
Modification record method and relocation bit method.
7. Define Relocation bit method.
If the relocation bit corresponding to a word of object code is set to 1, the program's starting address is to be added to this word when the program is relocated. Bit value 0 indicates no modification is required.
8. Define bit mask.
The relocation bits are gathered together following the length indicator in each text record and which is called as bit mask. For e.g. the bit mask FFC(111111111100) specifies that the first 10 words of object code are to be modified during relocation.
9. What is the need of ESTAB?
It is used to store the name and address of the each external symbol. It also indicates in which control section the symbol is defined.

10. What is the use of the variable PROGADDR?
It gives the beginning address in memory where the linked program is to be loaded. The starting address is obtained from the operating system.

11. Write the two passes of a linking loader.
Pass1: assigns address to all external symbols
Pass2: it performs actual loading, relocation and linking.

12. Define automatic library search.
In many linking loaders the subroutines called by the program being
loaded are automatically fetched from the library, linked with the main program and loaded. This feature is referred to as automatic library search.

13. List the loader options INCLUDE &DELETE.
The general format of INCLUDE is INCLUDE program_name (library name)
This command direct the loader to read the designated object program
from a library and treat it as the primary loader input.
The general format of DELETE command is
DELETE Csect-name
It instructs the loader to delete the named control sections from the sets of programs loaded.
14. Give the functions of the linking loader.
The linking loader performs the process of linking and relocation. It
includes the operation of automatic library search and the linked programs are directly loaded into the memory.


15. Define dynamic linking.
If the subroutine is loaded and linked to the program during its first call (run time), then it is called as dynamic loading or dynamic linking.

16. Write the advantage of dynamic linking.
* It has the ability to load the routine only when they are needed.
* The dynamic linking avoids the loading of entire library for each
execution.
17. What is meant by static executable and dynamic executable?
In static executable, all external symbols are bound and ready to run. In dynamic executables some symbols are bound at run time.

18. What is shared and private data?
The data divided among processing element is called shared data. If the data is not shared among processing elements then it is called private data.
19. Write the absolute loader algorithm.
Begin
Read Header record
Verify program name and length
Read first text record
While record type != 'E' do
Begin
Moved object code to specified location in memory
Read next object program record
End
Jump to address specified in End record


MACRO PROCESSORS

1. Define macro processor.
Macro processor is system software that replaces each macro instruction with the corresponding group of source language statements. This is also called as expanding of macros.
2. What do macro expansion statements mean?
These statements give the name of the macro instruction being invoked
and the arguments to be used in expanding the macros. These statements are also known as macro call.
3. What are the directives used in macro definition?
MACRO - it identifies the beginning of the macro definition
MEND - it marks the end of the macro definition

4. What are the data structures used in macro processor?
DEFTAB - the macro definitions are stored in a definition table i.e. it contains a macro prototype and the statements that make up the macro body.
NAMTAB - it is used to store the macro names and it contains two
pointers for each macro instruction which indicate the starting and end location of macro definition in DEFTAB. it also serves as an index to DEFTAB
ARGTAB - it is used to store the arguments during the expansion of macro invocations.
5. Define conditional macro expansion.
If the macro is expanded depends upon some conditions in macro
definition (depending on the arguments supplied in the macro expansion) then it is called as conditional macro expansion.
6. What is the use of macro time variable?
Macro time variable can be used to store working values during the macro expansion. Any symbol that begins with the character & and then is not a macro instruction parameter is assumed to be a macro time variable.
7. What are the statements used for conditional macro expansion?
IF-ELSE-ENDIF statement
WHILE-ENDW statement
8. What is meant by positional parameters?
If the parameters and arguments were associated with each other
according to their positions in the macro prototype and the macro invocation statement, then these parameters in macro definitions are called as positional parameters.

9. Consider the macro definition
#define DISPLAY (EXPR) Printf ("EXPR = %d\n", EXPR) Expand the macro instruction DISPLAY (ANS)
Ans.: Printf ("EXPR = %d\n", ANS)

10. What are known as nested macro call?
The statement, in which a macro calls on another macro, is called nested macro call. In the nested macro call, the call is done by outer macro and the macro called is the inner macro.

11. How the macro is processed using two passes?
Pass1: processing of definitions
Pass 2:actual-macro expansion.

12. Give the advantage of line by line processors.
* It avoids the extra pass over the source program during assembling.
* It may use some of the utility that can be used by language translators so that can be loaded once.

13. What is meant by line by line processor?
This macro processor reads the source program statements, process the
statements and then the output lines are passed to the language translators as they are generated, instead of being written in an expanded file.
14. Give the advantages of general-purpose macro processors.
* The programmer does not need to learn about a macro facility for each compiler.
* Overall saving in software development cost and maintenance cost.

15. What is meant by general-purpose macro processors?
The macro processors that are not dependent on any particular
programming language, but can be used with a variety of different languages are known as general purpose macro processors.
Eg. The ELENA macro processor.
16. What are the important factors considered while designing general purpose macro processors?
* comments
* grouping of statements
* tokens
* syntax used for macro definitions
17. What is the symbol used to generate unique labels?
$ symbol is used in macro definition to generate unique symbols. Each
macro expansion the $ symbol is replaced by $XX, where XX is the alpha
numeric character.

18. How the nested macro calls are executed?
The execution of nested macro call follows the LIFO rule. In case of nested macro calls the expansion of the latest macro call is completed first.
19. Mention the tasks involved in macro expansion.
* identify the macro calls in the program
* the values of formal parameters are identified
* maintain the values of expansion time variables declared in a macro
* expansion time control flow is organized
* determining the values of sequencing symbols
* expansion of a model statement is performed

20. How to design the pass structure of a macro assembler?
To design the structure of macro-assembler, the functions of macro
preprocessor and the conventional assembler are merged. After merging, the functions are structured into passes of the macro assembler.


MORE>>>>>
Back To Top