0% found this document useful (0 votes)
8 views

JAVA Exercises 2-1

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

JAVA Exercises 2-1

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Amrita School of Engineering – Chennai Campus

19AIE105 – Object Oriented Programming


Practise Set 2
CSE-AI 16-11-2020
Sem: 1

1. To find minimum among 4 numbers


2. To calculate rectangles: perimeter and area.
3. Write a program to execute the following conditions:
a. If age of person is below 15, categorize him as a child
b. If age is between 15 and 30, categorize him as adult. Print his age and name.
Check if age is greater than 18, then display he is eligible to vote. If age is greater
than 25, display his qualification.
c. Any age greater than 30, display his qualification and work.
4. Write a program to execute all string commands discussed in last class.
5. Write a program to display the grade of students given his mark. If mark is greater
than 90: O, between 80 and 90: A, between 70 and 80: B, between 60 and 70: C,
between 50 and 60: D, between 50 and 40: P, less than 40: F
6. Program to check whether a year given is a Leap year or not.
7. Write a program to check whether a number is divisible by 5 and 11 or not.
8. Write a program to check whether a character is uppercase or lowercase alphabet.
9. Write a program to input a week number and print week day.
10. Write a program to check whether the triangle is equilateral, isosceles, or scalene.
11. Write a program to calculate profit or loss.
12. Write a program given all angles of a triangle, to check whether triangle is valid or
not.

--------------------------------------

You might also like