Question: Write a complete java program that presents a menu to the user: 1 . Fun with String 2 . Fun with Math Accept the user's

Write a complete java program that presents a menu to the user:
1. Fun with String
2. Fun with Math
Accept the user's choice. If the user chooses 1, ask the user for their name. Print back their name in all uppercase, all lowercase, and tell them the first letter of their name.
If the user chooses 2, ask the user for a numeric value. Then give the user a second menu:
1. Sine
2. Cosine
3. Tangent
When they choose the option, print back the value of that math function on their provided numeric value.
For example:
Welcome to my program. Please choose:
1. String
2. Math
1
What is your name? Andy
Your uppercase name is ANDY, your lowercase name is andy, and the first letter of your name is 'A'.
Welcome to my program. Please choose:
1. String
2. Math
2
What is the value? 1
Choose your function:
1. Sine
2. Cosine
3. Tangent
1
The sine of 1 is 0.8414709848078965

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!