Answer:
public static String repeat(String text, int repeatCount) {
if(repeatCount < 0) {
throw new IllegalArgumentException("repeat count should be either 0 or a positive value");
}
if(repeatCount == 0) {
return "";
} else {
return text + repeat(text, repeatCount-1);
}
}
Explanation:
Here repeatCount is an int value.
at first we will check if repeatCount is non negative number and if it is code will throw exception.
If the value is 0 then we will return ""
If the value is >0 then recursive function is called again untill the repeatCount value is 0.
False any critical thinking shouldn’t involve emotions
Answer:
software development is the conceiveing, specifying , designing, programing , texting, document and fix involved in creating and application frame work or other software components.
Answer:
Preemptive scheduling is the scheduling which a process given to the CPU can be suspended if a more suitable process comes between execution.
For example :- In SJF (Shortest Job First) a more smaller process comes between the execution the CPU will execute the new process and the process which was in the execution will be suspended for the time being.
Non-Preemptive scheduling cannot suspend the process in between if a process is in execution it will be fully executed then other process will get executed.
Strict Non preemptive scheduling are not suitable for computer centers because it cannot execute process with more priority if it comes between the execution.
Answer:
a. see explaination
b. 0.632
Explanation:
Packet switching is a method of grouping data that is transmitted over a digital network into packets. Packets are made of a header and a payload.
See attachment for the step by step solution of the given problem.