Answer:
The solution code is written in Java.
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner inNum = new Scanner(System.in);
- System.out.print("Enter number of toss: ");
- int num = inNum.nextInt();
-
- for(int i=0; i < num; i++){
- System.out.println(toss());
- }
- }
-
- public static String toss(){
- String option[] = {"heads", "tails"};
- Random rand = new Random();
- return option[rand.nextInt(2)];
- }
- }
Explanation:
Firstly, we create a function <em>toss()</em> with no parameter but will return a string (Line 14). Within the function body, create an option array with two elements, "heads" and "tails" (Line 15). Next create a Random object (Line 16) and use <em>nextInt()</em> method to get random value either 0 or 1. Please note we need to pass the value of 2 into <em>nextInx() </em>method to ensure the random value generated is either 0 or 1. We use this generate random value as an index of <em>option </em>array and return either "heads" or "tails" as output (Line 17).
In the main program, we create Scanner object and use it to prompt user to input an number for how many times to toss the coin (Line 6 - 7). Next, we use the input num to control how many times a for loop should run (Line 9). In each round of the loop, call the function <em>toss() </em>and print the output to terminal (Line 10).
Drip irrigation
Drip irrigation is one of the most efficient types of irrigation systems. The efficiency of applied and lost water as well as meeting the crop water need ranges from 80% to 90%
Answer:
b)False
Explanation:
A battery is a device which store the energy in the form of chemical energy.And this stored energy is used according to the requirement.So battery is not a electromechanical device.Because it does have any mechanical component like gear ,shaft flywheel etc.
A flywheel is known as mechanical battery because it stored mechanical energy and supply that energy when more energy is required.Generally fly wheel is used during punching operation.
Answer:
0.024 m = 24.07 mm
Explanation:
1) Notation
= tensile stress = 200 Mpa
= plane strain fracture toughness= 55 Mpa
= length of a surface crack (Variable of interest)
2) Definition and Formulas
The Tensile strength is the ability of a material to withstand a pulling force. It is customarily measured in units (F/A), like the pressure. Is an important concept in engineering, especially in the fields of materials and structural engineering.
By definition we have the following formula for the tensile stress:
(1)
We are interested on the minimum length of a surface that will lead to a fracture, so we need to solve for 
Multiplying both sides of equation (1) by 
(2)
Sequaring both sides of equation (2):
(3)
Dividing both sides by
we got:
(4)
Replacing the values into equation (4) we got:
![\lambda=\frac{1}{\pi}[\frac{55 Mpa\sqrt{m}}{1.0(200Mpa)}]^2 =0.02407m](https://tex.z-dn.net/?f=%5Clambda%3D%5Cfrac%7B1%7D%7B%5Cpi%7D%5B%5Cfrac%7B55%20Mpa%5Csqrt%7Bm%7D%7D%7B1.0%28200Mpa%29%7D%5D%5E2%20%3D0.02407m)
3) Final solution
So the minimum length of a surface crack that will lead to fracture, would be 24.07 mm or more.