Question: 3. [10 marks] Algorithm Design Write a detailed algorithm that prompts the user to enter a phone number and check whether it is valid. A
3. [10 marks] Algorithm Design Write a detailed algorithm that prompts the user to enter a phone number and check whether it is valid. A valid phone number contains ten digits and it may or may not contain a pair of parentheses for the three-digit area code at the beginning. For example, both 1234567899 and (123)4567899 are valid phone numbers. 4. [65 marks] Programming 1) [17 marks) (PointInCircle.java) Write a program that asks the user to enter the radius of a circle whose center is at (0,0). The program then randomly generates a point(x, y). where the ranges of x and y are [-radius, radius), and checks whether the point is inside the circle. All the values are floating-point numbers Two sample runs are given below (keep two decimals for the x, y values): Enter the radius of the circle: 5.2 Point (-2.87, 2.55) is in the circle Enter the radius of the circle: 6.78 Point (5.16, -4.78) is not in the circle
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
