BCSL-043 Java Lab| Solved Question Papers


These questions are collected from previous years term end exam papers conducted by IGNOU. The questions are arranged according to topic covered in BCSL-043 subject. Try to solve these questions yourself then read the solutions presented here.

1. Write a Java program to create student class. Define proper constructor to initialize student class object. Define methods to get details of any student (the details may include student name, address, program of study, age). You need to take care of exceptions handling in this program. [June 2013]

2. Write a Java program which take two strings as input and do the following : (i) Find the length of the strings. (ii) Print the Initial characters of the words in string one (If string is Ajay Kumar ; print AK). (iii) Concatenate string one to string two. (iv) Reverse the string obtained at point (iii) above [Dec 2014 S1]

3. Write a Java program to create an Account class. Define proper constructor(s) for this class. Define methods to calculate Simple interest and Compound interest on the amount deposited in the account. Make necessary assumptions, wherever required.[Dec 2014 S2]

4. Write a Java program to find S [i] = A [i] + B [i] ; where S, A and B are arrays of integers. Your program should have provision for exceptions handling. Define proper class(es) and method(s) in your program.[Dec 2014 S3]

5. Write a Java program to create an Applet which takes temperature in Celsius and converts it into Fahrenheit (The formula for Celsius to Fahrenheit conversion is 5 * C = 9 * (F — 32), where C is Celsius temperature and F is Fahrenheit temperature. .[Dec 2014 S4]

6. Write a Java program to perform the following on any given string : (i) To find its length (ii) To convert it to upper case (iii) To check whether it is a palindrome or not [June 2015 S1]

7. Write a Java program to create an applet to find the sum of three numbers. Use proper GUI components and layout in your program. [June 2015 S2]

8. Write a Java program to create two threads named MyThread and YourThread. Both the threads need to print numbers from 1 to 10. (i) Compile and run the program with both the threads having default thread priority. (ii) Assign thread priority 6 to MyThread and thread priority 7 to YourThread, then compile and run the program. [June 2015 S3]

9. Write a Java program to create Account class. Derive Saving_Account and Current__Account classes from Account class. Define proper constructor for each of the classes. Define methods to display account details of each account type; using method overriding. Use appropriate data members and access specifiers in your program. [June 2015 S4]

10. Write a Java program to create Player class. Derive Cricket_Player and Football_Player classes from Player class. Define proper constructor for all the classes. Also define Display_Info method in all the three classes to display details of the players. [Dec 2015 S1]

11. Write a Java program to add two matrices, with proper implementation of exception handling mechanism. [Dec 2015 S2]

12. Write a Java program to create Complex_Number class and create objects of complex numbers. Define proper constructor for this class. Define the method to find the sum of two complex numbers and display the sum. [Dec 2015 S3]

13. Write a Java program to create an applet to draw a circle. Set background color of the circle as red. Also write your name and roll number below the circle. [Dec 2015 S4]

14. Write a Java program to create an account class. Define appropriate constructor for this class. Define and implement method to display account balance and withdraw money. Show appropriate message if there is an attempt to withdraw money which may lead to account balance, less than minimum amount required in account. Make necessary assumptions required. [Dec 2016 S1]

15. Write a Java program to find the average marks of 20 students in class for BCSL-043 assignments. Make necessary provision for exceptions handling in your program. [Dec 2016 S2]

16. Write a Java program to generate Fibonacci series. The starting number for the series should be 0. Define proper class, constructor and method(s) in your program. [Dec 2016 S3]

17. Write a Java program to create an applet to generate table of a given number between 1 to 20. If number is out of this range ask for new input for the number. [Dec 2016 S4]