INSTITUTE OF COMPUTER TECHNOLOGY & BUSINESS MANAGEMENT, MAHARISHI MARKANDESHWAR UNIVERSITY, MULLANA (AMBALA)
Class- MCA 4th Semester Subject Code: MCA-406 Session- 2011-12 Subject Title: S/W Lab - VII, JAVA (Based on MCA - 401)
[Command-Line-Arguments]
[1] Write a program to pass Starting and Ending limit and print all prime numbers and Fibonacci numbers between this range. Define a class to represent an Employee, include the following members: Data Members: y employee_code, emp_name, department, designation, basic_salary, hra, da, pf, tax, net_salary Member Functions y To get new employee information y To calculate HRA, DA, PF, TAX & net_salary y To display the information of employee. Write a main program to test the class Write a program to calculate Compound Interest using Wrapper Class Methods.
[3]
[7]
[9]
time. The name of the thread should be hard coded through constructor the sleep time of thread will be a random integer in the range 0 to 4999. Write a program that prompts the user to enter a number to use as an array size, and then attempt to declare an array using the entered size. If the array is created successfully, display an appropriate message. Java generates a NegativeArraySizeException if you attempt to create an array with a negative size, and a NumberFormatException if you attempt to create an array using a non-numeric value for the size. Use a catch block that executes if the array size is non-numeric or negative, displaying a message that indicates the array was not created. Write an applet code for bouncing a ball. Write a program to design an applet which receive Student Roll no., name and marks of three subjects through HTML page using PARAM tag and print the student name, roll no. and result on the web page using Java Applet. Write a program that display a movable yellow smiling face on the screen.
[12]
[File Handling]
[13] Write a program to copy the contents of one file (source) to another file (target). [14] Define a class named Telephone Directory with Data members: mobile_no, name of person Write an interactive, menu driven program that will access the file named Telephone.dat and implement the following tasks (using member functions): y To get the mobile no. and name of person. y Determine the mobile number of the specified person. y Determine the name if a mobile number is known y Update the mobile no., whenever there is a change
[Network Programming]
[17] Design a User Datagram Protocol based Client-server application using DatagramSocket and Datagram Packet class. [18] Design a TCP based Client-Server application using Socket and ServerSocket class.