(Solved) : 142 Prog 2 Calculate Area Circumference Java Code Please 1 Prompt User Input Character Rea Q43963422 . . .
14.2 Prog 2 Calculate Area&Circumference
java code please
(1) Prompt the user to input a character and real number, andoutput them. (1 pts)
Enter a character:AEnter a number:5.2The inputs are A and 5.2
(2) if the character is ‘A’ and the number is positive, calculatethe area of a circle using the number as the radius, format to 2decimal places (3 pts)
Area with radius 5.2 is 84.95
(2) if the character is ‘C’ and the number is positive, calculatethe circumference of a circle using the number as the radius,format to 2 decimal places (3 pts)
Circumference with radius 5.2 is 32.67
(3) if the character is not ‘A’ or ‘C’, or the number is notpositive, print error message (3 pts)
Invalid entry
Expert Answer
Answer to 14.2 Prog 2 Calculate Area&Circumference java code please (1) Prompt the user to input a character and real number, and …
OR