E7797java and Unix Programming Lab
E7797java and Unix Programming Lab
Course Code:
PART-I
BCA 520
Credit Units: 02
24. Write applets to draw the following shapes: (i) Cone (ii) Cylinder (iii) Cube (iv) Square inside a circle (v) Circle inside a square 25. Write an applet to display the following figure: 26. Write an applet to display a face. 27. Write an applet to display five buttons. 28. Write an applet to illustrate BorderLayout. 29. Write a Java program to create 5 threads by extending Thread class. 30. Write a Java program to create 5 threads by implementing Runnable interface. PART-II
20. Write a shell script which reports names and sizes of all files in a directory (directory would be supplied as an argument to the shell script) whose size is exceeding 1000 bytes. The filenames should be printed in descending order of their sizes. The total number of such files should also be reported. 21. WASS for renaming each file in the directory such that it will have the current shell PID as an extension. The shell script should ensure that the directories do not get renamed. 22. WAP to calculate and print the first m Fibonacci numbers. 23. WASS that will receive any number of filenames as arguments. The shell script should check whether such files already exist. If they do, then it should be reported. The files that do not exist should be created in a sub-directory called mydir. The shell script should first check whether the sub-directory mydir exists in the current directory. If it doesnt exist, then it should be created. If mydir already exists, then it should be reported along with the number of files that are currently present in mydir. 24. A shell script receives even number of filenames. Suppose four filenames are supplied, then the first file should get copied into second file, the third file should get copied into fourth and so on. If odd number of filenames is supplied then no copying should take place and an error message should be displayed. 25. WASS to identify all zero-byte files in the current directory and delete them. Before proceeding with deletion, the shell script should get a conformation from the user. 26. WASS to compute the GCD and LCM of two numbers. 27. Two numbers are entered through the keyboard. WAP to find the value of one number raised to the power of another. 28. WASS that prompts the user for the password. The user has maximum of 3 attempts. If the user enters the correct password, the message Correct Password is displayed else the message Wrong Password. 29. WASS that repeatedly asks the user repeatedly for the Name of the Institution until the user gives the correct answer. 30. WAP to generate all combinations of 1, 2 and 3 using for loop.
Examination Scheme:
Components Weightage (%) CT1 10 PR 15 Attd 5 EE 70