Assignment 2
Java Networking
3 marks
● What is Java Networking, and how does it support communication between
systems?
● What is DNS (Domain Name System), and how does Java resolve domain
names to IP addresses?
● Explain the differences between TCP and UDP protocols.
5 marks
● What is a socket in Java? How does it facilitate network communication?
● Explain how to download a file from a given URL in Java.
● Explain the role of input and output streams in Java socket programming.
● How do you establish a simple client-server application using Java Sockets?
(program)
● What is the role of the InetAddress class in Java networking? Explain with a
program.
10 marks
Could you design a web-based application using Java sockets?
Java Swings
3 marks
● What is Java Swing? How does it differ from AWT?
● What are the major Swing components? Explain their purpose.
● What is JFrame? How is it different from JPanel?
● How does JDialog differ from JFrame?
5 marks
● What is Layout Manager in Swing? Explain different types of layouts
(Explain any three).
● How does event handling work in Swing? Explain the use of ActionListener.
● What is JTree, and how is it used in Java Swing applications?
10 marks
Could you integrate Swing with databases (JDBC) to fetch and display data?
Instructions for Assignment Submission
rd
1. To be submitted on or before 3 February 2025, 10:50 am
2. To be hand-written only
3. Submit individually
4. Please DO NOT copy. Study and write