Question: Please use Java Problem 5. Point in a Circle (PointInCircle.java) Write a Java class named Pointin Circle that prompts the user to enter a point(x,y),
Problem 5. Point in a Circle (PointInCircle.java) Write a Java class named Pointin Circle that prompts the user to enter a point(x,y), and checks whether the point is within the circle centered at (0,0) with radius 10. For example (4.5) is inside the circle and (9.9) is not, as shown in Fig1. Hint: A point is in the circle if its distance to (0,0) is less than or equal to the radius of the circle. The formula for computing the distance between two points in a 2D space is distance = (x1 - x2)2 + (y1 - y2) where (x1, yl) are the coordinates of point1, and (x2, y2) are the coordinates of point 2. (4,5) (0,0) Outputs: Please enter the two coordinates of a point: 4.0 5.0 Point (4.2, 5.0) is in the circle. Please enter the two coordinates of a point: 9.0 9.0 Point (9.8, 9.0) is not in the circle. Problem 6: Vehicle Plate (VehiclePlate.java) Description: Write a Java class named Vehicle Plate that can generate random vehicle plate numbers. It is assumed that a vehicle plate number consists of three uppercase letters followed by four digits. For example, ABC1234 is a valid plate number, while Bac7806 is not Outputs: Sjava VehiclePlate AFB2079 Sjava VehiclePlate YC01886
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
