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;
}
}
SJF scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.
<h3>What is SJF in operating system?</h3>
SJF is a term that connote Shortest Job First. It is said to be a type of CPU scheduling whose algorithm is linked with each as it is said to process the length of the next CPU burst.
Note that for one to be able to know the time for the next CPU burst to take place, one need to take the SJF into consideration as that is its function.
Hence, SJF scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.
See options below
A) Multilevel queue
B) RR
C) FCFS
D) SJF
Learn more about scheduling from
brainly.com/question/19309520
#SPJ1
Google Analytics works on statistics. It allows businesses/websites to get an insight into what their customer's needs and wants are.
Out of the answers you've given, I would say it is a site Management Tool.
Cancelling out: (and reasons for cancelling them)
Search Engine - Google on its own is a search engine, however, Analytics is a 'Subsidiary' if you will.
Google Chrome is a Web Browser - Not the sector of Google Analytics.
Security Services - It does not encrypt anything (or make anything safer for users)
Answer:
60 J
Explanation:
Given,
Work done to push the box = 100 J
Energy dissipated by friction = 40 J.
According to work energy theorem work done is equal to change in kinetic energy.
Change in Kinetic energy = Work done by student + Work done by friction
Change in Kinetic energy = 100 J - 40 J
Work done by the friction will be negative because it will act in opposite direction of force applied.
Change in Kinetic energy = 60 J