Questions
Advance programing in java Qn1 1.True or False: (a) A sequence of 0s and 1s is...

Advance programing in java

Qn1

1.True or False:
(a) A sequence of 0s and 1s is called a decimal code.
(b) ZB stands for zero byte.
(c) The CPU stands for command performing unit.
(d) Every Java application program has a method called main.
(e) An identier can be any sequence of digits and letters.
(f) Every line in a program must end with a semicolon.
2. Explain the two most important benets of the Java language
3 Explain the dierences between machine languages and high-level languages?
4 Explain the dierence between a keyword and a user-dened identier?
5 Are the identiers rstName and FirstName the same?


Qn2 Which of the following are valid Java identiers?
(a) myFirstProgram (b) MIX-UP (c) JavaProgram2
(d) quiz7 (e) ProgrammingLecture2 (f) 1footEquals12Inches
(g) Mike'sFirstAttempt (h) Update Grade (i) 4th
(j) New Student


Qn3 The following program has syntax errors. Correct them. On each
successive line, assume that any preceding error has been corrected. After you have
corrected the syntax errors, type and compile the program to check if all errors have
been found.
public class Qn3
{
static final int SECRET_NUM = 11 ,213;
static final PAY_RATE = 18.35
public void main ( String [] arg)
{
int one , two;
double first , second
one = 18;
two = 11;
first = 25;
second = first * three ;
second = 2 * SECRET_NUM ;
SECRET_NUM = SECRET_NUM + 3
System .out. println ( first + " " + second + " "
+ SECRET_NUM );
paycheck = hoursWorked * PAY_RATE
System .out. println (" Wages = " paycheck );
}
}


Qn 4 )Write a program that prompts the user to input ve decimal numbers.
The program should then add the ve decimal numbers, convert the sum to the
nearest integer, and print the result.
Screen shot of the output:

In: Computer Science

4. Suppose that you are the engineer in the charge of the gasification section of the...

4. Suppose that you are the engineer in the charge of the gasification section of the Acme Substitute Natural Gas Company. ASNG Co. runs fixed-bed, dry-ash gasifiers. The raw gas is cleaned, shifted, and sent to a methane synthesis unit. Every morning you receive a report from ASNG’s analytical laboratory on the characteristics of the coal that will be fed to the gasifiers during the next day’s operations. One important characteristic is the ash fusion temperature (AFT), i.e., the temperature at which the ash will begin to melt and form a liquid slag. It is vitally important to keep the bed temperature not only below the AFT, but usually ≥100°C below, to allow for a margin of safety. One day the lab report indicates that the AFT for the coal about to go to the gasifiers is substantially lower than it has been in recent weeks. (a) What instructions will you issue to the plant operators for adjusting the steam/oxygen ratio being fed to the gasifiers? (b) Why? (c) What impact will this change have on the H2/CO ratio in the product gas? (d) Why? (e) How will this change affect operation of the water-gas shift unit? (f) Why?

In: Other

In the book Business Research Methods (5th ed.), Donald R. Cooper and C. William Emory discuss...

In the book Business Research Methods (5th ed.), Donald R. Cooper and C. William Emory discuss a market researcher for an automaker who is studying consumer preferences for styling features of larger sedans. Buyers, who were classified as “first-time” buyers or “repeat” buyers, were asked to express their preference for one of two types of styling—European styling or Japanese styling. Of 40 first-time buyers, 8 preferred European styling and 32 preferred Japanese styling. Of 60 repeat buyers, 40 preferred European styling, and 20 preferred Japanese styling.

1) Create a cross-tabulation for the data (5 points)

2) Test the hypothesis that buyer status (repeat versus first-time) and styling preference are independent at the 0.05 level of significance. What is your conclusion? Show the procedure. (5 points)

In: Statistics and Probability

A call option on a stock with a strike price of $60 costs $8. A put...

A call option on a stock with a strike price of $60 costs $8. A put option on the same stock with the same strike price costs $6. They both expire in 1 year.

(a) How can these two options be used to create a straddle?

(b) What is the initial investment?

(c) Construct a table that shows the payoffs and profits for the straddle when the stock price in 3 months is $50, and $72, respectively. The table should looks like this:

Stock Price Payoff Profit
$50
$72

In: Finance

Please show work (i.e. equations used) not just the final answer Use the data from the...

Please show work (i.e. equations used) not just the final answer

  1. Use the data from the Table to answer the questions below:

Population Statistics for a Hypothetical County

Measure

Number

Measure

Number

Total 1-year Population

200,000

Number of deaths of persons aged 55 years and older

850

Population of women 15-44 years of age

50,000

Number of deaths of among women aged 55 years and older

460

Population of women 55 years of age or older

55,000

Number one cause of death in the county is heart disease - deaths from heart disease

130

Number of live births

3,500

Number two cause of death in the county is from cancer - deaths from cancer

70

Number of fetal deaths

65

Number three cause of death in the county is from cerebrovascular accident (stroke)

60

Number of maternal deaths

8

Number four cause of death in the county is unintentional injuries

45

Total deaths

1,400

Number of deaths from cancer age 55 years and older

45

Number of infant deaths

90

Number of persons diagnosed heart disease

5,600

Number of deaths under 28 days old

5

Number of deaths from other causes

510

Number of deaths between 20 weeks gestation and 28 days old

10

Number of abortions

1,250

Source:  

Determine the following:

  1. Crude death rate
  2. Maternal mortality rate
  3. Infant mortality rate
  4. Neonatal mortality rate
  5. Abortion rate
  6. Fertility rate
  7. Age-specific mortality rate for women aged 55 years or older
  8. Cause-specific mortality rate for those who died from heart disease
  9. Cause specific mortality rate for those who died from stroke
  10. Proportional mortality ratio for cancer among persons ages 55 years or older

In: Statistics and Probability

In.java Write down a program that asks the user for their full name given in the...

In.java

Write down a program that asks the user for their full name given in the format first last. The program will do the necessary processing and print the name in a table with 3 columns: Last, First, Initials. Requirements/Specifications...

  1. Your program run must be identical with the one shown as an example (both in how it reads the input and it on what it prints). The table must have the top and bottom lines as shown.
  2. The columns for Last and First must have exactly 15 spaces each.
  3. The data in the columns must be LEFT aligned
  4. You can assume that the user gives good input: two words separated by one space.
 as a Sample run 
Please enter your first and last name: Tom Cruise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Cruise         |Tom           |T.C.|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In: Computer Science

Assume that x has a normal distribution with the specified mean and standard deviation. Find the...

Assume that x has a normal distribution with the specified mean and standard deviation. Find the indicated probability.

A) μ = 4; σ = 2

P(3 ≤ x7) =

B) μ = 15.8; σ = 4.1

P(10 ≤ x ≤ 26) =

C) μ = 39; σ = 15

P(50x ≤ 70) =

D) μ = 5.3; σ = 1.7

P(7x ≤ 9) =

E) μ = 13.2; σ = 3.6

P(8x ≤ 12) =

F) μ = 49; σ = 13

P(40x ≤ 47) =

G) μ = 28; σ = 3.4

P(x ≥ 30) =

H) μ = 103; σ = 15

P(x ≥ 120) =

I) μ = 109; σ = 20

P(x ≥ 90) =

J) μ = 2.3; σ = 0.37

P(x ≥ 2) =

In: Statistics and Probability

Choose the correct answer (i) If the mean of five values is 74, find the sum...

Choose the correct answer

(i) If the mean of five values is 74, find the sum of the values.

(ii) If the mean of five values is 10.2 and four of the values are 8, 10, 7, and 12, find the fifth value.

(iii) Find the mean of 60, 80, 30, 40, and 50. a. Add 10 to each value and find the mean. b. Subtract 10 from each value and find the mean. c. Multiply each value by 10 and find the mean. d. Divide each value by 10 and find the mean. e. Make a general statement about each situation.

(iv) Find midrange of the data -4,-5,-7,-0, -12

(v) Which measures of central tendency cannot be calculated from data set 4,5,7,0, 12.

(vi) Find range of the data -2,-3,-5,-10, -

In: Statistics and Probability

A manufacturer of fortune cups wants to find a new supplier for the plastic cups that...

A manufacturer of fortune cups wants to find a new supplier for the plastic cups that are used in making the fortune cups. They have an average annual demand of 1,500 for the plastic cups. For this manufacturer, 1 year is 50 weeks. The manufacturer has two suppliers that have made offers to supply the needed plastic cups. The first supplier has a lower price but a variable lead time. The second supplier has a higher price, but a constant lead time. The retailer experiences an average weekly demand of 30 plastic cups. In both cases the annual holding cost is 7% of the value of the cups and the manufacturer wishes to have a 97.5% service level.

Complete the following table; round part (e) to two decimals; round all other values to the nearest integer.

Supplier 1   Supplier 2
Price    $0.25   $0.55
Order Cost $1.00   $1.00
Holding Cost $0.02   (e)
Lead Time        1 week   1 week
Std. Dev. Of Lead Time     0.75   0
Optimal Order Quantity     (a)    (f)
ROP       (b)    (g)
Safety Stock         (c)   0
Total Cost, including Price and Safety Stock   (d)   (h)

1) What is the value of (a)?
2) What is the value of (b)?
3) What is the value of (c)?
4) What is the value of (d)?
5) What is the value of (e)?
6) What is the value of (f)?
7) What is the value of (g)?
8) What is the value of (h)?
9) Given your analysis, which supplier should the manufacturer use?
10) Give one additional consideration that the manufacturer should think about before choosing a supplier

In: Operations Management

43.   Economists would classify all the following as land except: a)   2000 acres of virgin land...

43.   Economists would classify all the following as land except:
a)   2000 acres of virgin land
b)   Crude oil reserves
c)   A hydro electric dam
d)   Iron ore deposits
44.   As a student of economics, when you speak of scarcity, you are referring to the ability of society to:
a)   Employ all of its resources
b)   Consume all that is produced
c)   Satisfy economic wants given scarce resources
d)   Continually make technological advances and increase production
45.   Airlines charge business travelers more than leisure travelers because there is more:
a)   Elastic supply of business travel
b)   Inelastic supply of business travel
c)   Elastic demand for business travel
d)   Inelastic demand for business travel
46.   For which product is the income elasticity of demand most likely to be negative:
a)   Computer software
b)   Used clothing
c)   Basketballs
d)   Bread
47.   For which product is the income elasticity of demand most likely to be positive: a) Re-treaded tires
b)   Cabbage
c)   Used clothing
d)   Computers
48.   A study reported that the coefficient of the cross elasticity of popcorn and potato chips is positive. Based on this report, you can conclude that popcorn and potato chips are: a) Normal goods
b)   Complementary goods
c)   Independent goods
d)   Substitute goods

Quantity   Total Utility-
Movies   Total Utility -
Books
1   50   22
2   80   42
3   100   52
4   110   57
5   116   60
6   121   62
7   123   63
Based on the table above:
49.   Suppose the price of Movies is $8 each and price of books is $20 each. If the consumer had $80 to spend, how much of each product should the consumer buy to achieve maximum total utility?
a)   7 movies and 4 books
b)   5 movies and 2 books
c)   4 movies and 2 books
d)   Cannot be determined
50.   If the price of the books fell to $10 and the price of movies stayed the same, he or she would purchase:
a)   The same amount of the two goods
b)   More books and fewer movies
c)   More books and more movies
d)   More books and the same amount of movies

In: Economics