Java Tasks

From Aug 3, 2024 to Sep 15, 2024

Task 1

WAP to find area and perimeter of Rectangle

View Code & Output

Task 2

WAP to take number of days as input and compute years. weeks and days.
Input : 375
Output : 1 year 1 week 3 days
avoid leap year.

View Code & Output

Task 3

WAP to take a number as input. Now check given number is positive or negative or zero

View Code & Output

Task 4

WAP to take a number as input. Now check given number is even or odd

View Code & Output

Task 5

WAP to find simple interest. si = (p*r*t)/100

View Code & Output

Task 6

WAP to take coordinates of a point as input and find its quadrant

View Code & Output

Task 7

WAP to make temprature converter based on user choice

View Code & Output

Task 8

WAP to reverse the digits of given number

View Code & Output

Task 9

WAP to find factorial of given number

View Code & Output

Task 10

WAP to print table of given number

View Code & Output

Task 11

WAP to check given number is prime or not

View Code & Output

Task 12

WAP to find the Fibonacci Series of a given Number

View Code & Output

Task 13

WAP to store ten numbers in array by user input and find maximum and minimum number

View Code & Output

Task 14

WAP to store ten numbers in array by user input and search a number in array

View Code & Output

Task 15

WAP to take a sentence as input, now count Vowels in Sentence

View Code & Output

Task 16

WAP to take a String as input and display Reverse String

View Code & Output

Task 17

Write a Java program to create a class named "Rectangle." In the "Rectangle" class, take two instance variables length and breadth. Now create a parameterized constructor to initialize variables and create a method area() which returns the area of the rectangle. Test the class "Rectangle."

View Code & Output

Task 18

Write a Java program to create a class named "Bank." In the "Bank" class, take three instance variables acno, name, and balance. Create a parameterized constructor to initialize instance variables. Now create the following methods in the "Bank" class:
i. deposit() - This method is used to deposit money in the account.
ii. withdraw() - This method is used to withdraw money from the account after checking the balance. iii. enquiry() - This method provides balance enquiry.

View Code & Output