Practice Java Programs
Problem Statements
1. Simple Calculator
Design a Java program to implement a Simple Calculator using class and
object concepts. The program should perform addition, subtraction,
multiplication, and division of two numbers using separate methods and
appropriate control statements.
2. Even or Odd Number Checker
Design a Java program to check whether a given number is even or odd
using if–else statements.
3. Positive, Negative or Zero Checker
Design a Java program to identify whether a given number is positive,
negative, or zero.
4. Student Grade Calculator
Design a Java program to calculate the grade of a student based on marks
using an if–else ladder and constructor.
5. Simple Interest Calculator
Design a Java program to calculate Simple Interest using a constructor and
method.
6. Area of Circle
Design a Java program to calculate the area of a circle using class, object,
constructor, and Math library.
Created by Prof. Swapnil Aryan email: prof.swapnil01@[Link]
7. Voter Eligibility Checker
Design a Java program to check whether a person is eligible to vote based on
age.
8. Largest of Two Numbers
Design a Java program to find the largest of two numbers using if–else.
9. Largest of Three Numbers
Design a Java program to find the largest among three numbers using nested
if–else statements.
10. Temperature Converter
Design a Java program to convert temperature from Celsius to Fahrenheit
using constructor and method.
11. Employee Attendance Checker
Design a Java program to check whether an employee is present or absent
using boolean and if–else.
12. Simple Login Validation
Design a Java program to validate username and password using String
comparison and encapsulation.
13. Marks Pass or Fail System
Design a Java program to determine pass or fail based on marks using if–
else.
14. Basic Menu-Driven Program
Design a Java program to implement a menu-driven application using
switch-case.
Created by Prof. Swapnil Aryan email: prof.swapnil01@[Link]
15. Number Swap Program
Design a Java program to swap two numbers and display values before and
after swapping.
Created by Prof. Swapnil Aryan email: prof.swapnil01@[Link]