Question Paper Code : 20867
B.E./B.Tech. DEGREE EXAMINATIONS, NOVEMBER/DECEMBER 2023.
Third/Fourth Semester
Computer Science and Engineering
CS 3391 — OBJECT ORIENTED PROGRAMMING
(Common to : Biomedical Engineering/Computer Science and Design/Computer Science and Engineering (Artificial Intelligence and Machine Learning)/Computer Science and Engineering (Cyber Security)/Computer and Communication Engineering/Medical Electronics/Computer Science and Business Systems/Information Technology)
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
What is an array? How multidimensional arrays are implemented in Java?
- 2.
Name the access modifiers in Java.
- 3.
Define inheritance.
- 4.
How can a subclass can call a constructor defined by its superclass?
- 5.
Outline the difference between unchecked exceptions and checked exceptions.
- 6.
Name the methods used by Java for interprocess communication to avoid polling.
- 7.
What are streams?
- 8.
Why parameterized types are important?
- 9.
What is JavaFX?
- 10.
Write a note on HBox and VBox.
PART B — (5 × 13 = 65 marks)
- 11.(a)
- (i)List the symbols that are used as separators in Java and present an outline of the same.(7)
- (ii)Outline the primitive types of data in Java.(6)
- Or
- (b)
- (i)Outline the bitwise operators in Java that can be applied to the integer type.(7)
- (ii)Outline while and do-while iteration statements in Java with its general form.(6)
- 12.(a)
Outline method overloading and method overriding in Java with code fragments.
- Or
- (b)
What is an interface? How to define an interface? How one or more classes can implement an interface? Outline with code fragments.
- 13.(a)
- (i)What is a Java exception? How Java exception handling is managed? Outline.(7)
- (ii)Outline Java's checked exceptions defined a java.lang package.(6)
- Or
- (b)
Present an outline of Java's multithreading system. Also outline the two ways to create a thread.
- 14.(a)
- (i)Outline reading console input and writing console output in Java.(8)
- (ii)Present an outline of FileInputStream and FileOutputStream classes.(5)
- Or
- (b)
What is StringBuffer? Name and outline the constructors defined by StringBuffer with code fragments.
- 15.(a)
What is a button? Name and outline the types of buttons JavaFX provides with visual representations.
- Or
- (b)
Name and outline the types of panes JavaFX provides for organizing nodes in a container.
PART C — (1 × 15 = 15 marks)
- 16.(a)
Write a Java program to accept 'n' names, store it in an array, sort the names in alphabetic order and display the result. Use classes and methods.
- Or
- (b)
Write a Java program to accept two square matrices, store them in an array, add the matrices and display the result. Use classes and methods.