Tribhuvan University
Faculty of Humanities & Social Sciences
OFFICE OF THE DEAN
2025
Bachelor in Computer Applications
| Paper detail | Value |
|---|---|
| Course | Network Programming |
| Code No. | CACS355 |
| Semester | VIth |
| Full marks | 60 |
| Pass marks | 24 |
| Time | 3 hours |
Candidates are required to answer the questions in their own words as far as possible.
Group B
Attempt any SIX questions. [6x5=30]
2. Elaborate on the scope and applications of Java Sockets and Node.js within network programming platforms. [5]
3. Explain the purpose of the NetworkInterface class, detailing its factory and getter methods with appropriate examples. [2.5+2.5]
4. Describe the procedure for establishing a URL connection and retrieving data from a server in Java. [5]
5. Write a program to transmit and receive a message using Connectionless Sockets. [5]
6. What are the core components of JAVA NIO? Differentiate between Blocking and Non-blocking I/O. [2+3]
7. Explain the architecture of RMI along with its detailed role. [5]
8. Write short notes on (Any two): [2.5+2.5]
a) ProxySelector b) JSSE c) Web Cache
Group C
Attempt any TWO questions. [2 x 10 = 20]
9. a) What is a Cookie? Explain the CookieManager and HttpCookie classes. [5]
b) Discuss the purpose and usage of HTTP response codes in URL connections. Provide examples of typical response codes. [1+4]
10. Explain how a TCP echo server is implemented using threads created with snippet code, along with its advantages. [7+3]
11. What is Traceroute? Outline its underlying working mechanism and explain the Trace Route program using sample code. [2+3+5]
Bachelor in Computer Applications Course Title: Network Programming Code No: CACS 355 Semester: VI Full Marks: 60 Pass Marks: 24 Time: 3 hours Candidates are required to answer the questions in their own words as far as possible.
Group B
Attempt any SIX questions. [6x5=30]
12. Describe the process of reading the Header using a URL Connection. [5]
13. Explain X-www-form URI Encoder and URI Decoder using examples. [2.5+2.5]
14. What is the significance of managing HTTP Keep-Alive system properties? Write a program for a cookie policy that blocks all .gov cookies while permitting others. [2+3]
15. What is the Java Secure Sockets Extension? Write a program to create secure sockets with tufoshss.edu.np. [2+3]
16. Explain the central abstractions of Java NIO. [5]
17. Describe the UDP Socket Option and write a program to scan local UDP ports ranging from 1024 upwards. [2.5+2.5]
18. Define Multicast Group and briefly explain how working with Multicast Sockets functions. [2+3]
Group C
Attempt any TWO questions. [2 x 10 = 20]
19. Explain factory methods with an example. Write a program to download a webpage. [5+5]
20. What are the key distinctions between a Socket and a ServerSocket? Develop a simple console chat application leveraging a TCP socket. [3+7]
21. a) Write a program to compute the area of a triangle using RMI. [6]
b) Write a program to list all available interfaces. [4] Subject: Network Programming 2019 Batch
Group B
Attempt any SIX questions.
22. Define the client-server architecture in network applications. Explain the design considerations for network applications.
23. Write a program to display the IP and MAC addresses of a system, verifying whether the IP address is IPv4 or IPv6.
24. Define the URL Connection Class. Write a program to retrieve headers using header-specific methods.
25. Detail the functions of a Socket. Explain the configuration options available for a TCP client socket.
26. Define a secure socket. Write a program to instantiate a secure client socket.
27. Define a Buffer. Explain buffer management methods.
28. Write short notes on (Any two):
a) HTTP methods b) Datagram Packet c) Multicast Socket
Group C
Attempt any TWO questions.
29. a) Differentiate between URL and URI classes along with their use cases.
b) Write a program demonstrating the application of RMI.
30. Write a multithreaded TCP server and client socket program where the server determines whether a number sent by the client is prime or composite.
31. Write a program to implement a UDP Server and client that translates dates received from the client in BS format into AD format. (Assume the difference between BS and AD is 56 years, 08 months, 17 days)
Subject: Network Programming 2018 Batch
Group B
Attempt any SIX questions.
32. What is the Client-Server software model? Discuss the benefits and drawbacks of Java as a network programming language.
33. What is the purpose of the InetAddress class? Write a program to retrieve IP and MAC addresses.
34. Define the URL class. Write a program illustrating the components of a URL (URL Splitting).
35. Define Socket. Differentiate between TCP and UDP Sockets along with their respective applications.
36. Define cookies. Write a program to fetch cookie data stored within the system.
37. Define IP Multicast. Write a program to connect a computer system to a multicast group.
38. Write Short Notes on (Any Two):
a) HTTP b) RMI c) Secure Socket
Group C
Attempt any TWO questions.
39. Write multithreaded TCP client and server socket programs for a daytime service.
40. Write UDP client and server socket programs where the server identifies whether an incoming number from a client is even or odd, responding to the client accordingly.
41. How does blocking I/O differ from non-blocking I/O? Explain the fundamental mechanism for handling Buffers and Channels in Java using an example.
Subject: Network Programming 2017 Batch
Group B
Attempt any SIX questions.
42. Define the Client-Server software model. Explain the features of Java as a network programming language.
43. What is the function of the NetworkInterface Class? Explain the core features of the NetworkInterface class.
44. Explain HTTP methods with an example.
45. Write a program to display socket information (address, port, local address, local port).
46. Write a server-side program for a daytime service using sockets.
47. Define Non-blocking I/O. Differentiate between blocking and non-blocking socket communication in Java.
48. Write Short Notes on (Any Two):
a) Secure Communication b) Multicast Sockets c) RMI Server
Group C
Attempt any TWO questions.
49. What is the process for creating and connecting Server Sockets? Explain Server Socket options with an example.
50. Write a program to execute basic two-way communication between a client and a server.
51. What are the features of the DatagramPacket and DatagramSocket Classes? Write a program to implement a basic UDP client.