Question: Problem 1: Points in a Circle Write a program that prompts the user to enter a point (x,y) and checks whether the point is within

Problem 1: Points in a Circle Write a program that prompts the user to enter a point (x,y) and checks whether the point is within the circe centered at (0,0) with radius 10. For example, (4,5) is inside the circle and (9.9) is outside the circle as shown in the Figure below. (Hint: A point is in the circle if its distance to (0,0) is less than or equal to 10. V(x2 - x)+ 02 - YD? The formula for computing the distance is: Sample Input/Output Enter a point with two coordinates: 4 5 Point (4.0, 5.e) is in the circle Enter a point with two coordinates: 99 Point (9.8, 9.8) is not in the circle Problem 2: Pick a Card Write a program that simulates picking a card from a deck of 52 cards. Your program should display the rank (Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, lack, Queen, King and suit (Clubs, Diamonds, Hearts, Spades) of the card Hint: Use random numbers Sample output The card you picked is lack of Hearts DELL Problem 3: Monetary Units Write a Java program that converts a given amount of money into smaller monetary units. The prograr lets the user enter an amount as a String value representing the total amount in dirhams and fils, and outputs a report listing the equivalent monetary units in the maximum number of 1 dirham coins, 50 fils coins, 25 fils coins, and remaining fils if any. The program should result in the minimum number of coins. Read the input as a string such as "11.79". Your program should extract the dirham amount and the fils amount using the appropriate String methods. Sample input/output Enter the amount: 11.79 Your amount 11.79 consists of: 11 dirhan coins 1 Se fils coins 1 25 fils coins 4 remaining Fils Problem 4: Display a Pyramid Write a lava program that prompts the user to enter an integer from 1 to 9 and display a pyramid, as shown in the following sample input/output Sample input/output Enter the number of lines: 7 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
