Answer:
// Program is written in Java Programming Language
// Comments are used for explanatory purpose
import java.util.*;
public class FlipCoin
{
public static void main(String[] args)
{
// Declare Scanner
Scanner input = new Scanner (System.in);
int flips;
// Prompt to enter number of toss or flips
System.out.print("Number of Flips: ");
flips = input.nextInt();
if (flips > 0)
{
HeadsOrTails();
}
}
}
public static String HeadsOrTails(Random rand)
{
// Simulate the coin tosses.
for (int count = 0; count < flips; count++)
{
rand = new Random();
if (rand.nextInt(2) == 0) {
System.out.println("Tails"); }
else {
System.out.println("Heads"); }
rand = 0;
}
}
Answer and Explanation:
• 1 thread awaits the incoming request
• 1 thread responds to the request
• 1 thread reads the hard disk
A multithreaded file server is better than a single-threaded server and a finite-state machine server because it provides better response compared to the rest and can make use of the shared Web data.
Yes, there are circumstances in which a single-threaded server might be better. If it is designed such that:
- the server is completely CPU bound, such that multiple threads isn't needed. But it would account for some complexity that aren't needed.
An example is, the assistance number of a telephone directory (e.g 7771414) for an community of say, one million people. Consider that each name and telephone number record is sixty-four characters, the whole database takes 64 MB, and can be easily stored in the server's memory in order to provide quick lookup.
NOTE:
Multiple threads lead to operation slow down and no support for Kernel threads.
They are as follows-
Speed
Accuracy
Storage
Versatility
Diligence
Automation
Reliability
Power of Remembering
Let us understand each characteristic in brief:-
Speed – Speed of a computer means the time it takes to complete any given task. The computer works at a very lightning speed. For example, a computer takes a second to calculate 3 million calculations rather than a human which takes years. Hence nowadays the speed of the computer is measured in terms of microseconds, Nanoseconds, and even in Pico seconds instead of seconds or milliseconds.
Accuracy – The computers are programmed and designed in such a manner that their results are almost 100% accurate. It performs all the tasks with the same accuracy. There are very few chances of uncertainty in results and even though an error occurs, it can happen either due to wrong input data or unreliable programs by a programmer. Such errors are referred to as Garbage In Garbage Out (GIGO) which means, if you provide wrong instructions to the computer then you get wrong results.
Versatility – Along with being accurate and diligent a computer is also a versatile device. It can perform several types of tasks at a time if they are reduced to a certain set of logical steps. A computer can be used for many purposes at different places such as booking air and rail tickets, weather forecasting, listening to music, and playing games. Also at a time, one can pay his utility bills and can make a monthly budget too. It can prepare documents, data sheets and also can make models of houses, dams, etc.
Diligence – The ability of a computer to perform tasks without getting tired is known as diligence. Computers are highly reliable, they do not get fed up, exhausted, or lack concentration. They can work for hours and hours unlike humans and can give accurate or error-free results. For example, humans will start feeling tired after 2 -3 hours and will lack concentration whereas a computer will keep on working until the results are achieved.
Automation – Automation means working automatically. A computer can work on its own without the intervention of the person using it. Programs can be made for the computer to perform the task and based on the sequence it executes the tasks and gives accurate results. In case an error occurs, it gives error messages too and registers the logs.
Reliability – High reliability of a computer depends on low failure rate and easy maintenance. The results given out by the computer are reliable as the accuracy is almost 100%.
Power of Remembering – The computer has the power of storing data or information for several years. It cannot lose the data on its own. A person can retrieve the data whenever required and the data remains the same after a number of years also. It gives the freedom to the user to decide on how much data to store and how much to remove.
Answer: Incoherent question
Explanation: This is an act of plagiarism at subjecting the tutor to unnecessary stress at answering the purported question.
Answer:
El crecimiento es un concepto que se refiere al aumento de tamaño, cantidad o intensidad de algo. La palabra, como tal, deriva del verbo crecer, que a su vez proviene del verbo latino crescĕre. ... Sinónimos de crecimiento son aumento, incremento, ampliación, expansión. Antónimo de crecimiento es decrecimiento
Explanation: