QUESTION 60
Given the following Product structure:
struct Product {
string name;
double price;
int quantity;
bool equals(const Product&);
};
how would you define the equals function so two products are equal
if their names and prices are equal?
| a. |
bool equals(const Product& to_compare) { |
|
| b. |
bool Product::equals(const Product& to_compare)
{ |
|
| c. |
bool equals(const Product& to_compare) { |
|
| d. |
bool Product::equals(const Product& to_compare)
{ |
1.5 points
QUESTION 61
What are the values of the keys in the set named years after the
following code is executed?
set<int> years { 2016, 1985, 2001 };
years.insert(1992);
years.insert(2001);
auto iter = years.find(1985);
if (iter != years.end()) {
years.erase(iter);
}
| a. |
2016, 2001, 1992 |
|
| b. |
1992, 2001, 2016 |
|
| c. |
2016, 2001, 2001, 1992 |
|
| d. |
1992, 2001, 2001, 2016 |
1.5 points
QUESTION 62
The capacity of a vector indicates
| a. |
the number of elements it can currently store |
|
| b. |
the current size of the vector in bytes |
|
| c. |
the largest number of elements it can store |
|
| d. |
the number of elements it contains |
1.5 points
QUESTION 63
Which of the following is not a limitation of an array when compared with a vector?
| a. |
An array can’t increase its size automatically. |
|
| b. |
The size of an array must be known at compile time. |
|
| c. |
An array doesn’t use memory as efficiently as a vector. |
|
| d. |
An array doesn’t provide functions that let you modify its elements. |
1.5 points
QUESTION 64
A stack container provides
| a. |
last-in, first-out access |
|
| b. |
first-in, last-out access |
|
| c. |
last-in, last out access |
|
| d. |
first-in, first-out access |
1.5 points
QUESTION 65
Code Example 9-2
struct Phone {
int area_code;
int prefix;
int number;
};
struct Contact {
string name;
string email;
Phone phone;
};
(Refer to Code Example 9-2.) Given a Contact object named contact, what code would you use to assign values to the the data members of the Phone object for that contact?
| a. |
contact.phone.area_code = 555; |
|
| b. |
Phone phone; |
|
| c. |
Phone phone; |
|
| d. |
Phone phone; |
1.5 points
QUESTION 66
What is the easiest way to deploy a C++ program to a user’s computer?
| a. |
Copy the executable file to the user’s computer |
|
| b. |
Create a batch file that copies the program to the user’s computer and then run it |
|
| c. |
Create an installer program and then run it on the user’s computer |
|
| d. |
Copy the source code to the user’s computer and then compile it |
1.5 points
QUESTION 67
Which of the following statements is not true about structures?
| a. |
They include data members that must be fundamental data types. |
|
| b. |
They can include member functions that operate on the data members. |
|
| c. |
They define a data type. |
|
| d. |
They are typically used to organize related data. |
1.5 points
QUESTION 68
When you dereference an iterator, you get the value of the element that the iterator points to
True
False
1 points
QUESTION 69
A stack container provides last-in, first-out access
True
False
1 points
QUESTION 70
A deque container is a fixed-size collection of elements that’s stored in contiguous memory
True
False
In: Computer Science
we are talking about the mc68000 microprocessor
a) Explain possible scenarios that would set the V bit of the Status Register in signed number arithmetic operations b) Name 3 Internal Bus and explain their usage and functionality in a microcontroller c) Explain how the displacement is calculated and how the PC gets updated when branching to a subroutine using BSR instruction d) Why do we use MOVEQ or ADDQ instead of MOVE or ADD instruction? (Explain with an example)
In: Computer Science
In this experiment, we will explore fermentation. As you read Chapter 13, one of the fates of pyruvic acid can be the production of carbon dioxide and ethanol. The pyruvic acid is made from carbohydrate by glycolysis. By measuring the amount of CO2 made over time, you can measure the efficiency of glycolysis. The basic experiment is relatively simple. 1. Prepare a sample of carbohydrate in water. Take note of the concentration in % (use volume or weight). 2. Completely fill a small juice glass with the carbohydrate mixture. 3. Add yeast to the mixture. Start with 1.4 tsp. 4. Mix the carbohydrate, water, yeast mixture. If you spill some make sure the juice glass is filled to the brim. 5. Place a flat-bottom bowl over the juice glass. 6. Invert both the bowl and juice glass together, being careful not to spill the contents. Now the glass is upside down in the bowl. 7. Watch the glass for at least 2 hours, recording the size of the bubble formed every 15 minutes. The size of the bubble can be estimated by measuring the height of the bubble in cm. Multiply the height by (1/4)x(diameter in cm)x(diameter in cm) x pi. Pi is approximate 3.14. (V= h x pi x r^2). Run this experiment 4 times (Since there is a lot of waiting, you can start a second experiment after you get the first started). One experiment should be a control, using no carbohydrate. Vary only one variable. For example, one student might test sucrose (table sugar), Karo syrup, and honey. Another student might vary the concentration of carbohydrate; 5%, 10%, 15%. Another student might vary the temperature: in an ice bath, room temp, in a 100 degree F oven. This is a case where I would like to see you design your own experiment. Make a lab report of your own design. It should have the following components:
1. Introduction and Objectives.
2. Procedure (What did you do?).
3. Results in tabular form.
4. Conclusion ( What do your results mean in terms of what you have learned about enzyme kinetics, glycolysis, and carbohydrate metabolism?)
In: Other
Fully explain what the author means by "Pave the Planet or Wear Shoes."
Subverting Greed Chapter 3.
In: Psychology
QUESTION 4 Before determining the ?soltnH of the salts in part B of Experiment 4 it's necessary to calibrate the calorimeter to effective heat capacity of the calorimeter. In order to do this, the neutralisation of hydrochloric acid and sodium hydroxide is used, where the ?H for the reaction is known, along with the specific heat and density of sodium chloride, the product of the reaction. By following the example on page 4-4 of the manual and the steps laid out in the table below determine Ccalorimeter in J K-1. The information that you need is shown in the table below. Value Enthalpy change for one mole ( \Delta H ?H) -58.3 kJ mol-1
Density 1 M NaCl (?) 1.037 g mL-1
Specific heat of 1 M NaCl solution ( C C) 3.90 g-1 K-1
Molarity of sodium hydroxide(aq) and hydrochloric acid(aq) used ( c c) 2 mol L-1
Volume of each of sodium hydroxide(aq) and hydrochloric acid(aq) used ( V V) 50 mL
Average neutralisation temperature rise ( \Delta T ?T) 11.2 °C
Calculation
Moles of H2O produced n (mol) = c (mol L ?1 ) ×V (L)
Enthalpy change for the reaction ? r H (kJ) =n (mol) ×?H (kJ mol ?1 )
Enthalpy change for the corresponding temperature change ? t H (kJ) =?? r H (kJ)
Mass of solution m (g) =V (mL) ×? (g mL ?1 )
Heat capacity of the solution C solution (J K ?1 ) =m (g) ×C (J g ?1 K ?1 )
The heat capacity of the calorimeter ( C calorimeter)
In: Other
PLEASE ANSWER URGENT!!! A world wide fast food chain decided to carry out an experiment to assess the influence of income on number of visits to their restaurants or vice versa. A sample of 8 households was asked about the number of times they visit a fast food restaurant (V) during last month as well as their monthly income (I). The data presented in the following table are the sums and sum of squares. (use 2 digits after decimal point)
|
∑ I = 393 |
∑ I2 = 21027 |
∑ ( I-Ibar )2 = SSI = 1720.88 |
|
∑ V = 324 |
∑ V2 = 14272 |
∑ ( V-Vbar )2 = SSV = 1150 |
|
∑ IV = 17007 |
∑ [ ( I-Ibar )( V-Vbar) ] =SSIV=1090.5 |
a. Compute sample correlation coefficient. r=Answer
b. Test correlation coefficient for significance. (hint: ρ is population correlation coefficient)
Null Hypothesis is
| Ho: ρ>0 | Ho: ρ≥0 | Ho: ρ<0 | Ho: ρ≤0 |
Alternative Hypothesis is
| H1: ρ<0 | H1: ρ≥0 | H1: ρ>0 | H1: ρ≤0 |
Test statistic is ???<---- answer
Critical Value of the test at α=5% is ???<--- answer
Does your findings support the hypothesis that as income increases, number of visits also increases at 5% significance level?
| May be | Yes | No |
c. Find the linear regression equation of visits based on income.
Estimated visit = ?? + ?? Income
d. Find the linear regression equation of income based on visits.
Estimated income = ?? + ?? Visit
e. Which model is more deterministic? (hint: use coefficient of determination to decide)
Model in part (c)
Model in part (d)
They are equivalent
In: Statistics and Probability
A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1001 adults in the United States, "As a child, did you ever believe in Santa Claus, or not?" Of those surveyed, 84% said they had believed as a child. Consider the sample as an SRS. We want to estimate the proportion p of all adults in the United States who would answer that they had believed to the question "As a child, did you ever believe in Santa Claus, or not?" (a) Find a 90% confidence interval (± ± 0.0001) for p p based on this sample. The 90% confidence interval is from to (b) Find the margin of error (± ± 0.0001) for 90%. The margin of error is (c) Suppose we had an SRS of just 150 adults in the United States. What would be the confidence interval (± ± ) for 95% confidence? The 50% confidence interval is from to (d) How does decreasing the sample size change the confidence interval when the confidence level remains the same? Decreasing the sample size creates a less wide interval Decreasing the sample size creates a wider interval
In: Statistics and Probability
Santa Fe Retailing purchased merchandise “as is” (with no
returns) from Mesa Wholesalers with credit terms of 3/10, n/60 and
an invoice price of $24,900. The merchandise had cost Mesa $16,982.
Assume that both buyer and seller use a perpetual inventory system
and the gross method.
1. Prepare entries that the buyer records for the
(a) purchase, (b) cash payment within the discount period, and (c)
cash payment after the discount period.
2. Prepare entries that the seller records for the
(a) sale, (b) cash collection within the discount period, and (c)
cash collection after the discount period.
Journal entry worksheet
Record Santa Fe Retailing purchased merchandise “as is” (with no returns) from Mesa Wholesalers with credit terms of 3/10, n/60 and an invoice price of $24,900.
Record the merchandise had cost Mesa $16,982.
Record cash received within discount period.
Record cash received after discount period.
Note: Enter debits before credits.
I need the answers.
|
In: Accounting
A poll conducted by GfK Roper Public Affairs and Corporate Communications asked a sample of 1007 adults in the United States, "As a child, did you ever believe in Santa Claus, or not?" Of those surveyed, 84% said they had believed as a child. Consider the sample as an SRS. We want to estimate the proportion p of all adults in the United States who would answer that they had believed to the question "As a child, did you ever believe in Santa Claus, or not?"
(a) Find a 90% confidence interval (±±0.0001) for p based on this sample.
The 90% confidence interval is from __ to ___
b) Find the margin of error (±±0.0001) for 90%.
The margin error is ___
(c) Suppose we had an SRS of just 100 adults in the United States.
What would be the confidence interval (±±) for 95% confidence?
The 50 % confidence interval (+) is from __ to __
(d) How does decreasing the sample size change the confidence interval when the confidence level remains the same?
a. Decreasing the sample size creates a wider interval
b.Decreasing the sample size creates a less wide interval.
In: Math
Write at least three sentences in response to questions 2–4.
Article, Andrew Braaksma's "Some Lessons From the Assembly Line."
1. What article did you select for your critical analysis project? List the title and author here.
2. An author's purpose or goal is their reason for writing a work. Based on a literal reading of your selected article, what do you believe is the author's purpose? How did you arrive at that decision?
3. Key points are pieces of evidence that support the author's purpose. In your selected article, what are three key points that support the author's purpose that you identified in this reading? How do those key points support it?
4. An author's audience is the group (or groups) of people being addressed in the reading. What audience do you believe the author is writing for in your selected article? What potential challenges does the author face when addressing their purpose with this audience?
In: Economics