Write a program that asks the user for 10 integers, then prints all integers, followed by the largest integer.
CPP. ONLY!!
In: Computer Science
Explain why the Atlantic exhibits the anomalous northward heat transport in the southern hemisphere
In: Physics
Consider the following sample data.
| Sample A: | 10, 17, 24 |
| Sample B: | 68, 75, 82 |
| Sample C: | 1,035; 1,042; 1,049 |
(a) Find the mean and standard deviation for each
sample.
| Sample A: | Sample B: | Sample C: | |
| Mean | |||
| Sample Standard Deviation | |||
(b) What does this exercise show about the
standard deviation?
____The idea is to illustrate that the standard deviation is not a function of the value of the mean.
____The idea is to illustrate that the standard deviation is a function of the value of the mean.
In: Math
What are some examples of ethos, pathos, and logos in the selected text>
The NAACP believes the tea party is racist. The tea party believes the NAACP is racist. And Pat Buchanan got into trouble recently by pointing out that if Elena Kagan is confirmed to the Supreme Court, there will not be a single Protestant Justice, although Protestants make up half the U.S. population and dominated the court for generations.
Forty years ago, as the United States experienced the civil rights movement, the supposed monolith of White Anglo-Saxon Protestant dominance served as the whipping post for almost every debate about power and status in America. After a full generation of such debate, WASP elites have fallen by the wayside and a plethora of government-enforced diversity policies have marginalized many white workers. The time has come to cease the false arguments and allow every American the benefit of a fair chance at the future.
I have dedicated my political career to bringing fairness to America's economic system and to our work force, regardless of what people look like or where they may worship. Unfortunately, present-day diversity programs work against that notion, having expanded so far beyond their original purpose that they now favor anyone who does not happen to be white.
In an odd historical twist that all Americans see but few can understand, many programs allow recently arrived immigrants to move ahead of similarly situated whites whose families have been in the country for generations. These programs have damaged racial harmony. And the more they have grown, the less they have actually helped African-Americans, the intended beneficiaries of affirmative action as it was originally conceived.
How so?
Lyndon Johnson's initial program for affirmative action was based on the 13th Amendment and on the Civil Rights Act of 1866, which authorized the federal government to take actions in order to eliminate "the badges of slavery." Affirmative action was designed to recognize the uniquely difficult journey of African-Americans. This policy was justifiable and understandable, even to those who came from white cultural groups that had also suffered in socio-economic terms from the Civil War and its aftermath.
The injustices endured by black Americans at the hands of their own government have no parallel in our history, not only during the period of slavery but also in the Jim Crow era that followed. But the extrapolation of this logic to all "people of color"—especially since 1965, when new immigration laws dramatically altered the demographic makeup of the U.S.—moved affirmative action away from remediation and toward discrimination, this time against whites. It has also lessened the focus on assisting African-Americans, who despite a veneer of successful people at the very top still experience high rates of poverty, drug abuse, incarceration and family breakup.
Those who came to this country in recent decades from Asia, Latin America and Africa did not suffer discrimination from our government, and in fact have frequently been the beneficiaries of special government programs. The same cannot be said of many hard-working white Americans, including those whose roots in America go back more than 200 years.
Contrary to assumptions in the law, white America is hardly a monolith. And the journey of white American cultures is so diverse (yes) that one strains to find the logic that could lump them together for the purpose of public policy.
The clearest example of today's misguided policies comes from examining the history of the American South.
The old South was a three-tiered society, with blacks and hard-put whites both dominated by white elites who manipulated racial tensions in order to retain power. At the height of slavery, in 1860, less than 5% of whites in the South owned slaves. The eminent black historian John Hope Franklin wrote that "fully three-fourths of the white people in the South had neither slaves nor an immediate economic interest in the maintenance of slavery."
The Civil War devastated the South, in human and economic terms. And from post-Civil War Reconstruction to the beginning of World War II, the region was a ravaged place, affecting black and white alike.
In 1938, President Franklin Roosevelt created a national commission to study what he termed "the long and ironic history of the despoiling of this truly American section." At that time, most industries in the South were owned by companies outside the region. Of the South's 1.8 million sharecroppers, 1.2 million were white (a mirror of the population, which was 71% white). The illiteracy rate was five times that of the North-Central states and more than twice that of New England and the Middle Atlantic (despite the waves of European immigrants then flowing to those regions). The total endowments of all the colleges and universities in the South were less than the endowments of Harvard and Yale alone. The average schoolchild in the South had $25 a year spent on his or her education, compared to $141 for children in New York.
Generations of such deficiencies do not disappear overnight, and they affect the momentum of a culture. In 1974, a National Opinion Research Center (NORC) study of white ethnic groups showed that white Baptists nationwide averaged only 10.7 years of education, a level almost identical to blacks' average of 10.6 years, and well below that of most other white groups. A recent NORC Social Survey of white adults born after World War II showed that in the years 1980-2000, only 18.4% of white Baptists and 21.8% of Irish Protestants—the principal ethnic group that settled the South—had obtained college degrees, compared to a national average of 30.1%, a Jewish average of 73.3%, and an average among those of Chinese and Indian descent of 61.9%.
Policy makers ignored such disparities within America's white cultures when, in advancing minority diversity programs, they treated whites as a fungible monolith. Also lost on these policy makers were the differences in economic and educational attainment among nonwhite cultures. Thus nonwhite groups received special consideration in a wide variety of areas including business startups, academic admissions, job promotions and lucrative government contracts.
Where should we go from here? Beyond our continuing obligation to assist those African-Americans still in need, government-directed diversity programs should end.
Nondiscrimination laws should be applied equally among all citizens, including those who happen to be white. The need for inclusiveness in our society is undeniable and irreversible, both in our markets and in our communities. Our government should be in the business of enabling opportunity for all, not in picking winners. It can do so by ensuring that artificial distinctions such as race do not determine outcomes.
Memo to my fellow politicians: Drop the Procrustean policies and allow harmony to invade the public mindset. Fairness will happen, and bitterness will fade away.
Mr. Webb, a Democrat, is a U.S. senator from Virginia.
In: Psychology
This is C++. I would like to know the TODO list comments.
#include <cstdlib>
#include <iostream>
// TODO: 2. (1 point) Declare your Acker function prototype
below:
// When done, commit with the commit message that follows,
being
// sure to delete all these TODO instructions before
actuallly
// executing the git commit command.
//
// CSC232-HW02 - Added Aker function prototype.
//
// Don't forget to fully document the function prototype
using
// all the appropriate doxygen elements.
/**
* @brief Entry point to this application.
* @remark You are encouraged to modify this file as you see fit to
gain
* practice in using objects.
*
* @param argc the number of command line arguments
* @param argv an array of the command line arguments
* @return EXIT_SUCCESS upon successful completion
*/
int main(int argc, char **argv) {
// TODO: 4. (0.5 points) Replace *** text ***
with actual call to Acker
// function. When done, commit with the commit
message that follows,
// being sure to delete all these TODO
instructions before actuallly
// executing the git commit command.
//
// CSC232-HW02 - Display calculated Acker
value.
//
std::cout << "Acker(1, 2) = " <<
"*** replace me with call to Acker***"
<<
std::endl;
return EXIT_SUCCESS;
}
// TODO: 3. (2 points) Define the Acker recursive function below.
When done,
// commit with the commit message that follows, being sure to
delete
// all these TODO instructions before actually executing the
git
// commit command.
//
// CSC232-HW02 - Implemented Acker function.
// TODO: 5. (1 point) Do a box trace of Acker(1, 2) using pen and
paper.
// Hand this in at the beginning of class on Friday, 17 February
2017.
// Your solution MUST be legible; no points are assigned to
illegible
// papers.
This is testRunner.
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/Test.h>
#include <cppunit/TestFailure.h>
#include <cppunit/portability/Stream.h>
/**
* @brief Main test driver for CPPUNIT test suite.
* @remark DO NOT MODIFY THE SPECIFICATION OR IMPLEMENTATION OF THIS
CLASS! ANY
* MODIFICATION TO THIS CLASS WILL RESULT IN A GRADE OF 0 FOR THIS
LAB!
*/
class ProgressListener : public CPPUNIT_NS::TestListener {
public:
ProgressListener()
: m_lastTestFailed(false) {
}
~ProgressListener() {
}
void startTest(CPPUNIT_NS::Test *test) {
CPPUNIT_NS::stdCOut()<< test->getName();
CPPUNIT_NS::stdCOut()<< "\n";
CPPUNIT_NS::stdCOut().flush();
m_lastTestFailed =
false;
}
void addFailure(const
CPPUNIT_NS::TestFailure& failure) {
CPPUNIT_NS::stdCOut()<< " : " << (failure.isError() ?
"error" : "assertion");
m_lastTestFailed =
true;
}
void endTest(CPPUNIT_NS::Test *test) {
if
(!m_lastTestFailed)
CPPUNIT_NS::stdCOut() << " : OK";
CPPUNIT_NS::stdCOut()<< "\n";
}
private:
/// Prevents the use of the copy
constructor.
ProgressListener(const ProgressListener&
copy);
/// Prevents the use of the copy operator.
void operator=(const ProgressListener&
copy);
private:
bool m_lastTestFailed;
};
int main() {
// Create the event manager and test
controller
CPPUNIT_NS::TestResult controller;
// Add a listener that colllects test
result
CPPUNIT_NS::TestResultCollector result;
controller.addListener(&result);
// Add a listener that print dots as test
run.
ProgressListener progress;
controller.addListener(&progress);
// Add the top suite to the test runner
CPPUNIT_NS::TestRunner runner;
runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
runner.run(controller);
// Print test in a compiler compatible
format.
CPPUNIT_NS::CompilerOutputter
outputter(&result, CPPUNIT_NS::stdCOut());
outputter.write();
return result.wasSuccessful() ? 0 : 1;
}
In: Computer Science
A particle is found to carry the kinetic energy, K=(γ−1)mc2, which is equal to the energy of a photon. If the speed of the particle is v=0.500c, find the ratio of the wavelength of the photon to the de Broglie wavelength of the particle.
In: Physics
What kinds of systems might be valuable targets in information warfare? Create a prioritized list of targets and describe the kinds of damage that could result if these systems were attacked. Provide a minimum of 3 paragraphs.
In: Computer Science
Suppose you observe the following situation:
|
Security |
Beta |
Expected Return |
|
Pete |
1.60 |
12.9% |
|
Repete |
0.97 |
9.5% |
Assume these securities are correctly priced. Based on the CAPM,
what is the expected return on the market? What is the risk-free
rate?
Shows all the step and formula. Don't round off until you get the
answer.
In: Finance
pseudocode
display "Please enter first name: " input fName display "Please enter middle initial (Enter space if none): " input mName display "Please enter last name: " input lName display "Enter hours worked: " input hours display "Enter hourly rate: " input perHourRate weeklySalary = hours * perHourRate output "fName mName. lName" output weeklySalary
Question 1. Move your algorithm/pseudocode/outline into Code:Blocks and create a "shell" program. (The shell program shouldn't do any of the final work, but it should have comments where the final code will go and should compile and run.)
In: Computer Science
A battery charger used to recharge the NiMH (nickel metal-hydride) batteries used in a digital camera can deliver as much as 0.35 A of current to each battery. If it takes 145 minutes to recharge one battery, how much Ni(OH)2 (in grams) is oxidized to NiO(OH)?
H2O(l) + e? + NiO(OH)(s) ? OH?(aq) + Ni(OH)2(s)
In: Chemistry
Given this scenario, determine and map out the relevant cash flows for capital budgeting. Then use Excel to build your spreadsheet for the 10-year calculations, and after developing your estimates of each year's cash flow under the two scenarios, use the NPV method to determine what decision the company should make regarding the factory. Assume a 9% cost of capital. Explain your answer, and turn in the spreadsheet detailing your calculations.
In: Finance
Case study #2
Digestive system
Ms. K, age 79yrs old, has developed a partial obstruction in her colon. She was having difficulty with bowel movements and was nauseated, anorexic, and dehydrated. Surgery revealed diverticulitis with considerable fibrosis causing the obstruction. A colostomy was required.
Diverticulitis - Diverticulosis happens when pouches (diverticula (Links to an external site.)Links to an external site.) form in the wall of the colon (Links to an external site.)Links to an external site.. If these pouches get inflamed or infected, it is called diverticulitis (Links to an external site.)Links to an external site.. Diverticulitis can be very painful.
In: Anatomy and Physiology
The choices describe possible scenarios and outcomes from Gram staining with standard stains (e.g., crystal violet and safranin). Match the scenario with the most likely outcome and explain why this occurs.
|
A. A gram-negative cell is stained, but the ethanol step is skipped. |
i. The cell will probably appear pink, which will not correctly indicate its cell wall structure. |
|
B. A gram-positive cell with a severely damaged cell wall is stained. |
ii. The cell will appear pink. |
|
C. A healthy gram-negative cell is stained. |
iii. The cell will appear purple/violet. |
|
D. A healthy gram-positive cell is stained. |
iv. The cell will probably appear purple/violet, which will not correctly indicate its cell wall structure. |
In: Biology
Synthesis of Lidocaine. Write out a scheme for each of the reactions with the mass of each reagent calculate the theoretical yield for each reaction. Use the theoretical yield of the first reaction as the starting material mass of the second reaction.
In: Chemistry
Selected year-end financial statements of Cabot Corporation follow. (All sales were on credit; selected balance sheet amounts at December 31, 2016, were inventory, $46,900; total assets, $239,400; common stock, $88,000; and retained earnings, $44,140.) CABOT CORPORATION Income Statement For Year Ended December 31, 2017 Sales $449,600 Cost of goods sold 296,850 Gross profit 152,750 Operating expenses 99,500 Interest expense 4,000 Income before taxes 49,250 Income taxes 19,840 Net income $29,410 CABOT CORPORATION Balance Sheet December 31, 2017 Assets Liabilities and Equity Cash $18,000 Accounts payable $17,500 Short-term investments 8,800 Accrued wages payable 4,800 Accounts receivable, net 33,800 Income taxes payable 3,300 Notes receivable (trade)* 5,000 Merchandise inventory 40,150 Long-term note payable, secured by mortgage on plant assets 70,400 Prepaid expenses 2,500 Common stock 88,000 Plant assets, net 149,300 Retained earnings 73,550 Total assets $257,550 Total liabilities and equity $257,550 * These are short-term notes receivable arising from customer (trade) sales. compute the following: (6)debt-to-equity ratio, (7) times interest earned, (8) profit margin ratio, (9) total asset turnover, (10) return on total assets, and (11) return on common stockholders' equity
In: Accounting