0% found this document useful (0 votes)
13 views2 pages

Web Technology Exam Paper 2024-25

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Web Technology Exam Paper 2024-25

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CS/B.

TECH(N)/ODD/SEM-7/7716/2024-2025

MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL


Paper Code : OE-EC704A Web Technology

Time Allotted : 3 Hours Full Marks :70


The Figures in the margin indicate full marks.
Candidate are required to give their answers in their own words as far as practicable

Group-A (Very Short Answer Type Question)

1. Answer any ten of the following : [ 1 x 10 = 10 ]


(I) What is the functionality of sequence input stream?
(II) What does AWT stand for?
(III) Which tag is used to insert graphics on the web page?
(IV) Can we assign superclass to subclass?
(V) What is an exception?
(VI) What is the necessity of character streams?
(VII) Which method can be used to output a string in an applet?
(VIII) What are the predefined values a Boolean literal can take?
(IX) Can we extend (inherit) final class?
(X) When does Arithmetic Exception occur?
(XI) What are Print Stream And Print Writer?
(XII) What is the output?
import [Link].*;
import [Link].*;
public class myapplet extends Applet {
public void paint(Graphics g) {
[Link]("Learning Applet", 20, 20);
}
}

Group-B (Short Answer Type Question)


Answer any three of the following [ 5 x 3 = 15 ]

2. Differentiate between local and remote applets. How exceptions can be handled? [5]
3. What is object oriented programming? How is it different from the procedure oriented programming? [5]
4. Discuss the steps involved in loading and running a remote applet. [5]
5. Explain delegation model in Java applet. Differentiate between JVM and JRE [5]
6. Write the syntax of single inheritance in Java. Explain with example. [5]

Group-C (Long Answer Type Question)


Answer any three of the following [ 15 x 3 = 45 ]

7. (a) What is a constructor? What are its special properties? [5]


(b) When do we declare method or class final and abstract? [5]
(c) Discuss the different levels of access protection available in Java. [5]
8. (a) Explain with the help of an example, how Java gets benefitted by using Interface? [6]
(b) How can you create your own package and add classes in that? Explain with the help of an example. [9]
9. (a) Explain collections class. What is Dynamic Method lookup. [5]
(b) What is linked list? Explain linked list supported by Java. [5]
(c) Differentiate between ArrayList and LinkedList. [5]
10. (a) List various attributes of applet tag in HTML. [5]
(b) How is applet different from frame and page? [5]

1/2
(c) Explain event handling mechanism in Java. [5]

11. (a) Explain method overriding and method overloading. [4]


(b) Explain with example of the use of super keyword. [3]
(c) Create a package named ‘school’. Create two sub package named student package and a staff package [8]
with ‘school’. Implement a simple school system that makes use of classes provided by these two
packages.

*** END OF PAPER ***

2/2

Common questions

Powered by AI

Object-oriented programming (OOP) focuses on objects and encapsulates data and behavior into these objects, promoting reusability and modularity. It supports inheritance, polymorphism, and encapsulation. In contrast, procedure-oriented programming (POP) is centered around procedures or functions and follows a step-by-step approach. POP does not support inheritance or encapsulation directly, making it less suited for complex systems requiring reusable components .

A constructor in Java is used to initialize objects and has the same name as the class. It does not have a return type and is called automatically when an object is created. Methods or classes are declared final to prevent further modification or inheritance to ensure stability once the class or method has been designed. Abstract classes or methods define a structure without implementation details, and should be declared when sub-classes are expected to provide specific implementations .

SequenceInputStream in Java is used to read data from multiple input streams sequentially as if it were from a single stream, essentially concatenating streams during input operations. It differs from other input streams by allowing multiple sources to be combined, whereas regular input streams handle data from a single source. This is particularly useful when merging data from several input sources in a seamless manner .

The 'super' keyword in Java is used to access members of the parent class, offering a way to invoke the superclass's methods or constructor. For example, in a subclass constructor, 'super()' can be called to execute the parent class's constructor. Method overloading occurs when multiple methods share the same name but differ in parameter types or numbers, allowing different implementations based on input. For instance, 'print(int x)' and 'print(String y)' demonstrate method overloading by accepting different parameter types. These features enhance reusability and readability .

To create a custom package in Java, declare the package name at the top of your Java file using 'package packageName;'. Place the file in the corresponding directory structure matching the package name. Compile the class with the 'javac' command, specifying the directory structure. Add additional classes to this package by placing them in the same directory and with the matching package declaration. This approach aids in organizing classes logically and avoiding naming conflicts, thereby supporting modular design .

Java's event handling model is based on the delegation event model where event sources generate events and are listened to by listeners. Events are captured and processed by event-handlers defined within listeners, providing separation of the event-generation and handling mechanism. This supports interactive application development by letting different parts of the application handle related actions, improving modularity, and allowing easy updating of GUI code without altering the underlying logic. It enhances the dynamic response to user actions and events .

The delegation model in Java applets refers to how an applet delegates the handling of events to listeners, separating user interface code from event-handling code. This enables better modularization and maintenance. The JVM (Java Virtual Machine) is an abstraction that executes Java bytecode. The JRE (Java Runtime Environment) includes the JVM and adds the libraries and frameworks necessary to run Java applications. Thus, JRE provides the runtime environment for Java applications to execute .

Loading and running a remote applet involves several steps: the browser requests the applet's class files from a server, downloads them, and then initiates the JVM to execute the applet. The browser uses the applet's tags in HTML to locate and load the applet. Security restrictions are checked to prevent unauthorized actions. The initialized applet then executes its lifecycle methods (init, start, stop, destroy) to provide the desired functionality .

ArrayList in Java provides fast access time due to its array-based structure, making it optimal for retrieving elements frequently. However, insertion and deletion operations are slower compared to LinkedList because they require array resizing and element shifting. LinkedList, being a double-linked list, offers faster insertions and deletions, especially when modification to the middle of the list is frequent. ArrayList should be used when frequent random access is needed, while LinkedList is better suited for scenarios with frequent add/remove operations .

Local applets are stored on the client side, while remote applets are downloaded from a network. Local applets typically load faster and are less secure in terms of network access restrictions. Exceptions in Java are handled using try-catch blocks, where code that might throw an exception is placed inside a try block and handling code in catch blocks. Finally blocks can be used to execute code regardless of whether an exception is thrown .

You might also like