https://github.com/animesh-ghosh/java-work
Java lab work.
https://github.com/animesh-ghosh/java-work
java-8 lab-work
Last synced: about 2 months ago
JSON representation
Java lab work.
- Host: GitHub
- URL: https://github.com/animesh-ghosh/java-work
- Owner: Animesh-Ghosh
- Created: 2019-01-29T07:41:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T12:40:42.000Z (about 6 years ago)
- Last Synced: 2025-02-07T09:44:47.837Z (3 months ago)
- Topics: java-8, lab-work
- Language: Java
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java-Work
Java lab work. Listed below are the questions and their status (complete :white_check_mark: or incomplete :x:). As of right now the list is incomplete. Will keep on updating.**Questions:**
1. Write a program to compute the area and perimeter of a rectangle. :white_check_mark:
2. Write a program to compute the volume of a cone. :white_check_mark:
3. Write a program to compute the volume of a sphere. :white_check_mark:
4. Write a program to print odd numbers between 1 and 50. :white_check_mark:
5. Write a program to print times table of 5. :white_check_mark:
6. Write a program to compute the volume and total surface area of a cone. :white_check_mark:
7. Write a program to test the primality of a number. :white_check_mark:
8. Write a program to print times table of an input number. :white_check_mark:
9. Write a program to print the given pattern. :white_check_mark:
```
1 4 9 16
25 36 49
64 81
100
```
10. Write a program to print the given pattern based on input. :white_check_mark:
```
* * * * *
* * *
*
```
11. Write a program to print Armstrong number upto 1000. :white_check_mark:
12. Write a program to enter marks of five subjects and compute percentage. :white_check_mark:
13. Write a program to print month name for corresponding input month number. :white_check_mark:
14. Write a program to demonstrate use of ``break``. :white_check_mark:
15. Write a program to demonstrate use of ``continue``. :white_check_mark:
16. Write a program to demonstrate use of ``return``. :white_check_mark:
17. Write a program to check if input number is a palindrome. :white_check_mark:
18. Write a program to compute factorial of an input number. :white_check_mark:
19. Write a program to print input number of terms of Fibonacci series. :white_check_mark:
20. Write a program to enter marks of N students and compute sum and average of marks and to find the largest and smallest marks entered. :white_check_mark:
21. Write a program to input 10 numbers and sort them. :white_check_mark:
22. Write a program to input elements in array and search for presence of an element in that array. :white_check_mark:
23. Write a program to reverse an input array and display the original and the reversed array. :white_check_mark:
24. Write a program declaring a class Rectangle with data members length and breadth and member functions Input, Output and CalcArea. :white_check_mark:
25. Write a program to demonstrate garbage collector. :white_check_mark:
26. Write a program to demonstrate use of method overloading to calculate area of square, rectangle and triangle. :white_check_mark:
27. Write a program to demonstrate the use of static variable, static method and static block. :white_check_mark:
28. Write a program to demonstrate concept of ``this``. :white_check_mark:
29. Write a program to demonstrate single, multi-level and heirarchichal inheritance. :white_check_mark:
30. Write a program to use super() to invoke base class constructor. :white_check_mark:
31. Write a program to use use super to invoke base class overridden data member and member function. :white_check_mark:
32. Write a program to demonstrate run-time polymorphism. :white_check_mark:
33. Write a program to demonstrate the concept of aggregation. :white_check_mark:
34. Write a program to demonstrate the concept of abstract class with constructor and ``final`` method. :white_check_mark:
35. Write a program to demonstrate the concept of interface when two interfaces have unique methods and same members. :white_check_mark:
36. Write a program to demonstrate checked exception during file handling. :white_check_mark:
37. Write a program to demonstrate unchecked exception. :white_check_mark:
38. Write a program to demonstrate multiple catch statements. :white_check_mark:
39. Write a program to demonstrate nested try-catch block. :white_check_mark:
40. Write a program to demonstrate the concept of wrapper class. :white_check_mark:
41. Write a program to demonstrate the use of ``throw`` keyword. :white_check_mark:
42. Write a program to demonstrate exception propagation. :white_check_mark:
43. Write a program to demonstrate rethrowing an exception. :white_check_mark:
44. Write a program to demonstrate creation of a user-defined exception. :white_check_mark:
45. Write a program declaring a Java class called SavingsAccount with members ``accountNumber`` and ``Balance``. Provide member functions as ``depositAmount ()`` and ``withdrawAmount ()``. If user tries to withdraw an amount greater than their balance then throw a user-defined exception. :white_check_mark:
46. Write a program to demonstrate a single-threaded process. :white_check_mark:
47. Write a program to demonstrate creation of a single child thread. :white_check_mark:
48. Write a program to demonstrate creation of multiple child threads. :white_check_mark:
49. Write a program to demonstrate use of ``getId ()`` function. :white_check_mark:
50. Write a program creating 2 threads using Runnable interface. Print your name in ``run ()`` method of first class and "Hello Java" in ``run ()`` method of second thread. :white_check_mark:
51. Write a program to demonstrate use of ``super ()`` to give appropriate name to a thread. :white_check_mark:
52. Write a program to demonstrate use of ``isAlive ()`` method. :white_check_mark:
53. Write a program to demonstrate use of ``isAlive (n)`` method. :x:
54. Write a program to demonstrate use of ``join ()`` method. :white_check_mark:
55. Write a program to demonstrate use of ``setPriority ()`` method to set priority of a thread to 1, 10 and normal. :white_check_mark:
56. Write a program to demonstrate making a thread as Daemon. :white_check_mark:
57. Write a program to demonstrate use of synchronization. :white_check_mark:
58. Write a program to use Byte stream class to read form a text file and display the content on the output screen. :white_check_mark:
59. Write a program to use Byte stream class to read from a text file and copy the content to another text file. :white_check_mark:
60. Write a program to use Character stream class to read from a text file and display the content on the output screen. :white_check_mark:
61. Write a program to use Character stream class to read from a text file and copy the content to another text file. :white_check_mark:
62. Write a program to make use of BufferedReader to read characters from the keyboard until 'q' is pressed. :white_check_mark:
63. Write a program to make use of BufferedReader to read lines from the keyboard until 'STOP' is typed. :white_check_mark:
64. Write a program to create an applet and use ``param`` tag. :white_check_mark:
65. Write a program to create an applet and use ``setBackground ()`` and ``setForeground ()``. :white_check_mark:
66. Write a program to create an applet and use ``setColor ()``, ``drawString ()``, ``drawLine ()``, ``drawRect ()`` etc. :white_check_mark:
67. Write a program to create an applet to calculate the sum of two numbers. :white_check_mark:
68. Write a program to create an applet to handle mouse events. :white_check_mark:
69. Write a program to create an applet to handle keyboard events (characters to be displayed). :white_check_mark:
70. Write a program to create an applet to handle keyboard events (message for F1, F2, F3, F4, F5 to be displayed). :white_check_mark:
71. Write a program to demonstrate adapter class for mouse events. :white_check_mark:
72. Write a program to demonstrate adapter class as an inner class. :white_check_mark:
73. Write a program to demonstrate adapter class as an anonymous inner class. :white_check_mark:
74. Write a program to demonstrate working of Label control. :white_check_mark:
75. Write a program to demonstrate working of Button control. :x:
76. Write a program to demonstrate working of CheckBox control. :white_check_mark:
76. Write a program to demonstrate working of RadioButton control. :x: