0% found this document useful (0 votes)
24 views3 pages

OOT

KTU 2019 Scheme OOT question paper

Uploaded by

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

OOT

KTU 2019 Scheme OOT question paper

Uploaded by

as2001win
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
Name: APJ ABDUL KALAM TECHNOLOGICAL, UNIVERSITY Fourth Semester B.Tech Degree Examination June 2022 (2019 scheme) Keg NO. = 4 i 2 & : c £ Abts ae Course Code: 1TT202 + Course Name: PRINCIPLES OF OBJECT ORIENTED TECHNIQUES Max. Marks: 100 Duration: 3 Hours PARTA (Answer all questions; each question carries 3 marks) Marks, Vv Differentiate between Object Oriented Programming and Procedural Oriented (3) Programming 2 Why is the main method in java qualified as public, static, and void? @) 3 What are the ways of argument passing in Java programming? Explain. By 4 What is parameterized constructor? Is it possible to create an object for a class (3) A using, A ob = new AQ); if the class contains only parameterized constructor? Justify. 3 Describe the uses of super keyword in Java. 6) v Discuss about the three access specifiers using in Java, @) Ll Explain the scenario under which the following three exceptions occur, 3) ArrayIndexOutOfBoundsException, ArithmeticException, and InterruptedException 8 What are thread priorities? How do you assign and obtain priority values of . threads in Java? 2 What are the advantages of Swing? @) 10/ Explain the various methods in the Applet Skeleton. @) / PART B (Answer one full question from each module, each question carries 14 marks) Module 1 Uy mM 4) Explain any six characteristics of Object-Oriented Programming ©) b) IMlustrate with an example how encapsulation feature is implemented ina java (5) / program? dk 4) Describe the control statem@nts in Java with syntax ” ) bY Create 4 class ‘Distance’ with data members feet and inches, It contains a zero Page 1 of 3 13 a) by ws b) 15 a) b) 16- a) b) 020001TT202052106 parameter constructor and a two-parameter constructor, It also contains three finctions: setDistance(), showDistance() and convertDistance(). The convertDistance() function converts the distance in fect and inches to centimetres, Write the Java program to implement the scenario, Use this keyword in the constructors. [1 foot = 12 inches, 1 inch = 2.54 ems] Module-2. -\”’ Define a class Stack for representing a stack data structure, The class must define a default constructor, a parameterized constructor and functions for push, pop and display operations. Write a Java program to implement the stack What is meant by Nested class? Write a java program in which a nested class is defined within the body of a for loop. What is the scope of the above nested class? Write a Java program to calculate the volume of different shapes namely cylinder, cube and rectangular prism using the concept of Method Overloading. How do we create a class member which can be accessed without creating any objects of the class? Explain with example. Modute-3 ~~ Illustrate with an example, how a class in Java can be prevented from getting overridden and inherited? Develop a java package named PrimePackage, with a class Prime containing a static method to check whether a number is a prime or not and retums that information. Import this package in another class and use to check a number is prime or not. Compare and contrast the usage of abstract class and interface in Java, Give examples of each, Consider a scenario where there are two classes: *BaseClass’ and “DerivedClass’, . such that ‘DerivedClass’ is inherited from “BaseClass’, Both class contains one instance variable and a funetion ‘public void show()’ for displaying the values of the variables, Explain Method Overriding by implementing the scenario and state why this scenario is known as run time polymorphism? Page 2 of 3 Mm mM (8) (6) 6) @) [heen Wk chats Cine ie yo 4 1020001TT 202052106 Gaye us um 4 Z Module-4 *" 1 17g)“ How can we handle multiple exceptions tnised by a single piece of cole? (8) xplain with example. 6 Write a Java program to display all the positive integers fess than or equal to (9) 100 which are divisible by 2 and 3, by creating two threads. Create first thread for displaying the positive integers divisible by two, using Runnable interface. Create second thread for displaying the positive integers divisible by three, using Thread class, Ensure that the main thread finishes as the fast thread using : join() function. 18 a) Illustrate and explain the two ways of synchronizing your code in Java. (8) b) Create a user defined Exception ‘InvalidinputException’. Write a Java program (6) to find the average of the 5 integers given as Command Line Arguments. Raise the Exception InvalidinputException’ on reading invalid number of inputs. [ie no: of inputs #5] Modules - '\1 19 a) Write an Applet program to read two strings and display the concatenated (8) string, using event handling mechanism. b) List and explain any four AWT controls © 20 .a) List any four event sources and their corresponding event types and listeners (6) y) oa UML Class Diagram. Represent the following class diagram as a java (8) class. aa rtlon § ae ak a pane sea ie volt sol slow 0 enor Page 3 of 3

You might also like