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.
Task 3
WAP to take a number as input. Now check given number is positive or negative or zero
View Code & OutputTask 13
WAP to store ten numbers in array by user input and find maximum and minimum number
View Code & OutputTask 14
WAP to store ten numbers in array by user input and search a number in array
View Code & OutputTask 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 & OutputTask 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.