Reference no: EM131010290
Short answer (You must type your answers)
1) Given double[ ] abc = new double[N], where N is an integer number. Identify:
a) array type
b) array name
c) the index of the first element
d) the name of the first element
e) the index of the last element
f) the name of the last element
g) the index of the 5th element
h) the number of elements in the array
Programming
1. Create three arrays of int with the same size (you choose the size). Input two of them from keyboard and addthe two arrays (element by element) and store the array of sums to the third array and output it to the console.
For example: {1, 2, 3} + {4, 5, 6} will result in the array of {5, 7, 9}
2. Generate an array of 10,000 random numbers (GPAs) from zero to four. Report the percentage of each of the numbers (0, 1, 2, 3, and 4) in the array.
3. A company has 10 stores. Input the annual sales for each store. Find the store with the maximum sales, the one with the minimum sales, and find the average annual sales for the 10 stores. Print the maximum, minimum sales and their store index, and average sales.
Submission:
• Your answers to the "Short answer" questions. Your answers must follow the questions.
• Source code for the Programming questions
• Screenshots of program running page.
Suppose no new common stock was issued or retired
: ABC Inc.’s December 31, 201 0 balance sheet showed total common equity of $4,000,000 and 200,000 shares of stock outstanding. During 2011, the firm had $450,000 of net income, and it paid out $1 5 0,000 as dividends. Suppose no new common stock was i..
|
Who is coming in to consult with her about a divorce
: Your supervising attorney runs late in court and asks you to meet with a potential client who is coming in to consult with her about a divorce. The client Jane arrives with her parents Sue and Bob, and tells you the following story. Jane and Jim have..
|
Quantitative assessment of glenohumeral translation
: The paper "Quantitative Assessment of Glenohumeral Translation in Baseball Players" (TheAmerican Journal of Sports Medicine [2004]: 1711-1715) considered various aspects of shoulder motion for a sample of pitchers and another sample of position playe..
|
Why you think that the researchers included a control group
: Why would it be important to determine if the researchers assigned the women participating in the study at random to one of the two groups? Explain why you think that the researchers included a control group in this study.
|
Create three arrays of int with the same size
: A company has 10 stores. Input the annual sales for each store. Find the store with the maximum sales, the one with the minimum sales, and find the average annual sales for the 10 stores. Print the maximum, minimum sales and their store index, and..
|
A local bank has two saving options
: A local bank has two saving options. One offers 6% interest compound on a daily bases while the other offers 6.5% compounded quarterly. Which saving option would you choose?
|
Determine where the power station should be located
: Determine where the power station should be located if the sum of the squares of the distances from each community to the site is minimized.
|
What is the future value-retirement goal is to accumulate
: What is the future value of $4000 in 5 years if it is invested at an interest rate of 6.00%? Suppose your retirement goal is to accumulate $400 in 2.5 years. How much do you need to deposit in the bank today to meet your goal if the bank offers an in..
|
Investigating the effect of a drug
: Suppose that you were interested in investigating the effect of a drug that is to be used in the treatment of patients who have glaucoma in both eyes. A comparison between the mean reduction in eye pressure for this drug and for a standard treatme..
|