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

Similar documents
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)

CHETTINAD COLLEGE OF ENGINEERING & TECHNOLOGY JAVA

1.Which four options describe the correct default values for array elements of the types indicated?

OBJECT ORIENTED PROGRAMMING TYm. Allotted : 3 Hours Full Marks: 70

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Java Fundamentals p. 1 The Origins of Java p. 2 How Java Relates to C and C++ p. 3 How Java Relates to C# p. 4 Java's Contribution to the Internet p.

Object Oriented Programming with Java. Unit-1

B2.52-R3: INTRODUCTION TO OBJECT ORIENTATED PROGRAMMING THROUGH JAVA

15CS45 : OBJECT ORIENTED CONCEPTS

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

CS Internet programming Unit- I Part - A 1 Define Java. 2. What is a Class? 3. What is an Object? 4. What is an Instance?

Name of subject: JAVA PROGRAMMING Subject code: Semester: V ASSIGNMENT 1

The Sun s Java Certification and its Possible Role in the Joint Teaching Material

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

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

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

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Core JAVA Training Syllabus FEE: RS. 8000/-

2 rd class Department of Programming. OOP with Java Programming

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

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

BIT Java Programming. Sem 1 Session 2011/12. Chapter 2 JAVA. basic

SRM INSTITUTE OF SCIENCE & TECHNOLOGY Faculty of Science and Humanities Department of Computer Science UNIT I - INTRODUCTION TO JAVA

COMP 202 Java in one week

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Introduction to Programming Using Java (98-388)

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

Answer1. Features of Java

ABOUT CORE JAVA COURSE SCOPE:

An overview of Java, Data types and variables

Quiz on Tuesday April 13. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 4. Java facts and questions. Things to try in Java

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

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

Class, Variable, Constructor, Object, Method Questions

VALLIAMMAI ENGINEERING COLLEGE

Character Stream : It provides a convenient means for handling input and output of characters.

Java language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS

Write a java program to prints the count of odd and even no s entered.

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Computer Components. Software{ User Programs. Operating System. Hardware

1 OBJECT-ORIENTED PROGRAMMING 1

CSC 1214: Object-Oriented Programming

1. Java is a... language. A. moderate typed B. strogly typed C. weakly typed D. none of these. Answer: B

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

CompSci 125 Lecture 02

1 Shyam sir JAVA Notes

Declarations and Access Control SCJP tips

COP 3330 Final Exam Review

Expressions and Data Types CSC 121 Spring 2015 Howard Rosenthal

ALIGARH MUSLIM UNIVERSITY Department of Computer Science. JAVA Lab Assignment Course: MCA II nd Semester Academic Session:

Building Java Programs. Introduction to Programming and Simple Java Programs

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

Get Unique study materials from

VALLIAMMAI ENGINEERING COLLEGE

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...

Modern Programming Languages. Lecture Java Programming Language. An Introduction

Core Java Syllabus. Pre-requisite / Target Audience: C language skills (Good to Have)

Operators and Expressions

Govt. of Karnataka, Department of Technical Education Diploma in Information Science & Engineering. Fifth Semester

3. Java - Language Constructs I

Expressions and Data Types CSC 121 Fall 2015 Howard Rosenthal

Index. Index. More information. block statements 66 y 107 Boolean 107 break 55, 68 built-in types 107

STRUCTURING OF PROGRAM

S.No Question Blooms Level Course Outcome UNIT I. Programming Language Syntax and semantics

Contents. iii Copyright 1998 Sun Microsystems, Inc. All Rights Reserved. Enterprise Services August 1998, Revision B

The keyword list thus far: The Random class. Generating "Random" Numbers. Topic 16

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++

Topic 16. battle -they are strictly limited in number, they require fresh horses, and must only be made at decisive moments." -Alfred North Whitehead

PESIT Bangalore South Campus

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

THE CATHOLIC UNIVERSITY OF EASTERN AFRICA A. M. E. C. E. A

Computer Components. Software{ User Programs. Operating System. Hardware

Java Programming Language Mr.Rungrote Phonkam

Java Applets. Last Time. Java Applets. Java Applets. First Java Applet. Java Applets. v We created our first Java application

Java Programming. Atul Prakash

Chapter 1 INTRODUCTION SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Programming Language Concepts: Lecture 2

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of

CORE JAVA TRAINING COURSE CONTENT

-Alfred North Whitehead. Copyright Pearson Education, 2010 Based on slides by Marty Stepp and Stuart Reges from

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Sri Vidya College of Engineering & Technology

Index COPYRIGHTED MATERIAL

Tokens, Expressions and Control Structures

CS 231 Data Structures and Algorithms, Fall 2016

Programming Language Concepts: Lecture 2

Introduction to Visual Basic and Visual C++ Introduction to Java. JDK Editions. Overview. Lesson 13. Overview

Java Overview An introduction to the Java Programming Language

SCHEME OF COURSE WORK

Java Training JAVA. Introduction of Java

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING CS6456 OBJECT ORIENTED PROGRAMMING

Selected Java Topics

Course Outline. Introduction to java

A- Core Java Audience Prerequisites Approach Objectives 1. Introduction

END TERM EXAMINATION

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

Class definition. complete definition. public public class abstract no instance can be created final class cannot be extended

Transcription:

CS/B.TECH/CSE(OLD)/SEM-6/CS-605/2012 2012 OBJECT ORIENTED PROGRAMMING Time Allotted : 3 Hours Full Marks : 70 The figures in the margin indicate full marks. Candidates are required to give their answers in their own words as far as practicable. GROUP A (Multiple Choice Type Question) 1. Choose the correct alternatives for the following: 10 x 1 = 10 i) Which one of the following lists contains only Java programming language keywords? a) class, if, void, long, int, continue b) goto, instance of, native, finally, default, throws c) try, virtual, throw, final, volatile, transient d) strictfp, constant, super, implements, do e) byte, break, assert, switch, include. ii) Which is a reserved word in the Java programming language? a) Method b) Native c) Subclasses d) Reference.

iii) Which three are valid declarations of a char? 1. char c1 = 064770 2. char c2 = face ; 3. char c3 = 0xbeef; 4. char c4 = \u0022; 5. char c5 = \iface ; 6. char c6 = \uface ; a) 1,2,4 b) 1,3,6 c) 3,5 d) 5 only. iv) What is the numerical range of a char? a) 128 to 127 b) 2 to 2 1 c) 0 to 32767 d) 0 to 65535. v) public void test (int x) int odd = 1; if (odd) /* Line 4 */ System.out.println( odd ); else System.out.println( even ); Which statement is true? a) Compilation fails b) odd will always be output c) even will always be output d) odd will be the output for odd values of x, and even for even values.

vi) public class while Public void loop( ) int x = 0; while ( 1 ) /* Line 6 */ System.out.print( x plus one is + (x + 1)); /* Line 8 */ Which statement is true? a) There is a syntax error on line 1 b) There are syntax errors on lines 1 and 6 c) There are syntax errors on line 1, 6 and 8 d) There is a syntax error on line 6. vii) public class Test What is the prototype of the default constructor? a) Test b) Test(void) c) public Test d) public Test (void). viii) Which is a valid keyword in java? a) Static b) String c) Float d) Unsigned. ix) Java supports multiple inheritances. a) True b) False.

x) Java is platform independent. a) True b)false. GROUP B (Short Answer Type Questions) Answer any three of the following. 3 x 5 = 15 2. What is the difference between procedural language and object oriented language? 3. What is JVM? Explain the process of compilation and interpretation in Java. 2 + 3 4. What are parametric and non-parametric constructors? Explain with program. 2 + 3 5. What do you mean by exception? Explain user defined exception by a program. 2 + 3 6. Create an applet having background colour black and foreground colour as white. GROUP C (Long Answer Type Questions) Answer any three of the following. 3 x 15 = 45 7. a) What do you mean by method overloading and overwriting? Explain both with example. b) What are characteristics of abstract class? c) What do you mean by package? 8 + 5 + 2 8. a) What is Applet Stub Interface? Describe the local applet and remote applet. b) What is the difference between java applets and java application programs?

c) Write a Java code to develop an abstract class Geometric Object which will have two variables colour and weight. It would have constructor function for setting the colour as white and the weight as 1.0 as default values. The class should have methods getcolour() and getweight() to return the colour and weight values to the caller. The class should have two abstract method findarea() and Circumference(). d) What is AWT? Differentiate between component class and container class.3 + 3 + 5 + (1 + 3) 9. a) What is Multithreading? How to create a thread in Java? b) Differentiate between Checked Exception and Unchecked Exception. Write a Java program to illustrate the use of user-defined exception. c) What is the difference between throw and throws? d) What is the role of Garbage collection? Compare it with finalization. 4 + 2 + (2 + 3) + 4 10. a) What is polymorphism? Explain the types of polymorphism present in java. Compare and contrast overloading and overriding methods with proper examples. b) Assume that a bank maintains two kinds of accounts for customers, one called as savings account and the other as current account. The savings account provides compound interest and withdrawal facilities but no chequebook facility. The current account provides chequebook facility but no interest. Current account holders should also maintain a minimum balance and if the balance falls below the level, a service charge is imposed. Create a Java class account that stores customer name, account number and type of account. From this derive the classes cur-acct and sav-acct to make them more

specific to their requirements. Include necessary member functions in order to achieve the following tasks: i) Accept deposit from a customer and update the balance. ii) iii) iv) Display the balance. Compute and deposit interest. Permit withdrawal and update the balance. v) Check for the minimum balance, impose penalty, necessary, and update the balance. Do not use any constructor. Use member functions to initialize the class member. (2 + 2 + 5) + 6 11. a) What is a Monitor? How many treads at a time can access a monitor? b) Explain the difference between creating a thread by extending the Thread class and creating a thread by implementing the Runnable interface? c) Describe synchronization in respect to multithreading. Write a simple Java program which will synchronize between two threads. d) What are all the values for the max-priority, min-priority and non-priority level? 3 + 4 + (2 + 3) + 3 ==========