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

Objectorientedprogramming 2022

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)
31 views2 pages

Objectorientedprogramming 2022

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

Name of the Candidate: Reg. No.

:
21IT320
B.TECH. DEGREE– NOVEMBER 2022 –EXAMINATIONS
BRANCH: INFORMATION TECHNOLOGY
OBJECT ORIENTED PROGRAMMING
Duration : 3Hours Maximum: 100 Marks

Answer All Questions


PART – A (10 x 2 = 20) CO Marks
A1. Recall the syntax for defining an array. CO1 (2)
A2. Define encapsulation. CO2 (2)
A3. Name the two methods of implementing polymorphism in Java. CO2 (2)
A4. List any two built-in packages. CO3 (2)
A5. Recall the Exception clauses. CO3 (2)
A6. Describe briefly about multithreading. CO4 (2)
A7. List any two thread class methods. CO4 (2)
A8. Describe TreeSet class. CO5 (2)
A9. List the methods of KeyListener. CO6 (2)
A10. Recall the syntax for creating GridLayout. CO6 (2)
PART – B (2 x 10 = 20) CO Marks
B1. Give example code for demonstrating the inter-thread communication. CO4 (10)
B2. Explain about ActionListener interface with an example code. CO6 (10)
PART – C (4 x 15 = 60) CO Marks
C1. Get an array of city names from the user (2 marks). CO1 (15)
Perform the following operations:
a. List the city names starts with ‘S’ (3 marks)
b. Count the city name length greater than 8 characters (5 marks)
c. Find the cities who are having a letter ‘e’ more than once (5 marks)
[OR]
C2. Read Java source code file content (5 marks). CO1 (15)
Perform the following operations:
a. Count the conditional and looping keywords (5 marks)
b. Display the line of statements contain ‘print’ or ‘println’ methods (5 marks)

C3. Define a class Temperature with the method for converting temperature from CO2 (15)
Celsius to Fahrenheit (5 marks). Extend the class further as MoreTemperature
with the methods for converting temperature from Celsius to Kelvin and Celsius to
Rankine (5 marks). Create objects and access all the methods with user input (5
marks).
(Formula hint: °F = °C × 9/5 + 32, K = °C + 273.15, °R = °C × 9/5 + 491.67)
[OR]
C4. Define a class Memory with the methods for converting gigabytes into bytes, CO2 (15)
kilobytes, megabytes. (5 marks). Extend the class further as FileMemory with the
method for calculating the memory in bytes based on the total characters present
in the given text file without built-in functions. (5 marks). Create objects and
access all the methods with user inputs (5 marks).

C5. Define an interface NumConversion with methods such as decimal_to_octal() and CO3 (15)
decimal_to_hexa() (2 marks). Implement the interface in a class NumCalculation
along with get_input() and print_output() methods (8 marks). Create objects and
access all the methods with user inputs (5 marks).
Contd…………
[OR]
C6. Develop a book shop billing application with necessary data and methods (5 CO3 (15)
marks). Define WrongValueException and WrongDateException classes for
handling the input validation exceptions (5 marks). Create objects and access all
the methods with user input through the support of above exceptions (5 marks).

C7. Create an ArrayList with the Integer class objects from user input (5 marks). CO5 (15)
Perform the following operations using the above list:
a. Find the given number is present in the list or not (2 marks)
b. Count the palindrome numbers (2 marks)
c. Display the sum of all the numbers (2 marks)
d. Create two LinkedList for odd and even numbers separately (4 marks)
[OR]
C8. Consider an entry note application of a fun mall. Each guest needs to enter their CO5 (15)
details in the application before entering into the mall. Define a class Entry with
necessary data and methods (5 marks). Maintain INFO level logs in file for each
entry (5 marks). Write code for reading the log file to display the entry count in
each day of the week (5 marks).
***************

You might also like