Answered step by step
Verified Expert Solution
Question
1 Approved Answer
* This is for CS 101 Java class. I CAN ONLY USE for and do-while loops for this lab assignment. I CANNOT USE while or
* This is for CS 101 Java class. I CAN ONLY USE "for" and do-while loops for this lab assignment. I CANNOT USE while" or any other repetition method. Also I CANNOT USE arrays or CANNOT CREATE methods other than main method. *
Create a new project Lab05b. Write a menu driven program, that asks the user to provide an integer from 1 to 3. If any number given out of this range, the program should ignore that number and should continue to ask numbers 1-3. If number 1 is given, it should ask two Strings from user and show the common characters in both Strings. It should be case-insensitive, meaning 'A' and 'a' should mean the same thing. There should be no duplicates, even if 'a' is found more than once, it should be displayed only once. If number 2 is given, it should ask the user to provide an integer x and a precision. It should calculate the approximate value of 11 (1 - x) by using the formula given below. Your program stops calculation whenever the increment is less than given precision value. =1+x+x2 +x3 +x4 +x5 + for-1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started