Questions
Copy d_state.h to your working directory and finish its implementation. Write a program: it first declares...

  1. Copy d_state.h to your working directory and finish its implementation.
  2. Write a program:
    • it first declares a set object s having 5 elements of type stateCity with its initial values such as ("Virginia", "Richmond");
    • then perform the search: input the name of a state, and use the find() function to determine where the state in the set. If the object is present, used the << operator to output the sate and the city; if it is not present, output a message to that effect.
    • Then, rather than using objects of type stateCity, you will implement the program by using a map with state name (string) as the key and the city name (string) as the data value.

d_state.h:

#ifndef STATECITY_CLASS
#define STATECITY_CLASS

#include 
#include 

using namespace std;

// object stores the state name and city in the state
class stateCity
{
        public:
                stateCity (const string& name = "", const string& city = "");

                // output the state and city name in the format
                //    cityName, stateName
                friend ostream& operator<< (ostream& ostr, const stateCity& state;
                
                // operators < and == must be defined to use with set object.
                // operators use only the stateName as the key
                friend bool operator< (const stateCity& a, const stateCity& b);
                
                friend bool operator== (const stateCity& a, const stateCity& b);
        
        private:
                string stateName, cityName;
};

#endif  // STATECITY_CLASS

Please write in C++



Sample Output:

Run 1:

Enter a state: Arizona
Phoenix, Arizona

Run 2:

Enter a state: New York
New York is not in the set

In: Computer Science

1.Why is the epigenome considered our second genome? 2.How does epigenetics differ from traditional genetics? from...

1.Why is the epigenome considered our second genome?

2.How does epigenetics differ from traditional genetics? from epigenomics?

3.Explain how epigenetic events play a role in aging

4.Explain how epigenetic events control the formation of euchromatin and heterochromatin

5.Explain how epigenomics studies are conducted.

Please answer all questions in detail. Thank you

In: Biology

We are testing people to see if the rate of use of seat belts has changed...

We are testing people to see if the rate of use of seat belts has changed from a previous value of 82%. Suppose that in our random sample of 75 people, we see that 66 have the seat belt fastened. The researcher is interested in α = 0.1 level test.

Step 1 State the null and alternative hypotheses.

Step 2 Write down the appropriate test statistic and the rejection region of your test (report z critical(s))

Step 3 Compute the value of the test statistic (z observed)

Step 4: State your conclusion (in one sentence, state whether or not the test rejects the null hypothesis and in another sentence apply the results to the problem).

Step 5: Compute the p- value for this test. State your decision.

In: Statistics and Probability

A botanist has developed a new hybrid cotton plant that can withstand insects better than other...

A botanist has developed a new hybrid cotton plant that can withstand insects better than other cotton plants. However, there is some concern about the germination of seeds from the new plant. To estimate the probability that a seed from the new plant will germinate, a random sample of 3000 seeds was planted in warm, moist soil. Of these seeds, 2060 germinated.

(a) Use relative frequencies to estimate the probability that a seed will germinate. What is your estimate? (Enter your answer to 3 decimal places.)


(b) Use relative frequencies to estimate the probability that a seed will not germinate. What is your estimate? (Enter your answer to 3 decimal places.)


(c) Either a seed germinates or it does not. What is the sample space in this problem? SELECT

germinate

germinate or not germinate   

not germinate

Do the probabilities assigned to the sample space add up to 1? Should they add up to 1? Explain.

a) Yes, because they cover the entire sample space.

b)Yes, because they do not cover the entire sample space.   

c) No, because they cover the entire sample space.

d) No, because they do not cover the entire sample space.


(d) Are the outcomes in the sample space of part (c) equally likely? (SELECT)

yes

no    

In: Statistics and Probability

Self-Awareness Activity 2: You are a member in the student council. After reading information about the...

Self-Awareness

Activity 2:

You are a member in the student council. After reading information about the importance of self-awareness, how does self-awareness align people's behavior with their values and lead them to make better life choices, you also decide to develop an intervention for your peer group in the student counsel. The goal of your intervention is to help them increase their own self-awareness. Design a realistic program that students could use in order to increase their self-awareness. Write down your intervention plans/ strategies you will use to train them.

Activity: 3

Narrate 2 scenarios from your life where you used Defense Mechanism and name them. Explain why you had to react respectively.

In: Psychology

MAT 117 Problem Set 1                               Name: ___________________________ Directions: Show al

MAT 117 Problem Set 1                               Name: ___________________________

Directions: Show all work and explain your thinking as you solve these problems or write the explanations. Each problem is worth five points.

1. Below are definitions of different math number concepts. Write the concept that goes with each description. (no explanation needed for this problem only).

Concept

Definition

Include integers, all fractions pq, where p and q are integers with q≠0, all repeating and all terminating decimals.

Sometimes referred to as the counting numbers.

Include the natural numbers and 0.

A number in the form c x 10n, where 1≤ c < 10 and n is an integer. Used to represent numbers that are large or small in absolute value.

Include the natural numbers, their opposites, and 0.

Can be written as nonrepeating, non-terminating decimals; cannot be a rational number, if a square root of a positive integer is not an integer, it is this number.

Any number that can be expressed in standard (decimal) form. Include the rational numbers and irrational numbers.

2. Explain the difference between the expressions 6x0 and (6x)0. If there is no difference, explain why.

Grading: 2 points: Worked out Problem Mathematically; 3 points: Explanation

3. For a recent year, the United States consumed about 1.0 x 104 of petroleum per second. (Source: U.S. Energy Information Administration)

How many gallons of petroleum did the United States use that year?

Show work for all intermittent steps and Explain each step used to get your answer.

Grading: 1 point: Correct Answer; 2 points: Work; 2 points: Explanation

4. State whether the following statement is true and explain why or why not: A trinomial is always a higher degree than a monomial. Give an example proving your answer is correct.

Grading: 2 points: Correct Answer; 2 points: Explanation; 1 point: Example

5. Explain why x+ 7 is a polynomial, but x+7 is not a polynomial.

Grading: 5 points: Complete explanation

In: Advanced Math

What is a real-life example where you can use the concept or reflection, or the law...

What is a real-life example where you can use the concept or reflection, or the law of reflection, to determine something useful about your physical surroundings? What is a real-life application of refraction? Describe some real-life examples where diffraction and interference affect your daily life.

In: Physics

Bearer Instruments FACTS: Eligo Gaitan borrowed the funds to buy real property in Downers Grove, Illinois,...

Bearer Instruments

FACTS: Eligo Gaitan borrowed the funds to buy real property in Downers Grove, Illinois, and signed a note payable to Encore Credit Corp. Encore indorsed the note in blank. Later, when Gaitan defaulted on the payments, an action to foreclose on the property was filed in an Illinois state court by U.S. Bank, N.A. The note was in the bank’s possession, but there was no evidence that the note has been transferred or negotiated to the bank.

ISSUE: Can U.S. Bank enforce payment of the note? Why? Or Why Not?
[U.S. Bank National Associate v. Gaitan, 2013 TL App (2d) 120102-U, 2013 WL 160378 (2013)]

DECISION: Two to three sentences answering the case questions.

LEGAL REASONS: 2-3 paragraphs in detail to support your DECISION.

In: Accounting

Assume the following spot prices and that they equal the futures prices for September delivery. Soybeans           ...

Assume the following spot prices and that they equal the futures prices for September delivery.

Soybeans            $10.625 per bushel

Soybean Meal    $319.90 per ton

Soybean Oil        $.3798 per pound

a.       Calculate the gross profit margin (GPM) in dollars and percentage from crushing one bushel of soybeans.

b.       Does a bushel of soybean produce a greater amount of soy meal or soy oil? Quantify your answer.

c.       In looking at the prices above, note that the soybeans are substantially higher (about 3 X higher) than the price for a bushel of corn. Why (from a purely economic reason) would a farmer grow corn when soybeans command such a higher price?

d.       Describe the risk of a soybean processor who will be crushing 100,000 bushels in late September, and how they would hedge that risk with a 1-1-1 soybean crush spread. Quantify and describe the hedge in detail, i.e., long or short for each leg.

e.       Quantify the amounts the hedger above may be under or over-hedged with a 1-1-1 crush spread. Explain.

In: Finance

Strategic Marketing: Porter’s Value Chain is made up of Primary Stages and Support Activities. Use a...

Strategic Marketing:

Porter’s Value Chain is made up of Primary Stages and Support Activities.

Use a matrix to show how Porter’s Value Chain can be used to make decisions about which of Porter’s Generic Strategies is appropriate for a company to use.

To do this, set up a table that lists each of Porter’s Generic Strategies as a column heading and each of the primary stages and support activities of Porter’s Value Chain as rows.

Fill in the appropriate cells to explain where the value chain analysis may provide insights into the different strategy type options.

Use examples to aid your description.

Word-count: 500 words maximum.

In: Operations Management