Proje01 Java
Proje01 Java
1.1 Objective
Create a Java program that accepts three integers representing the lengths of the sides of a triangle. The program
should determine whether these sides can form a triangle. If they do, the program should further classify the
triangle as equilateral, isosceles, or scalene.
1.2 Requirements
• Prompt the user to enter three positive integers.
a+b>c
a+c>b (1)
b+c>a
1.3 Example
• Input: a = 5, b = 5, c = 8
• Output: Isosceles triangle.
1
2 Simple Calculator Program
2.1 Objective
Design a Java program that functions as a simple calculator. The program should perform basic arithmetic opera-
tions (+, -, *, /) on two numbers input by the user.
2.2 Requirements
• Prompt the user to enter two numbers (integers or decimals).
2.3 Example
• Input:
– Number 1: 10
– Number 2: 5
– Operation: +
2
3 Intersection of Two Circles
3.1 Objective
Develop a Java program that determines whether two circles intersect, are separate, or one is inside the other
without intersecting.
3.2 Requirements
• Prompt the user to enter the center coordinates and radii of two circles:
– Circle 1: (x1 , y1 ), r1
– Circle 2: (x2 , y2 ), r2
• Calculate the distance between the centers of the two circles:
p
d = (x2 − x1 )2 + (y2 − y1 )2
3.3 Example
• Input:
– Circle 1: x1 = 0, y1 = 0, r1 = 5
– Circle 2: x2 = 8, y2 = 0, r2 = 5
3
4 Determining the Position of a Point in the Coordinate Plane
4.1 Objective
Write a Java program that determines the position of a point in the Cartesian coordinate plane based on its x and
y coordinates.
4.2 Requirements
• Prompt the user to enter the x and y coordinates of a point.
4.3 Example
• Input: x = -5, y = 5
4
5 Calculating Date from Day Number
5.1 Objective
Develop a Java program that calculates the month and day corresponding to a given day number in the year (from
1 to 365), assuming it is not a leap year.
5.2 Requirements
• Prompt the user to enter a day number between 1 and 365.
5.3 Example
• Input: Day Number = 100
• Output: Date: 10.4