Skip to content
IT-504 (C) · Java Programming/Unsolved PYQ Paper

IT-504-C Java Programming - Nov 2022 Question Paper

Under each question, How to answer lists the points an answer should cover, outlined by CampusPrep from the syllabus. Check the details against your textbook.

  1. 7 Marks
    a"Java is object-oriented language". Give reasons to supporting the given argument.
    How to answer
    • Define object-oriented programming features
    • Show Java supports encapsulation, inheritance, polymorphism, abstraction
    • Explain classes, objects, data hiding in Java
    • Conclude with reasons why Java is called purely object-oriented with exceptions
  2. 7 Marks
    bHow to create a package in Java? Explain with an example.
    How to answer
    • Define Java package and its purpose
    • Steps to create package using package statement
    • Compilation and directory structure
    • Example of creating and importing package
  3. 7 Marks
    aExplain in brief about event sources and event listeners.
    How to answer
    • Define event, event source and event listener
    • List common event sources e.g. Button, Checkbox
    • Explain listener interfaces and registration
    • Brief event handling flow with example
  4. 7 Marks
    bExplain the implementation process of multiple inheritance in Java.
    How to answer
    • State Java does not support multiple inheritance via classes
    • Explain use of interfaces to achieve it
    • Steps to implement multiple interfaces
    • Example program with two interfaces
  5. 7 Marks
    aExplain Exception-handling in Java with the suitable example.
    How to answer
    • Define exception and exception hierarchy
    • Explain try, catch, finally, throw, throws
    • Provide suitable example program
    • Explain unchecked vs checked exceptions
  6. 7 Marks
    bExplain about AWT facilities of Java.
    How to answer
    • Define AWT and its role in GUI
    • List AWT components: Frame, Button, TextField etc.
    • Explain containers, layout managers
    • Mention event handling with AWT
  7. 7 Marks
    aWhat are the basic steps for using JDBC to access database? Explain briefly with syntax.
    How to answer
    • List basic JDBC steps: load driver, connect, statement, execute, close
    • Give syntax for each step with DriverManager
    • Brief explanation of ResultSet and Statement types
    • Example code snippet
  8. 7 Marks
    bExplain the term "try", "catch", "throw" and "assertions" with examples.
    How to answer
    • Define try, catch, throw and assertions
    • Explain syntax and purpose of each
    • Give small example for each
    • Differentiate throw vs throws and assertion use
  9. 7 Marks
    aWrite a Java program to illustrate communication between client and server.
    How to answer
    • Explain Socket and ServerSocket classes
    • Write server program accepting client
    • Write client program sending/receiving data
    • Show output of communication
  10. 7 Marks
    bExplain thread synchronization with an example program.
    How to answer
    • Define synchronization and need in multithreading
    • Explain synchronized method and block
    • Provide example program with shared resource
    • Explain output without vs with synchronization
  11. 7 Marks
    aExplain the life cycle of Applet.
    How to answer
    • Define applet and its lifecycle stages
    • Explain init, start, stop, destroy, paint methods
    • Draw lifecycle diagram
    • Explain sequence with example
  12. 7 Marks
    bWrite a java program to demonstrate multithreading operation.
    How to answer
    • Explain Thread class and Runnable interface
    • Write program creating multiple threads
    • Show start, run, sleep/join methods
    • Show output demonstrating concurrency
  13. 7 Marks
    aWrite a program to copy content of one file to another using character stream class.
    How to answer
    • Explain FileReader and FileWriter character streams
    • Steps to open, read, write and close files
    • Write complete Java program for file copy
    • Handle IOException with try-catch
  14. 7 Marks
    bDiscuss various levels of access protection available for packages and their Implementations.
    How to answer
    • Define private, default, protected, public levels
    • Explain visibility for packages and subclasses
    • Explain implementation with example
    • Summarize access table
  15. 7 Marks
    aWhat is a Stream? What is the difference between byte streams and character streams? How are they used to capture input from the user?
    How to answer
    • Define stream as flow of data
    • Differentiate byte streams vs character streams
    • List classes: InputStream/OutputStream vs Reader/Writer
    • Explain capturing user input with System.in and BufferedReader/Scanner
  16. 7 Marks
    bExplain any two of the following:
    1. i)Copy Constructor
    2. ii)JDBC-ODBC Bridge
    3. iii)Abstract Class
    4. iv)Interface
    How to answer
    • Select any two topics from the list
    • Define each with syntax and purpose
    • Give example program/snippet
    • Mention use cases
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in