Bharati Vidyapeeth s Institute of Computer Applications and Management A-4, Paschim Vihar, New Delhi-63.

Similar documents
Core Java SYLLABUS COVERAGE SYLLABUS IN DETAILS

JAVA RMI. Remote Method Invocation

03 Remote invocation. Request-reply RPC. Coulouris 5 Birrel_Nelson_84.pdf RMI

Component-Based Software Engineering

IJESRT. http: //

"Charting the Course... Java Programming Language. Course Summary

Last Class: Network Overview. Today: Distributed Systems

Remote Procedure Call

Remote Method Invocation in Java

presentation DAD Distributed Applications Development Cristian Toma

Remote Method Invocation

Remote Method Invocation

CONTENTS. Chapter 1 Getting Started with Java SE 6 1. Chapter 2 Exploring Variables, Data Types, Operators and Arrays 13

1 OBJECT-ORIENTED PROGRAMMING 1

IT6503 WEB PROGRAMMING. Unit-I

RMI (Remote Method Invocation) Over the year, there have been 3 different approaches to application development:

Desarrollo de Aplicaciones en Red RMI. Introduction. Considerations. Considerations. RMI architecture

5.4. Events and notifications

CSci Introduction to Distributed Systems. Communication: RPC In Practice

ABOUT CORE JAVA COURSE SCOPE:

JAC444 - Lecture 11. Remote Method Invocation Segment 2 - Develop RMI Application. Jordan Anastasiade Java Programming Language Course

Sockets and RMI. CS151 Chris Pollett Dec. 5, 2005.

Java Programming. Price $ (inc GST)

Written by: Dave Matuszek

JAVA. Duration: 2 Months

How are classes loaded into the Java Virtual Machine (JVM)? from the local file system (CLASSPATH). by an instance of ClassLoader

SCHEME OF COURSE WORK

Object Interaction. Object Interaction. Introduction. Object Interaction vs. RPCs (2)

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A

Distributed Systems. 5. Remote Method Invocation

RMI. Remote Method Invocation. 16-Dec-16

Remote Objects and RMI

Oracle 10g: Java Programming

Verteilte Systeme (Distributed Systems)

Chapter 4 Remote Procedure Calls and Distributed Transactions

Communication and Distributed Processing

Syllabus & Curriculum for Certificate Course in Java. CALL: , for Queries

Remote Method Invocation R.M.I.

Distributed Applications Programming. Lab 4

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Remote Method Invocation

Communication and Distributed Processing

Object Oriented Programming with Java. Unit-1

CS 5523 Operating Systems: Remote Objects and RMI

E Oracle 10g Java Bootcamp I v1

Questions and Answers. A. RMI allows us to invoke a method of java object that executes on another machine.

CC755: Distributed and Parallel Systems

Distributed Programming with RMI. Overview CORBA DCOM. Prepared By: Shiba R. Tamrakar

Remote Method Invocation Benoît Garbinato

Remote Method Invocation. Benoît Garbinato

Table of Contents. Chapter 1 Getting Started with Java SE 7 1. Chapter 2 Exploring Class Members in Java 15. iii. Introduction of Java SE 7...

Reflection/RMI 4/28/2009

OracleAS 10g R3: Java Programming

The UNIVERSITY of EDINBURGH. SCHOOL of INFORMATICS. CS4/MSc. Distributed Systems. Björn Franke. Room 2414

COURSE SYLLABUS. Complete JAVA. Industrial Training (3 MONTHS) PH : , Vazhoor Road Changanacherry-01.

Introduction & RMI Basics. CS3524 Distributed Systems Lecture 01

Distributed Objects SPL/ SPL 201 / 0 1

Distributed Programming in Java. Distribution (2)

Distributed Systems. 02r. Java RMI Programming Tutorial. Paul Krzyzanowski TA: Long Zhao Rutgers University Fall 2017

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

JAVA & J2EE UNIT -1 INTRODUCTION

Distributed Computing

5/23/2015. Core Java Syllabus. VikRam ShaRma

Distributed Systems Project 4 Assigned: Friday March 20 Due: Friday April 3, 11:59pm

CS/B.TECH/CSE(New)/SEM-5/CS-504D/ OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70 GROUP A. (Multiple Choice Type Question)

Advanced Java 2014

Contents Introduction 1

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Get Unique study materials from

Department of Computer Science & Engineering. M.Tech(CSE)-I Year-II Semester WEB SERVICES AND SERVICE ORIENTED ARCHITECHTURE (B1513) Mr.K.

Course Snapshot. The Next Few Classes. Parallel versus Distributed Systems. Distributed Systems. We have covered all the fundamental OS components:

Grid Computing. Java Remote Method Invocation (RMI) RMI Application. Grid Computing Fall 2006 Paul A. Farrell 9/5/2006

Chapter 4: Processes. Process Concept. Process State

UNIT -I PART-A Q.No Question Competence BTL

1 interface TemperatureSensor extends java.rmi.remote 2 { 3 public double gettemperature() throws java.rmi.remoteexception; 4 public void

5 Distributed Objects: The Java Approach

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Course Snapshot. The Next Few Classes

SUMMARY INTRODUCTION REMOTE METHOD INVOCATION

Network. Dr. Jens Bennedsen, Aarhus University, School of Engineering Aarhus, Denmark

15CS45 : OBJECT ORIENTED CONCEPTS

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

Generic architecture

Advanced Java Programming

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 OBJECT ORIENTED PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Distributed Systems. Distributed Object Systems 2 Java RMI. Java RMI. Example. Applet continued. Applet. slides2.pdf Sep 9,

J2EE Technologies. Industrial Training

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

COMP 6231: Distributed System Design

IBD Intergiciels et Bases de Données

[Course Overview] After completing this module you are ready to: Develop Desktop applications, Networking & Multi-threaded programs in java.

Multiple Choice Questions. Chapter 5

3. Course Outlines: Specific Objectives Contents Teaching Hours understand the basic concept of java programing. 1. Introduction to Java Language

VALLIAMMAI ENGINEERING COLLEGE

Activation of remote objects

Java Training JAVA. Introduction of Java

These r all the basic questions generally u will face at the round which is easy to get through.

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Transcription:

Bharati Vidyapeeth s Institute of Computer Applications and Management A-4, Paschim Vihar, New Delhi-63. MCA III rd Semester Second Internal: Java Programming (MCA-205) Note: All the questions are compulsory. Marks are indicated against each question. Max. Marks: 45 Max. Time: 02 Hrs. Q1. Attempt any two [1*2 =2] a. Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized? b. What is the layout for toolbar? c. Can we assign priority to a thread? If yes how? d. Discuss any one Factory method of InetAddress class. Q2. Attampt any two [2*2 =4] a. Provide Code snippet to create a JTable. b. What is the difference between awt and swing components? c. How is a Java Applet different from a Java Application? Q3. Write short note on any three [3*3 =9] a. Event Delegation Model b. Swing Features c. JDBC Driver Types d..class Format e. Demonstrate the use of callable statement Q4. Attempt any three [3*8 =24] a. Provide step by step directions for building a client/server application by using RMI. Implement a program in which, server receives a request from a client to add two numbers, the server adds these together and returns the sum. b. Discuss the step by step process for writing a JavaBean. Create a JavaBean class called Counter that counts upward from 0 to some specified limit. The limit and the time interval between increments should be properties of this bean. c. Discuss inter thread communication. Write a multithreaded application implementing the Producer-Consumer problem. d. Implement a GUI based application to add, update & delete student record from the database using JDBC. Application must be menu based application. In case of Update/delete record application must display all student names in a list. In case of update, application must display the selected student details. A student record must have student name, roll no & course(mca/btech). Provide the screen design(s) of the application first.

Q5. a. Provide a code snippet to prepare and send a DatagramPacket having a string that need to send to server. It also contains the address and port to which the packet will be sent. [2.5] b. If an Employee class is present and its objects are added in an arraylist. Now I want the list to be sorted on the basis of the employeeid of Employee class. What are the steps? Provide the declaration of Employee class. [2] c. Discuss two different mechanisms to create a Thread using JAVA. [1.5] Q6. Write a connection-oriented dictionary lookup Client-Server application that has following features: [6] Client: Reads a string from the end-user. Server: Looks up the word in a dictionary containing name-meaning pairs and sends the meaning back to the client. Maintain dictionary using a Collection interface. Client: Display the returned contents

RMI stands for Remote Method Invocation The coding steps: 1. Code the Remote Interface 2. Implement the Remote Interface while extending UnicastRemoteObject 3. Code the driver to register an object in the rmiregistry 4. Code the client who will look up the remote object in the registry The first step is to create the Remote interface. import java.rmi.*; public interface rmiinterface extends Remote double add (double d1, double d2) throws Exception; The rules for the Remote interface are as follows: 1. The interface must extend java.rmi.remote 2. The method signatures for remote methods need to be defined to throw a RemoteException The second step is to implement the interface. import java.rmi.*; import java.rmi.server.*; public class rmiimpl extends UnicastRemoteObject implements rmiinterface public rmiimpl () throws RemoteException public double add (double d1, double d2) throws Exception return d1+d2; Step 3, is to code a driver program, which will create an instance of the class, and register it with the rmiregistry public static void main (String args [])

try rmiimpl obj=new rmiimpl (); Naming. rebind ("///rmi", rmiobj); catch (Exception e) System.out.println ("An error occurred trying to + bind the object to the registry."); The fourth step is to implement the client. import java.rmi.*; import java.io.*; public class ConfusedClient public static void main (String args []) BufferedReader reader; try String url= rmi: // +args [0] + /rmi ; rmiinterface rmiinter= (rmiinterface) Naming. lookup(url)); System.out.println ( \n The first no is +args[1]); System.out.println ( \n The second no is +args[2]); double d1, d2; d1=double.valueof (args [1]).doubleValue (); d2=double.valueof (args [2].doubleValue () ; System.out.println ( \n The sum of two values +rmiinter.add (d1, d2)); catch (Exception e) System.out.println ("An error occurred.");

The compiling & running steps: 1. Compile all of the.java files 2. Run rmic on the implementation of the Remote interface 3. Open a second terminal window 4. Type start rmiregistry in one of the windows 5. Register the remote object in the registry by running the driver 6. Run the client 7. Play Write Q 1) Answer the following briefly: [1x10] i) Why are suspend and stop methods of Thread class deprecated? ii) What is the collection Map used for? iii) What is the difference between a simple Statement and a PreparedStatement in JDBC? iv) Why is the relation between Container and Component classes of awt? What does the relation signify? v) What is meant by the term Event Delegation Model? vi) What is the class AppletContext used for? vii) What is the use of client side stubs in RMI? viii) Why are swing-components said to be lightweight components? ix) What are the requirements a class should fulfill in order to be treated as a Java Bean? x) What is the role of byte code verifier? xi) Why should finalize method not be used for releasing the resources acquired during creation? xii) Why do wait and notify belong to Object class? Q 2) Answer any three of the following: i) What is JdbcOdbcDriver? Why is it not used widely? ii) What is the difference between awt and swing components? iii) How is a Java Applet different from a Java Application? iv) Explain briefly, the different types of properties supported by Java Beans. v) What is JIT compiler? How does it execute a compiled Java program? [2x3] Q 3) Answer the following with help of code snippets [3x3] i) What is the significance of getsource method of the EventObject? ii) Explain the steps involved in obtaining a database connection through JDBC. iii) What are synchronized methods and synchronized blocks in a multithreaded application? iv) How is a TreeSet different from a HashSet? v) How can a rmi client application find out the list of names that are bound with the rmiregistry?

Q 4) Give a detailed explanation of either of the following: [5] i) The architecture of JVM ii) The format of a Java class file iii) The thread life cycle (from JVM perspective) Q 5) i) ii) Write Java code for the following: [7] Write a multithreaded application implementing the Producer-Consumer problem. Implement a RMI Application where a client queries a Store through its name and the server returns a remote reference to the Store object. The client should further call a remote method queryprice on the received reference to find the price of a product. [5] Create the UI for a simple calculator. Write a program to count number of occurrences of a word in a string using collections. iii) Write a Code snippet to report all the contents of a database table in tabular format. Create a Label that displays system time in the format HH:MM:SS. [3] *** All the Best***