Java lab work. Listed below are the questions and their status (complete ✅ or incomplete ❌). As of right now the list is incomplete. Will keep on updating.
Questions:
- Write a program to compute the area and perimeter of a rectangle. ✅
- Write a program to compute the volume of a cone. ✅
- Write a program to compute the volume of a sphere. ✅
- Write a program to print odd numbers between 1 and 50. ✅
- Write a program to print times table of 5. ✅
- Write a program to compute the volume and total surface area of a cone. ✅
- Write a program to test the primality of a number. ✅
- Write a program to print times table of an input number. ✅
- Write a program to print the given pattern. ✅
1 4 9 16 25 36 49 64 81 100
- Write a program to print the given pattern based on input. ✅
* * * * * * * * *
- Write a program to print Armstrong number upto 1000. ✅
- Write a program to enter marks of five subjects and compute percentage. ✅
- Write a program to print month name for corresponding input month number. ✅
- Write a program to demonstrate use of
break
. ✅ - Write a program to demonstrate use of
continue
. ✅ - Write a program to demonstrate use of
return
. ✅ - Write a program to check if input number is a palindrome. ✅
- Write a program to compute factorial of an input number. ✅
- Write a program to print input number of terms of Fibonacci series. ✅
- 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. ✅
- Write a program to input 10 numbers and sort them. ✅
- Write a program to input elements in array and search for presence of an element in that array. ✅
- Write a program to reverse an input array and display the original and the reversed array. ✅
- Write a program declaring a class Rectangle with data members length and breadth and member functions Input, Output and CalcArea. ✅
- Write a program to demonstrate garbage collector. ✅
- Write a program to demonstrate use of method overloading to calculate area of square, rectangle and triangle. ✅
- Write a program to demonstrate the use of static variable, static method and static block. ✅
- Write a program to demonstrate concept of
this
. ✅ - Write a program to demonstrate single, multi-level and heirarchichal inheritance. ✅
- Write a program to use super() to invoke base class constructor. ✅
- Write a program to use use super to invoke base class overridden data member and member function. ✅
- Write a program to demonstrate run-time polymorphism. ✅
- Write a program to demonstrate the concept of aggregation. ✅
- Write a program to demonstrate the concept of abstract class with constructor and
final
method. ✅ - Write a program to demonstrate the concept of interface when two interfaces have unique methods and same members. ✅
- Write a program to demonstrate checked exception during file handling. ✅
- Write a program to demonstrate unchecked exception. ✅
- Write a program to demonstrate multiple catch statements. ✅
- Write a program to demonstrate nested try-catch block. ✅
- Write a program to demonstrate the concept of wrapper class. ✅
- Write a program to demonstrate the use of
throw
keyword. ✅ - Write a program to demonstrate exception propagation. ✅
- Write a program to demonstrate rethrowing an exception. ✅
- Write a program to demonstrate creation of a user-defined exception. ✅
- Write a program declaring a Java class called SavingsAccount with members
accountNumber
andBalance
. Provide member functions asdepositAmount ()
andwithdrawAmount ()
. If user tries to withdraw an amount greater than their balance then throw a user-defined exception. ✅ - Write a program to demonstrate a single-threaded process. ✅
- Write a program to demonstrate creation of a single child thread. ✅
- Write a program to demonstrate creation of multiple child threads. ✅
- Write a program to demonstrate use of
getId ()
function. ✅ - Write a program creating 2 threads using Runnable interface. Print your name in
run ()
method of first class and "Hello Java" inrun ()
method of second thread. ✅ - Write a program to demonstrate use of
super ()
to give appropriate name to a thread. ✅ - Write a program to demonstrate use of
isAlive ()
method. ✅ - Write a program to demonstrate use of
isAlive (n)
method. ❌ - Write a program to demonstrate use of
join ()
method. ✅ - Write a program to demonstrate use of
setPriority ()
method to set priority of a thread to 1, 10 and normal. ✅ - Write a program to demonstrate making a thread as Daemon. ✅
- Write a program to demonstrate use of synchronization. ✅
- Write a program to use Byte stream class to read form a text file and display the content on the output screen. ✅
- Write a program to use Byte stream class to read from a text file and copy the content to another text file. ✅
- Write a program to use Character stream class to read from a text file and display the content on the output screen. ✅
- Write a program to use Character stream class to read from a text file and copy the content to another text file. ✅
- Write a program to make use of BufferedReader to read characters from the keyboard until 'q' is pressed. ✅
- Write a program to make use of BufferedReader to read lines from the keyboard until 'STOP' is typed. ✅
- Write a program to create an applet and use
param
tag. ✅ - Write a program to create an applet and use
setBackground ()
andsetForeground ()
. ✅ - Write a program to create an applet and use
setColor ()
,drawString ()
,drawLine ()
,drawRect ()
etc. ✅ - Write a program to create an applet to calculate the sum of two numbers. ✅
- Write a program to create an applet to handle mouse events. ✅
- Write a program to create an applet to handle keyboard events (characters to be displayed). ✅
- Write a program to create an applet to handle keyboard events (message for F1, F2, F3, F4, F5 to be displayed). ✅
- Write a program to demonstrate adapter class for mouse events. ✅
- Write a program to demonstrate adapter class as an inner class. ✅
- Write a program to demonstrate adapter class as an anonymous inner class. ✅
- Write a program to demonstrate working of Label control. ✅
- Write a program to demonstrate working of Button control. ❌
- Write a program to demonstrate working of CheckBox control. ✅
- Write a program to demonstrate working of RadioButton control. ❌