Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA Write a Class Named StringLabSolutions that will include a method for each problem that return the solution. All Methods Must be in this class
JAVA
Write a Class Named StringLabSolutions that will include a method for each problem that return the solution. All Methods Must be in this class Problem 1: Name vour method: marsExploration Sami's spaceship crashed on Mars! She sends a series of SOS messages to Earth for help. Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string s, determine how many letters of Sami's SOS have been changed by radiation. For example, Earth receives SOSTOT. Sami's original message was SOssos. Two of the message characters were changed in transit. Function Description Complete the marsExploration. It should return an integer representing the number of letters changed during transmission marsExploration has the following parameter(s): s: the string as received on Earth Input Format There is one line of input: a single string s Note: As the original message is just SOS repeated times, 's length will be a multiple of 3. Output Format Print the number of letters in Sami's message that were altered by cosmic radiation. Sample Input 0 SOSSPSSQSSOR Sample Output 0 Write a Class Named StringLabSolutions that will include a method for each problem that return the solution. All Methods Must be in this class Problem 1: Name vour method: marsExploration Sami's spaceship crashed on Mars! She sends a series of SOS messages to Earth for help. Letters in some of the SOS messages are altered by cosmic radiation during transmission. Given the signal received by Earth as a string s, determine how many letters of Sami's SOS have been changed by radiation. For example, Earth receives SOSTOT. Sami's original message was SOssos. Two of the message characters were changed in transit. Function Description Complete the marsExploration. It should return an integer representing the number of letters changed during transmission marsExploration has the following parameter(s): s: the string as received on Earth Input Format There is one line of input: a single string s Note: As the original message is just SOS repeated times, 's length will be a multiple of 3. Output Format Print the number of letters in Sami's message that were altered by cosmic radiation. Sample Input 0 SOSSPSSQSSOR Sample Output 0Step 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