Monday, April 27, 2020

CBCS JAVA PRACTICAL ASSIGNMENT

1. To find the sum of any number of integers entered as command line arguments

2. To find the factorial of a given number

3. To learn use of single dimensional array by defining the array dynamically.

4. To learn use of .lenth in case of a two dimensional array

5. To convert a decimal to binary number

6. To check if a number is prime or not, by taking the number as input from the keyboard

7. To find the sum of any number of integers interactively, i.e., entering every number from the keyboard, whereas the total number of integers is given as a command line argument

8. Write a program that show working of different functions of String and StringBufferclasss like setCharAt(, setLength(), append(), insert(), concat()and equals().

9. Write a program to create a ―distance‖ class with methods where distance is computed in terms of feet and inches, how to create objects of a class and to see the use of this pointer. CLICK HERE

10. Modify the ―distance‖ class by creating constructor for assigning values (feet and inches) to the distance object. Create another object and assign second object as reference variable to another object reference variable. Further create a third object which is a clone of the first object. CLICK HERE

11. Write a program to show that during function overloading, if no matching argument is found, then java will apply automatic type conversions(from lower to higher data type) . CLICK HERE

12. Write a program to show the difference between public and private access specifiers. The program should also show that primitive data types are passed by value and objects are passed by reference and to learn use of final keyword.

13. Write a program to show the use of static functions and to pass variable length arguments in a function. CLICK HERE

14. Write a program to demonstrate the concept of boxing and unboxing. CLICK HERE

 15. Create a multi-file program where in one file a string message is taken as input from the user and the function to display the message on the screen is given in another file (make use of Scanner package in this program).

16. Write a program to create a multilevel package and also creates a reusable class to generate Fibonacci series, where the function to generate fibonacii series is given in a different file belonging to the same package.

17. Write a program that creates illustrates different levels of protection in classes/subclasses belonging to same package or different packages.

18. Write a program ―DivideByZero‖ that takes two numbers a and b as input, computes a/b, and invokes Arithmetic Exception to generate a message when the denominator is zero. click here

19. Write a program to show the use of nested try statements that emphasizes the sequence of checking for catch handler statements.  click here

20. Write a program to create your own exception types to handle situation specific to your application (Hint: Define a subclass of Exception which itself is a subclass of Throwable). click here

21. Write a program to demonstrate priorities among multiple threads.

22. Write a program to demonstrate multithread communication by implementing synchronization among threads (Hint: you can implement a simple producer and consumer problem).

23. Write a program to create URL object, create a URLConnection using the openConnection() method and then use it examine the different components of the URLand content.

 24. Write a program to implement a simple datagram client and server in which a message that is typed into the server window is sent to the client side where it is displayed.

25. Write a program that creates a Banner and then creates a thread to scrolls the message in the banner from left to right across the applet‘s window. CLICK HERE

26. Write a program to get the URL/location of code (i.e. java code) and document(i.e. html file).- CLICK HERE

27. Write a program to demonstrate different mouse handling events like mouseClicked(), mouseEntered(), mouseExited(), mousePressed, mouseReleased() and mouseDragged(). CLICK HERE

28. Write a program to demonstrate different keyboard handling events. CLICK HERE

29. Write a program to generate a window without an applet window using main() function.

30. Write a program to demonstrate the use of push buttons.

No comments:

Post a Comment