java lab

1
Lab VIII – Java MCA – IV Semester December 2012 – April 2013 Lab Exercises Task 1: (Week1: 10-12-2012 to 14-12-2012) Write the Java programming for the following. 1) To get input from the user. 2) Find the number of digits present in a number. 3) Sum of digits of a given number 4) Prime number checking 5) Palindrome checking of a number 6) Palindrome checking of a string Task 2: (Week2: 10-12-2012 to 14-12-2012) 7) Write a Java Program to get a number and check its validity using IsBinary(), IsDecimal(), IsOctal() and IsHexa(). Then convert the number into other forms and display the results. [Note: Create a separate Java class for implementing the above said number checking and conversion methods]. 8) Write a Java program to find the simple interest and compound interest of an amount for a given period and interest rate. Display the difference among them and find which one yields less interest. [Note: Write a separate Java class to find the interest amount] Develop Java programs for the following using Switch…case statement. 9) Do the basic arithmetic operations of a simple calculator by checking the type of operator. 10) Find the roots of a quadratic equation. 11) Write a Java program to remove the duplicate elements from the array without using an additional or temporary array. 12) Create a Java class for doing matrix operations like addition, subtraction, multiplication, inverse, determinant and transpose and check your answer by user input.

description

dfgdfg

Transcript of java lab

Page 1: java lab

�������������� ������������

Lab VIII – Java MCA – IV Semester

December 2012 – April 2013

Lab Exercises

Task 1: (Week1: 10-12-2012 to 14-12-2012) Write the Java programming for the following. 1) To get input from the user. 2) Find the number of digits present in a number. 3) Sum of digits of a given number 4) Prime number checking 5) Palindrome checking of a number 6) Palindrome checking of a string

Task 2: (Week2: 10-12-2012 to 14-12-2012)

7) Write a Java Program to get a number and check its validity using IsBinary(), IsDecimal(), IsOctal() and IsHexa(). Then convert the number into other forms and display the results. [Note: Create a separate Java class for implementing the above said number checking and conversion methods]. 8) Write a Java program to find the simple interest and compound interest of an amount for a given period and interest rate. Display the difference among them and find which one yields less interest. [Note: Write a separate Java class to find the interest amount] Develop Java programs for the following using Switch…case statement. 9) Do the basic arithmetic operations of a simple calculator by checking the type of operator. 10) Find the roots of a quadratic equation. 11) Write a Java program to remove the duplicate elements from the array without using an additional or temporary array. 12) Create a Java class for doing matrix operations like addition, subtraction, multiplication, inverse, determinant and transpose and check your answer by user input.