JAVA
Write a number guessing game that will generate a random number between 1and 20 and ask the user to guess that number.
In: Computer Science
(i) Explain the physical meaning of Reynolds number and Froude number.
A weir is an obstruction in a channel flow which can be calibrated to measure the flow rate. The flow discharge Q varies with gravity acceleration g, weir width b into the paper, and upstream water height H above the weir crest. If it is known that Q is proportional to b, use the pi theorem to find a unique functional relationship Q(g, b, H).
In: Civil Engineering
// How to create a random number this program only creates a specific same number
#include <iostream>
#include <iomanip>
double random (int &seed);
bool determine_larger (double rand_num);
void print_results (double rand_num);
using namespace std;
int main()
{
int seed = 8;
double rand_num = random (seed);
print_results (rand_num);
return 0;
}
// function: random number
// does:generates a random number between (0, 1)
double random (int &seed)
{
int const MODULUS = 15749;
int const MULTIPLIER = 69069;
int const INCREMENT = 1;
seed = ( (MULTIPLIER*seed) + INCREMENT)% MODULUS;
return double (seed)/MODULUS;
}
// function: identify if smaller or larger than .5
// does: identifies if the number is smaller or larger
bool determine_larger (double rand_num)
{
bool t, f;
f = false;
t = true;
if (rand_num >= .5)
return t;
else return f;
}
// function: print results
// does: prints if the number is larger or smaller
void print_results (double rand_num)
{
if (determine_larger(rand_num))
cout << rand_num << " is larger " << endl;
else cout << rand_num << " is smaller " <<
endl;
In: Computer Science
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
In: Computer Science
Suppose that output q represents the number of products produced,K is the number of machines used, and L the number of workers used. To produce one unit of q, one must can use 1 machine OR 4 workers. The cost of a unit of K is r= 100, and the cost of a unit of L is w= 20:First, draw the isoquant for q= 10. Next, draw the isocost line for C= $2000.Using your isocost-isoquant diagram, identify the cost-minimizing number of machines and workers to produce q= 10products per hour.(b) What is the MRTSK,L for the following production function:Q=KL^2? Is this technology CRS, IRS or DRS? How do you know? (C) What is the MRTSK,L for the following production function:Q= 2K+L?Is this technologyCRS, IRS or DRS? How do you know?
In: Economics
Implement a class Address. An address has a house number, a street, an optional apartment number, a city, a state, and a postal code (all of these are strings). Create the getters and setters.
Supply two constructors that accept all the address components except one includes an apartment number and one without (refer to the tester class below to see the proper order).
Supply a print method that returns void and prints to the console the address with the street on one line and the city, state, and zip code on the next line.
Use my addressTester file attached here to verify it works correctly. You shouldn't make any changes to the addressTester file. Make changes to your class so that it works with my addressTester.java file. If your class file doesn't work with my tester class, you will receive no points.
Clarification: All components of the Address should print - however, an apartment number should only print if one is provided. Your method should not print null if no apartment number is provided.
Given Tester
public class AddressTester {
//provided by instructor
public static void main(String[] args) {
Address a1 = new
Address("123","Main Street","Los Angeles", "CA","90001");
System.out.print(Address);
System.out.println("----------------");
Address condo = new Address("5643",
"Hideaway Mountain", "3C","Nashville", "TN", "37115");
condo.print();
}
}
In: Computer Science
The following table provides the project annual budget, total number of projects, and total number of people working on the projects for City of Killingcovid annually:
|
Year |
Annual Budget (in millions) |
Number of Projects |
Number of People Working on the Projects |
|
1997 |
9.93 |
2 |
6 |
|
1998 |
7.34 |
8 |
47 |
|
1999 |
6.82 |
4 |
134 |
|
2000 |
7 |
2 |
291 |
|
2001 |
7.31 |
7 |
279 |
|
2002 |
7.86 |
6 |
82 |
|
2003 |
8.44 |
4 |
65 |
|
2004 |
7.61 |
5 |
34 |
|
2005 |
7.8 |
1 |
14 |
|
2006 |
8.6 |
4 |
249 |
|
2007 |
8.25 |
2 |
174 |
|
2008 |
8.7 |
3 |
346 |
|
2009 |
10.89 |
2 |
3 |
|
2010 |
10.53 |
1 |
8 |
|
2011 |
11.77 |
2 |
13 |
|
2012 |
11.44 |
4 |
24 |
|
2013 |
10.95 |
6 |
534 |
|
2014 |
11.12 |
2 |
6 |
|
2015 |
10.73 |
2 |
28 |
|
2016 |
11.39 |
1 |
18 |
|
2017 |
11.3 |
3 |
25 |
|
2018 |
11.27 |
2 |
54 |
For A to F, use the data between Yr 2006 and Yr 2015 to calculate the following:
A. The mean of the
Number of People Working on the Project.
B. The median of the Budget.
C. The range of Budget.
D. The variance (3 significant figures) of Number of
Projects.
E. The standard deviation (nearest integer) of Number of People
Working on the Project.
F. The 20% trimmed mean of Number of Projects.
G. Draw a dot plot
comparing the Number of People Working on the Project from Yr 1997
to Yr 2006 and those from Yr 2009 to Yr 2018.
H. Using the data for Annual Budget from Yr 2001 to Yr 2017, draw a double stem leaf plot, then calculate the relative frequency.
In: Economics
8. Given the following data: Number of patients = 3,293 Number of patients who had a positive test result and had the disease = 2,184 Number of patients who had a negative test, and did not have the disease = 997 Number of patients who had a positive test result, but did not have the disease = 55 Number of patients who had a negative test result, but who had the disease = 57 a. Create a complete and fully labeled 2x2 table (10) b. Calculate the positive predictive value (5) c. Calculate the negative predictive value (5) d. Calculate the likelihood ratio for a positive test result (5) e. Calculate the likelihood ratio for a negative test result (5)
Show all work
In: Math
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
In: Computer Science
Suppose that large number number of refugees flee from a civil war and arrive in our country. Also suppose they are granted permanent resident status and are permitted to seek work.
Use ISLM + ASAD model to predict what will happen in the scenario above.
Indicate both the short run and long run. Label all clear starting and ending outcomes.
In: Economics