Select all the answers that apply to modular design:
1. |
A module may not refer to other modules. |
|
2. |
Modular design is an important part of procedural programming. |
|
3. |
Modular design identifies the components of a program that can be developed independently. |
|
4. |
Each module consists of a set of logical constructs that are related to one another. |
/////////////////////
Place the following parts of a function header into their correct order:
- 1. 2. 3. 4. 5.
closing parenthesis
- 1.
2. 3.
4. 5.
return type
- 1.
2. 3.
4. 5.
type parameters
- 1.
2. 3.
4. 5.
opening parenthesis
- 1.
2. 3.
4. 5.
identifier
//////////////////////////////
Select all of the following statements that are true about function coupling.
It is preferable that each module complete it's own calculations and does not pass control to another module. |
||
A module that receives a value and returns the tax owing on that value using a sliding scale is highly coupled. |
||
The less information that passes between the module and the other modules the better the design. |
||
A module that receives 2 dates and returns the number of days between the dates is highly coupled. |
||
Coupling describes the degree of interrelatedness of a module with other modules. |
//////////////////////////////////////////
A function that does not return anything must declare the return type as void and is not required to have a return statement, however it is considered a best practice to include "return;" as the last line anyway.
True
False
/////////////////////////////////////////
Consider the following code:
#include<stdio.h>
void addTwo(int* param1, int* param2)
{
*param1 -= 2;
*param2 += 3;
return;
}
int main(void)
{
int arg1 = 5, arg2 = 7;
addTwo(&arg1, &arg2);
printf("arg1 = %d and arg2 = %d\n", arg1,
arg2);
return 0;
}
Select all of the following answers which are true:
1. |
This call would cause a run time error: addTwo(arg1, arg2); |
|
2. |
addTwo(&arg1, &arg2); |
|
3. |
addTwo(&arg1, &arg2); |
|
4. |
The ability to pass pointers to functions allows us to code functions that can change 2 or more variables when the function is executed. |
/////////////////////////////////////////////////////////
Consider this C program:
#include<stdio.h>
void addOne(int *in)
{
*in += 1;
return;
}
int main(void)
{
int arg1 = 4;
addOne(&arg1);
printf("The value stored in arg1 is %d\n",
arg1);
return 0;
}
Select from the following answers all that are true:
1. |
addOne(&arg1); When this function call executes the address of arg1 is stored inside the pointer named in. |
|
2. |
*in += 1; Adds 1 to the value stored at the address held inside the pointer in. |
|
3. |
printf("The value stored in arg1 is %d\n", arg1); |
|
4. |
When the function addOne() finishes execution the statement return; is required to return control to main() |
|
5. |
When the function addOne runs, the pointer variable in stores a copy of the value stored in arg1. |
//////////////////////////////////////////////////////////
The following tasks could be performed in one cohesive module:
True
False
///////////////////////////////////////////
Consider the following code:
#include<stdio.h>
int addThese(int arg1, int arg2)
{
return arg1 + arg2;
}
int main(void)
{
int sum1 = 2, sum2 = 3, answer = 0;
answer = addThese(sum1, sum2);
printf("%d\n", answer);
return 0;
}
Select all of the following statements which are true.
arg1 and arg2 are parameters |
||
sum1 and sum2 are arguments |
||
sum1 and sum2 are parameters |
||
arg1 and arg2 are arguments |
/////////////////////////////////////
We can access the data in a variable through either the variable name or by dereferencing its address.
True
False
////////////////////////////////////////
Consider this code snippet:
int x = 0;
int *p = &x;
*p = 79567;
After this code snippet runs the address of x is set to 79567.
True
False
/////////////////////////////////////
A function that does not receive any data when called has no parameters and must use the term void in the parameter list.
True
False
//////////////////////////////////////////////////////////////////
Order the following statements so they represent the correct order of operation of the following program:
#include<stdio.h>
int main(void)
{
printf( "Hello world!\n");
return 0;
}
- 1. 2. 3. 4.
the printf function outputs "Hello world!" followed by a new line
- 1.
2. 3.
4.
main() returns control to the OS, with value zero(0)
- 1.
2. 3.
4.
printf() returns control to main()
- 1.
2. 3.
4.
main() transfers control to printf()
///////////////////////////////////////////////////////////////////////////////////
The following tasks could be performed in one cohesive module:
True
False
///////////////////////////////////////////////////////
Every variable in a C program has a unique address.
True
False
////////////////////////////////////////////////////////////////
A pointer variable is not strongly typed, which means that the address of a floating point variable may be stored in an int type pointer.
True
False
In: Computer Science
Greener Grass Fertilizer Company plans to sell 250,000 units of finished product in July and anticipates a growth rate in sales of 5 percent per month. The desired monthly ending inventory in units of finished product is 80 percent of the next month’s estimated sales. There are 200,000 finished units in inventory on June 30. Each unit of finished product requires 5 pounds of raw material at a cost of $1.75 per pound. There are 780,000 pounds of raw material in inventory on June 30.
Required:
Compute the company’s total required production in units of finished product for the entire three-month period ending September 30. (Round all intermediate calculations and your final answer to the nearest unit.)
Independent of your answer to requirement (1), assume the company plans to produce 680,000 units of finished product in the three-month period ending September 30, and to have raw-material inventory on hand at the end of the three-month period equal to 25 percent of the use in that period. Compute the total estimated cost of raw-material purchases for the entire three-month period ending September 30.
In: Accounting
Example 6-2 John Jenkins earns $1,290 per week. The deductions from his pay were: FIT $116.00 FICA—OASDI 79.98 FICA—HI 18.71 State income tax 31.00 State disability insurance 9.03 Credit union deduction 40.00 Health insurance premium 47.50 Charitable contribution 5.00 John’s disposable earnings would be: $1,290.00 - $116.00 (FIT) - $79.98 - $18.71 (FICA deductions) - $31.00 (SIT) - $9.03 (disability insurance) = $1,035.28 Example 6-3 Huffman Company has a child support order outstanding on one of its employees (Charles Suffert—$170 per week). Charles Suffert's disposable income is $950 per week. A new garnishment is received for a $5,000 debt to a credit card company. The company would take an additional $237.50 out of Suffert's pay. Lesser of: 25% × $950 = $237.50 or $950 − (30 × $7.25) = $732.50 Kalen O'Brien earned $735 this week. The deductions from her pay were as follows: FIT $74.00 FICA-OASDI 45.57 FICA-HI 10.66 State income tax 36.75 State disability insurance 8.41 Health insurance premium 19.60 Credit union contribution 37.00 United Fund contribution 5.00 O'Brien's employer just received a garnishment order (credit card debt of $3,330) against her pay. Compute the following; round your answers to the nearest cent. a. O'Brien's disposable earnings: $ b. The amount of her pay subject to the garnishment: $
In: Accounting
In: Operations Management
Suppose the installation time in hours for a software on a laptop has probability density function f(x) = (4/3) (1 − x3 ), 0 ≤ x ≤ 1.
(a) Find the probability that the software takes between 0.3 and 0.5 hours to be installed on your laptop.
(b) Let X1, . . . , X30 be the installation times of the software on 30 different laptops. Assume the installation times are independent. Find the probability that the average installation time is between 0.3 and 0.5 hours. Cite the theorem you use.
(c) Instead of taking a sample of 30 laptops as in the previous question, you take a sample of 60 laptops. Find the probability that the average installation time is between 0.3 and 0.5 hours. Cite the theorem you use.
In: Math
Why are companies using less mass media and rather adding more specialized (including social media and public relations) and highly targeted media?
Reference
Kotler, P., & Armstrong, G. (2016). Principles of Marketing (16th ed.).
In: Operations Management
In: Psychology
It is given that the effective rate of interest for the n-th year period is in = 0.01 + e^(−n)
(a) Find a(t) for t being an integer.
(b) If the principal is $100, find the total amount of interest earned in year 3, 4 and 5.
In: Finance
In: Psychology
A loan amortization schedule allows you to see the amount you are paying towards interest and the outstanding balance of the loan. Since the amount of interest is based on the outstanding principal, you can compute the interest portion directly by multiplying the interest rate by the beginning of the period outstanding balance. When you subtract interest from the overall payment, you see the portion being applied towards the principal, which reduces the ending period outstanding balance, which hence becomes the beginning of the period balance period for the next time period.
Required:
How many times have you been provided an amortization schedule when applying for a loan? Why do you think amortization schedules are important? How should the government mandate loan information disclosure? Write 300 words.
Please write in your own words. Please don't copy from anywhere. Thank You!
In: Finance
Car and Truck Expense. (Obj. 3)Keith is self-employed. During 2018, he drove his car a total of 9,169 miles for work. He drove a total of 21,468 miles during the year. His car expenses for the year were as follows.
Business parking and tolls 360
Depreciation 1475
Gas 2557
Insurance 940
License tags 50
Repairs and maintenance 52
5434
a. Compute Keith’s car expense deduction using the standard mileage rate.
b. Compute Keith’s car expense deduction using the actual cost method.
In: Accounting
Over the past 6 years, Elk County Telephone has paid the dividends shown in the following table. he firm's dividend per share in
2020 is expected to be $1.27
2019 $1.22
2018 $1.17
2017 $1.12
2016 $1.08
2015 $1.04
2014 $1.00
a. If you can earn 11% on similar-risk investments, what is the most you would be willing to pay per share in 2019, just after the $1.22 dividend?
b. If you can earn only 8% on similar-risk investments, what is the most you would be willing to pay per share?
c. Compare your findings in parts a and b, what is the impact of changing risk on share value?
In: Math
1. Identify tools for analyzing financial statements and ratios for computing a company's profitability. (Please don't plagiarize)
In: Accounting
10.12 A bank with a branch located in a commercial district of a city has the business objective of developing an improved process for serving customers during the noon-to-1 P.M. lunch period. Management decides to first study the waiting time in the current process. The waiting time is defined as the number of minutes that elapses from when the customer enters the line until he or she reaches the teller window. Data are collected from a random sample of 15 customers and stored in Bank1. These data are:
4.21 | 5.55 | 3.02 | 5.13 | 4.77 | 2.34 | 3.54 | 3.20 |
4.50 | 6.10 | 0.38 | 5.12 | 6.46 | 6.19 | 3.79 |
Suppose that another branch, located in a residential area, is also concerned with improving the process of serving customers in the noon-to-1 p.m. lunch period. Data are collected from a random sample of 15 customers and stored in Bank2. These data are:
9.66 | 5.90 | 8.02 | 5.79 | 8.73 | 3.82 | 8.01 | 8.35 |
10.49 | 6.68 | 5.64 | 4.08 | 6.17 | 9.91 | 5.47 |
a. Assuming that the population variances from both banks are equal, is there evidence of a difference in the mean waiting time between the two branches? (Use α=0.05.α=0.05. alpha equals , 0.05.)
b. Determine the p-value in (a) and interpret its meaning.
c. In addition to equal variances, what other assumption is necessary in (a)?
d. Construct and interpret a 95% confidence interval estimate of the difference between the population means in the two branches.
In: Math
A population of values has a normal distribution with μ = 194 μ = 194 and σ = 13.4 σ = 13.4 . You intend to draw a random sample of size n = 127 n = 127 . Find the probability that a single randomly selected value is greater than 197.3. P(X > 197.3) = Find the probability that a sample of size n = 127 n = 127 is randomly selected with a mean greater than 197.3. P(M > 197.3) = Enter your answers as numbers accurate to 4 decimal places. Answers obtained using exact z-scores or z-scores rounded to 3 decimal places are accepted.
In: Math