AISHWARYA COLLEGE OF EDUCATION
BCA FINAL JAVA LAB ASSIGNMENT
Submission Date
Question 1 ---- 26/09/2014
Question 2 to 6 ---- 07/10/2014
Question 7 to 10 ----- 15/10/2014
Question 11 to 15 ---- 16/11/2014
Question 16 --- 17/12/2024
Q1. Write a java program to print the following pattern
* ***** *****
** **** * *
*** *** * *
**** ** * *
***** * *****
Q2. Admission to a professional course is subject to the following conditions:
(a) marks in Mathematics >= 60 (b) marks in Physics >=50 (c) marks in Chemistry
>=40 (d) Total in all 3 subjects >=200 (Or) Total in Maths & Physics>=150
Given the marks in the 3 subjects of n (user input) students, write a program to process the
applications to list the eligible candidates.
Q3. Write a Java program to check whether a number is palindrome or not.
Q4. Write a Java program to check whether a number is prime or not.
Q5. Write a Java program to convert a Decimal Number to Binary Number.
Q6. Write a Java program to implement stack using array.
Q7. Write a Java program to calculate Sum of two 2-dimensional arrays.
Q8. Write a Java program to find second highest element of an array.
Q9. Write a Java program to calculate the sum of the prime numbers in an array.
Q10. Write a Java program to find duplicate elements in a 1D array and find their frequency
of occurrence.
Q11. Write a program to define a class Employee to accept emp_id, emp _name,
basic_salary of 5 Employees from the user and perform the following task.
a. Calculate gross_Salary
b. To display the details of Employee based on user input emp_id.
Q12. Write a program that takes a value at the command line for which factorial is to be
computed. The program must convert the string to its integer equivalent. There are three
possible user input errors that can prevent the program from executing normally.
1. The first error is when the user provides no argument while executing the program
and an ArrayIndexOutOfBoundsException is raised. You must write a catch block for
this.
2. The second error is NumberFormatException that is raised in case the user provides
a non-integer (float double) value at the command line.
3. The third error is IllegalArgumentException. This needs to be thrown manually if
the value at the command line is 0.
13. Create an interface Sim that contains
a. calling()
b. sms()
a. create a class Bsnl and Airtel that implements Sim interface. This Sim is already working
in market.
b. Now you want the videoCalling fetures must be added. Write a program in java to add
videoCalling features without changing in existing Sim.
Q14. Write a program in JAVA to implement method overloading and method overriding.
Q15. Write a JAVA program to create a package that validates username and password
Q16. Write a java program to design Bank application.
a. Create user_Account (At least 5 user_account, Balance must be Rs. 1000)
b. Deposit amount
c. Withdraw amount(You must check balance)
d. Display details of user based on user_Account