Answer:
Explanation:
The following code is written in Java and uses a for loop with a series of IF ELSE statements to check the next and previous characters in a string. Checking to make sure that there are no asterix. If so it adds that character to the String variable output. Which is returned to the user at the end of the method. Two test cases have been created and the output can be seen in the attached image below.
class Brainly {
public static void main(String[] args) {
System.out.println(starOut("sm*eilly"));
System.out.println(starOut("ab**cd"));
}
public static String starOut(String str) {
String output = "";
for (int i = 0; i < str.length(); i++) {
if ((i != 0) && (i != str.length()-1)) {
if ((str.charAt(i-1) != '*') && (str.charAt(i+1) != '*') && (str.charAt(i) != '*')) {
output += str.charAt(i);
}
} else {
if ((i == 0) && (str.charAt(i) != '*') && (str.charAt(i+1) != '*')) {
output += str.charAt(i);
} else if ((i == str.length()-1) && (str.charAt(i) != '*') && (str.charAt(i-1) != '*')) {
output += str.charAt(i);
}
}
}
return output;
}
}
The answer is -621 (that’s what my calculator said).... btw why didn’t you just use a calculator for this...?
Your monthly premium is the payment you make to your car insurance company that keeps your coverage active.
A car insurance deductible is the amount of money you have to pay toward repairs before your insurance covers the rest.
Therefore $700 is the maximum amount you will have to pay
<span>out of pocket for a car accident before your insurance covers your cost.</span>
The task where the Layout view most helpful is showing how a report will look when printed.
<h3>What is the Layout view?</h3>
The Layout view is known to be a view that is said to be more of visually-oriented when compared to the Design view.
Note that the Layout view is one where each control often shows real data and as such, The task where the Layout view most helpful is showing how a report will look when printed.
Learn more about Layout view from
brainly.com/question/1327497
#SPJ1