Program List for Java Practical File

Lab 1          (Java 8 API Documentation)
  1. Input two numbers from User and print their sum.
  2. Input a number from user and check if palindrome is possible by shuffling digits of the number print yes or No as output.
  3. Input two numbers from user loweLimit and upperLimit and print numbers within the range that have digits in strict increasing order.
  4. Generate three random numbers up to 100 and print the largest of them.
  5. Generate a random number up to 100 and print whether it is prime or not.
  6. Write a program to generate first 10 terms of Fibonacci series.
  7. Create java application for Lucky 7 Game.
Lab 2
  1. Find the factorial of a given number using Recursion.
  2. Find the average and sum of array of N numbers entered by user.
  3. Create a class to find out the Area and perimeter of rectangle. 
  4. Write a class that perform String operations(Equal,Reverse the string,change case).
  5. Given an integer array, find the number of decreasing sequences in the array and the length of its longest decreasing sequence.
  6. Write a program for sorting integer array using selection sort.
  7. Demonstrate the use of final keyword with data member, function and class.
Lab 3
  1. Demonstrate the use of keywords try, catch, finally, throw and throws.
  2. Write a program to demonstrate Multi-threading using Thread Class.
  3. Write a program to demonstrate Multi-threading using Runnable Interface.
  4. Write a program to demonstrate use of synchronized block over multi-threading.
  5. Write a program to demonstrate use of synchronized method over multi-threading.
  6. Write a program to demonstrate static synchronization over multi-threading.
  7. Write a program to create game "Tic Tac Toe".
Lab 4
  1. Write a program to basic calculator using Applet and Event Handling.
  2. Create graphical Lucky 7 Game using Applet and Event Handling.
  3. Create "Tic Tac Toe" game using Applet and Event Handling.
  4. Write a program to input a number from user and determine the number of digits and print all numbers unto the number entered by user(having digits in strict increasing order) having same number or digits. Example if user enters 125 the only answer is 123, 124. 
Lab 5
  1. Write a program to create an applet with moving banner.
  2. Create an application using either applet or form for game 2048.
  3. Write a application similar to Notepad having features like open, save, copy, cut, paste.
  4. Write a program to read a text file and after printing that on scree write the content to another text file.
  5. Write a program to  count number of words,characters, vowels in a text file.
Lab 6
  1. Write a program to create simple chat application using TCP based Socket Programming.
  2. Write a program to create simple chat application using UDP based Socket Programming.
  3. Write a program to connect to access database and display contents of the table.

Additional Lab Session - 7

Task 1 - nth FIBONACCI

     INPUT:4       OUTPUT: 2        Hint (0,1,1,2)

Task 2 - Create PIN from three integer  input values


-- example-1      
input1=123  
input2=582
input3=175
then PIN=8122

-- example-2
input1=190
input2=267
input3=853
then PIN=9150

--PIN should be 4 digit
units digit=least of units position of three input numbers
tens digit=least of tens position of three input numbers
hundreds digit=least of hundreds position of three input numbers
thousands digit=maximum of all the digits in three input numbers.


Task 3 - Return second word in Uppercase


Input String - "wipro technologies bangalore"
output : TECHNOLOGIES


Task 4 - Is Palindrome (string) 

Madam, madam,madaM, all are palindromes
    if palindrome return 2
    else return 1

Task 5 - weight of string 

if input2 is 0 we have to neglect vowels and find weight of input1
if input2 is 1 we have to consider all the alphabets of input1

ex-
input1=wipro
input2=0
sum=23+16+18=57

input1=wipro
input2=1
sum=23+9+16+18+15=81


Task 6 - Most Frequent Digit 

input1=123
input2=223
input3=412
input4=498

1 occurs 2 times
2 occurs 4 times
3 occurs 2 times
4 occurs 2 times
8 occurs 1time
9 occurs 1 time

-- so output should be 2 as it occurs maximum number of times
-- if 2 digits are occuring same number of times then the maximum number
should be the answer.


Task 7 - FindStringCode 

Example -  Input String
world wide web
world=[23-4]+[15-12]+18=19+3+18=40
wide=[23-5]+[9-4]=18+5=23
web=26

output 402326



No comments:

Post a Comment