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).
Answer:
Examples of reciprocating motion in daily life are;
1) The needles of a sewing machine
2) Electric powered reciprocating saw blade
3) The motion of a manual tire pump
Explanation:
A reciprocating motion is a motion that consists of motion of a part in an upward and downwards
or in a backward and forward (↔) direction repetitively
Examples of reciprocating motion in daily life includes the reciprocating motion of the needles of a sewing machine and the reciprocating motion of the reciprocating saw and the motion of a manual tire pump
In a sewing machine, a crank shaft in between a wheel and the needle transforms the rotary motion of the wheel into reciprocating motion of the needle.
Answer:
They communicate ideas very quickly.
Explanation:
Answer:
, ![\Delta C = 217.517\,USD](https://tex.z-dn.net/?f=%5CDelta%20C%20%3D%20217.517%5C%2CUSD)
Explanation:
The drag force is equal to:
![F_{D} = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot A](https://tex.z-dn.net/?f=F_%7BD%7D%20%3D%20C_%7BD%7D%5Ccdot%20%5Cfrac%7B1%7D%7B2%7D%5Ccdot%20%5Crho_%7Bair%7D%5Ccdot%20v%5E%7B2%7D%5Ccdot%20A)
Where
is the drag coefficient and
is the frontal area, respectively. The work loss due to drag forces is:
![W = F_{D}\cdot \Delta s](https://tex.z-dn.net/?f=W%20%3D%20F_%7BD%7D%5Ccdot%20%5CDelta%20s)
The reduction on amount of fuel is associated with the reduction in work loss:
![\Delta W = (F_{D,1} - F_{D,2})\cdot \Delta s](https://tex.z-dn.net/?f=%5CDelta%20W%20%3D%20%28F_%7BD%2C1%7D%20-%20F_%7BD%2C2%7D%29%5Ccdot%20%5CDelta%20s)
Where
and
are the original and the reduced frontal areas, respectively.
![\Delta W = C_{D}\cdot \frac{1}{2}\cdot \rho_{air}\cdot v^{2}\cdot (A_{1}-A_{2})\cdot \Delta s](https://tex.z-dn.net/?f=%5CDelta%20W%20%3D%20C_%7BD%7D%5Ccdot%20%5Cfrac%7B1%7D%7B2%7D%5Ccdot%20%5Crho_%7Bair%7D%5Ccdot%20v%5E%7B2%7D%5Ccdot%20%28A_%7B1%7D-A_%7B2%7D%29%5Ccdot%20%5CDelta%20s)
The change is work loss in a year is:
![\Delta W = (0.3)\cdot \left(\frac{1}{2}\right)\cdot (1.20\,\frac{kg}{m^{3}})\cdot (27.778\,\frac{m}{s})^{2}\cdot [(1.85\,m)\cdot (1.75\,m) - (1.50\,m)\cdot (1.75\,m)]\cdot (25\times 10^{6}\,m)](https://tex.z-dn.net/?f=%5CDelta%20W%20%3D%20%280.3%29%5Ccdot%20%5Cleft%28%5Cfrac%7B1%7D%7B2%7D%5Cright%29%5Ccdot%20%281.20%5C%2C%5Cfrac%7Bkg%7D%7Bm%5E%7B3%7D%7D%29%5Ccdot%20%2827.778%5C%2C%5Cfrac%7Bm%7D%7Bs%7D%29%5E%7B2%7D%5Ccdot%20%5B%281.85%5C%2Cm%29%5Ccdot%20%281.75%5C%2Cm%29%20-%20%281.50%5C%2Cm%29%5Ccdot%20%281.75%5C%2Cm%29%5D%5Ccdot%20%2825%5Ctimes%2010%5E%7B6%7D%5C%2Cm%29)
![\Delta W = 2.043\times 10^{9}\,J](https://tex.z-dn.net/?f=%5CDelta%20W%20%3D%202.043%5Ctimes%2010%5E%7B9%7D%5C%2CJ)
![\Delta W = 2.043\times 10^{6}\,kJ](https://tex.z-dn.net/?f=%5CDelta%20W%20%3D%202.043%5Ctimes%2010%5E%7B6%7D%5C%2CkJ)
The change in chemical energy from gasoline is:
![\Delta E = \frac{\Delta W}{\eta}](https://tex.z-dn.net/?f=%5CDelta%20E%20%3D%20%5Cfrac%7B%5CDelta%20W%7D%7B%5Ceta%7D)
![\Delta E = \frac{2.043\times 10^{6}\,kJ}{0.3}](https://tex.z-dn.net/?f=%5CDelta%20E%20%3D%20%5Cfrac%7B2.043%5Ctimes%2010%5E%7B6%7D%5C%2CkJ%7D%7B0.3%7D)
![\Delta E = 6.81\times 10^{6}\,kJ](https://tex.z-dn.net/?f=%5CDelta%20E%20%3D%206.81%5Ctimes%2010%5E%7B6%7D%5C%2CkJ)
The changes in gasoline consumption is:
![\Delta m = \frac{\Delta E}{L_{c}}](https://tex.z-dn.net/?f=%5CDelta%20m%20%3D%20%5Cfrac%7B%5CDelta%20E%7D%7BL_%7Bc%7D%7D)
![\Delta m = \frac{6.81\times 10^{6}\,kJ}{44000\,\frac{kJ}{kg} }](https://tex.z-dn.net/?f=%5CDelta%20m%20%3D%20%5Cfrac%7B6.81%5Ctimes%2010%5E%7B6%7D%5C%2CkJ%7D%7B44000%5C%2C%5Cfrac%7BkJ%7D%7Bkg%7D%20%7D)
![\Delta m = 154.772\,kg](https://tex.z-dn.net/?f=%5CDelta%20m%20%3D%20154.772%5C%2Ckg)
![\Delta V = \frac{154.772\,kg}{0.74\,\frac{kg}{L} }](https://tex.z-dn.net/?f=%5CDelta%20V%20%3D%20%5Cfrac%7B154.772%5C%2Ckg%7D%7B0.74%5C%2C%5Cfrac%7Bkg%7D%7BL%7D%20%7D)
![\Delta V = 209.151\,L](https://tex.z-dn.net/?f=%5CDelta%20V%20%3D%20209.151%5C%2CL)
Lastly, the money saved is:
![\Delta C = \left(\frac{154.772\,kg}{0.74\,\frac{kg}{L} }\right)\cdot (1.04\,\frac{USD}{L} )](https://tex.z-dn.net/?f=%5CDelta%20C%20%3D%20%5Cleft%28%5Cfrac%7B154.772%5C%2Ckg%7D%7B0.74%5C%2C%5Cfrac%7Bkg%7D%7BL%7D%20%7D%5Cright%29%5Ccdot%20%281.04%5C%2C%5Cfrac%7BUSD%7D%7BL%7D%20%29)
![\Delta C = 217.517\,USD](https://tex.z-dn.net/?f=%5CDelta%20C%20%3D%20217.517%5C%2CUSD)