![oscarmasinde44](/avatars/27584.jpg)
oscarmasinde44
26.11.2020 •
Engineering
Compute the discharge observed at a v-notch weir. The weir has an angle of 90-degrees. The height above the weir is 3 inches.
Solved
Show answers
More tips
- F Food and Cooking Everything You Need to Know About Pasta...
- C Computers and Internet How to Choose a Monitor?...
- S Style and Beauty How to Get Rid of Peeling Nails: Natural Remedies...
- S Science and Technology Understanding Magnetic Storms: A Guide to This Natural Phenomenon...
- F Family and Home What is Most Important in Men s Lives?...
- G Goods and services Which TV is better - LCD or Plasma?...
- C Computers and Internet Are there special gaming mice?...
- G Goods and services LED-подсветка в LCD-телевизорах: 5 причин, почему она лучше других технологий...
- C Computers and Internet Keep Your Mouse Pad Clean: The Right Way to Clean It?...
- C Computers and Internet 3D Glasses! What is this thing?...
Answers on questions: Engineering
- P Physics Atrain running between two towns arrives at its destination 10 minutes late when it goes 40 miles per hour and 16 minutes late when it goes 30 miles per hour. the...
- E English What do you think insulated air is? What would lighting made of Splintery cracks look like. *please answer*...
- E English What is momaday’s purpose for writing the way to rainy mountain?...
- H Health is using workgroups an effective way to diagnosis someone? whats your personal opinion please type up a paragrapgh...
Ответ:
the discharge observed at a v-notch weir is 66.7 in³/s
Explanation:
Given that;
Notch angle ∅ = 90°
height above the weir is 3 inches { head + head correction factor) h + k = 3 in
Discharge Q = ?
To determine the discharge observed, we us the following expression
Q = 4.28Ctan(∅/2) ( h + k )^5/2
where Q is discharge, C is discharge coefficient, ∅ is notch angle, h is head and k is head correction factor
now we substitute
Q = 4.28 × 1 × tan(90/2) ( 3 )^5/2
Q = 4.28 × 1 × 1 × 15.5884
Q = 66.7 in³/s
Therefore the discharge observed at a v-notch weir is 66.7 in³/s
Ответ:
The following code or the program will be used:
Explanation:
import java.util.Scanner;
public class Authenticate
{
public static void main(String[] args)
{
// Actual password is 99508
int[] actual_password = {9, 9, 5, 0, 8};
// Array to hold randomly generated digits
int[] random_nums = new int[10];
// Array to hold the digits entered by the user to authenticate
int[] entered_digits = new int[actual_password.length];
// Randomly generate numbers from 1-3 for
// for each digit
for (int i=0; i < 10; i++)
{
random_nums[i] = (int) (Math.random() * 3) + 1;
}
// Output the challenge
System.out.println("Welcome! To log in, enter the random digits from 1-3 that");
System.out.println("correspond to your PIN number.");
System.out.println();
System.out.println("PIN digit: 0 1 2 3 4 5 6 7 8 9");
System.out.print("Random #: ");
for (int i=0; i<10; i++)
{
System.out.print(random_nums[i] + " ");
}
System.out.println();
System.out.println();
// Input the user's entry
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter code.");
String s = keyboard.next();
String s = keyboard.next();
// Extract the digits from the code and store in the entered_digits array
for (int i=0; i<s.length(); i++)
{
entered_digits[i] = s.charAt(i) - '0'; // Convert char to corresponding digit
}
// At this point, if the user typed 12443 then
// entered_digits[0] = 1, entered_digits[1] = 2, entered_digits[2] = 4,
// entered_digits[3] = 4, and entered_digits[4] = 3
/
TO DO: fill in the parenthesis for the if statement
so the isValid method is invoked, sending in the arrays
actual_password, entered_digits, and random_nums as
parameters
***/
if (isValid (actual_password, entered_digits, random_nums)) // FILL IN HERE
{
System.out.println("Correct! You may now proceed.");
}
else
{
System.out.println("Error, invalid password entered.");
}
/***
TO DO: Fill in the body of this method so it returns true
if a valid password response is entered, and false otherwise.
For example, if:
actual = {9,9,5,0,8}
randnums = {1,2,3,1,2,3,1,2,3,1}
then this should return true if:
entered[0] == 1 (actual[0] = 9 -> randnums[9] -> 1)
entered[1] == 1 (actual[1] = 9 -> randnums[9] -> 1)
entered[2] == 3 (actual[2] = 5 -> randnums[5] -> 3)
entered[3] == 1 (actual[3] = 0 -> randnums[0] -> 1)
entered[4] == 3 (actual[4] = 8 -> randnums[8] -> 3)
or in other words, the method should return false if any of
the above are not equal.
/
public static boolean isValid(int[] actual, int[] entered, int[] randnums)
{
int Index = 0;
boolean Valid = true;
while (Valid && (Index < actual.length))
{
int Code = actual[Index];
if (entered [Index] != randnums [Code])
{
Valid = false;
}
Index++;
}
return Valid;
}