You have been approached by the Statistics Canada to create a C# program to calculate the...

You have been approached by the Statistics Canada to create a C# program to calculate the average salary of people with university degrees, college diplomas, and high school diplomas. Using a while loop, you are to process salary data until the user indicates that you should stop (there could be 0 or more data values). For each person processed, the program must first input an education type (char edType) (‘U’ or ‘u’ for university degrees, ‘C’ or ‘c’ for college diplomas, and ‘H’ or ‘h’ for high school) and then a salary (double salaryData). The program stops accepting input when the user enters a ‘Q’ or ‘q’ for quit (use a sentinel value while loop). Your main data processing loop should be conditioned on the fact that the user has not signalled quit. It might look something like:

while(char.ToUpper(edType) != ‘Q’)

This implies that like any sentinel value loop, you must seed the loop (input a value) PRIOR to entering the loop. Inside the loop the salary data is entered and processed. Once the main loop terminates, the average salary for each of the three education types should be printed out. Be sure to print an error message if the user enters an invalid education type or a negative salary.

In: Computer Science

What are the causes of terrorism? What efforts is the U.S. government making to prevent and...

What are the causes of terrorism? What efforts is the U.S. government making to prevent and control the spread of domestic terrorism and international terrorism? What do you think should be done that is not being done presently to help stop terrorism? ​

In: Psychology

What are the parts of the dye molecules that affect the Rf of the spots as...

What are the parts of the dye molecules that affect the Rf of the spots as they move up the tlc plate? Please list several and explain why using Lewis structures.

In: Chemistry

You are planning to buy a luxurious car. The retail price of the car is $65,000....

You are planning to buy a luxurious car. The retail price of the car is $65,000. Fox Auto is making you the following offer: You pay $10,000 down and then $2,000 a month for next 30 months. The APR is 12 percent (compounded monthly). This offer is equivalent to a _____ off the retail price (when paid in cash today).

In: Finance

Suppose there are 2 countries A and B. each country can produce two goods X and...

Suppose there are 2 countries A and B. each country can produce two goods X and Y. each country has 100 work units allocated to the production of goods X and Y Lx + Ly = 100
export the production capacity curves (PPFa, PPFb) for countries A and B

In: Economics

C++ #include <iostream> using namespace std; struct Node {     int data;     Node* next;   ...

C++

#include <iostream>

using namespace std;

struct Node {
    int data;
    Node* next;
  
    Node(){
        data = 0;
        next = NULL;
    }
  
    Node(int x){
        data = x;
        next = NULL;
    }
};


struct LinkedList {
    Node* head;
  
    LinkedList(){
        head = NULL;
    }
  
    void append(int value){
      
        if (head == NULL){
            head = new Node(value);
        }
        else{
          
            Node* newNode = new Node(value);
          
            Node* temp = head;
            while(temp->next != NULL){
                temp = temp->next;
            }


            temp->next = newNode;
        }
    }
  
    void insertAt(int index, int value) {
        // Provide your code here
    }
  
    int getValue(int index){
        // Provide your code here
    }
  
    void setValue(int index, int value){
        // Provide your code here
    }
  
    void print (){
        Node* temp = head;
      
        while (temp != NULL) {
            cout << temp->data << endl;
            temp = temp->next;
        }
    }
  
    ~LinkedList(){
        Node* temp = head;
      
        while(temp != NULL){
            temp = temp->next;
            delete head;
            head = temp;
        }
    }
};


int main(int argc, const char * argv[]) {
  
    LinkedList myList;
  
  
    for (int i = 0; i < 6; i++) {
        myList.append(i);
    }
  
    myList.insertAt(2, 77);
  
    myList.insertAt(10, 89);
  
    myList.append(101);
  
    myList.setValue(0, 11);
  
    cout << myList.getValue(2) << endl << endl;
  
    myList.print();
  
    //    Expected output:
    //    77
    //
    //    11
    //    1
    //    77
    //    2
    //    3
    //    4
    //    5
    //    0
    //    0
    //    0
    //    89
    //    101
  
    return 0;
}

The first function you are being asked to implement is int getValueAt(int index) . This function simply returns the value that appears in the array position specified by index .

The second function is void setValueAt(int index, int value) . Its job is to store value in the array position corresponding to index .

The last function to implement is void insertAt(int index, int value) . As the name suggests, it needs to insert the value at the index. It should not overwrite anything. If there is already a something stored at index , it should be shifted to the right. If index is larger than the current size of the list, then it needs to be resized in order to accomodate. If there is a gap between the old size of the list, and the newly inserted value, that gap should be filled with 0s

In: Computer Science

Consider the titration of 100.0 mL of 0.100 M NaOH with 1.00 M HBr. Find the...

Consider the titration of 100.0 mL of 0.100 M NaOH with 1.00 M HBr. Find the pH at the following volumes of acid added: Va = 0, 1.0, 2.5, 6.5, 9.9, 10.0, 10.1, and 11.5 mL.

In: Chemistry

250 to 350 words required In understanding the process of the rapid transformation of economic systems...

250 to 350 words required

In understanding the process of the rapid transformation of economic systems in many nations in the world from the beginning of the 1990s, briefly explain why the freedom to choose the right theoretical foundations still do matter to develop an appropriate economic system for economic growth and better income distribution of a society

In: Economics

Lunch Spending ($) = xi z-scores 28 10 1 15 8 6 10 6 Calculate the...

Lunch Spending ($) = xi

z-scores

28

10

1

15

8

6

10

6

  1. Calculate the z-scores (to two decimal places) for each observation and write the answers in the last column on the table above.
  2. According to Chebyshev’s Theorem, what percentage of the observations should be within 1 standard deviations of the mean? (Hint: be sure to word your answer correctly.) For this question, you do not need to use any data—this is a purely theoretical question asking what Chebyshev predicts for this situation.

In: Math

The Regal Cycle Company manufactures three types of bicycles—a dirt bike, a mountain bike, and a...

The Regal Cycle Company manufactures three types of bicycles—a dirt bike, a mountain bike, and a racing bike. Data on sales and expenses for the past quarter follow: Total Dirt Bikes Mountain Bikes Racing Bikes Sales $ 922,000 $ 266,000 $ 404,000 $ 252,000 Variable manufacturing and selling expenses 473,000 118,000 196,000 159,000 Contribution margin 449,000 148,000 208,000 93,000 Fixed expenses: Advertising, traceable 69,900 8,800 40,400 20,700 Depreciation of special equipment 43,500 20,500 7,800 15,200 Salaries of product-line managers 114,500 40,500 38,700 35,300 Allocated common fixed expenses* 184,400 53,200 80,800 50,400 Total fixed expenses 412,300 123,000 167,700 121,600 Net operating income (loss) $ 36,700 $ 25,000 $ 40,300 $ (28,600) *Allocated on the basis of sales dollars. Management is concerned about the continued losses shown by the racing bikes and wants a recommendation as to whether or not the line should be discontinued. The special equipment used to produce racing bikes has no resale value and does not wear out. Required: 1. What is the financial advantage (disadvantage) per quarter of discontinuing the racing bikes? 2. Should the production and sale of racing bikes be discontinued? 3. Prepare a properly formatted segmented income statement that would be more useful to management in assessing the long-run profitability of the various product lines.

In: Accounting

This is a microbial physiology question related to taxonomy, phylogeny, and physiology: Can you describe and...

This is a microbial physiology question related to taxonomy, phylogeny, and physiology:

Can you describe and apply techniques such as: Southern, Western, hybridization, genetic probes, ELISA, TLC, among others?

In: Biology

Let x be a random variable representing percentage change in neighborhood population in the past few...

Let x be a random variable representing percentage change in neighborhood population in the past few years, and let y be a random variable representing crime rate (crimes per 1000 population). A random sample of six Denver neighborhoods gave the following information. x 26 1 11 17 7 6 y 172 36 132 127 69 53 In this setting we have Σx = 68, Σy = 589, Σx2 = 1172, Σy2 = 72,003, and Σxy = 8920.

(e) For a neighborhood with x = 14% change in population in the past few years, predict the change in the crime rate (per 1000 residents). (Round your answer to one decimal place.) crimes per 1000 residents

(f) Find Se. (Round your answer to three decimal places.)

Se =

(g) Find an 80% confidence interval for the change in crime rate when the percentage change in population is x = 14%. (Round your answers to one decimal place.)

lower limit crimes per 1000 residents

upper limit crimes per 1000 residents

(h) Test the claim that the slope β of the population least-squares line is not zero at the 1% level of significance. (Round your test statistic to three decimal places.)

t =

Find or estimate the P-value of the test statistic.

P-value > 0.250

0.125 < P-value < 0.250

0.100 < P-value < 0.125

0.075 < P-value < 0.100

0.050 < P-value < 0.075

0.025 < P-value < 0.050

0.010 < P-value < 0.025

0.005 < P-value < 0.010

0.0005 < P-value < 0.005

P-value < 0.0005

Conclusion

Reject the null hypothesis, there is sufficient evidence that β differs from 0.

Reject the null hypothesis, there is insufficient evidence that β differs from 0.

Fail to reject the null hypothesis, there is sufficient evidence that β differs from 0.

Fail to reject the null hypothesis, there is insufficient evidence that β differs from 0.

(i) Find an 80% confidence interval for β and interpret its meaning. (Round your answers to three decimal places.)

lower limit

upper limit

Interpretation

For every percentage point increase in population, the crime rate per 1,000 increases by an amount that falls outside the confidence interval.

For every percentage point decrease in population, the crime rate per 1,000 increases by an amount that falls outside the confidence interval.

For every percentage point increase in population, the crime rate per 1,000 increases by an amount that falls within the confidence interval.

For every percentage point decrease in population, the crime rate per 1,000 increases by an amount that falls within the confidence interval.

In: Math

Freedom Co. purchased a new machine on July 2, 2016, at a total installed cost of...

Freedom Co. purchased a new machine on July 2, 2016, at a total installed cost of $43,000. The machine has an estimated life of five years and an estimated salvage value of $6,700.

Required:

a-1. Calculate the depreciation expense for each year of the asset's life using Straight-line depreciation.

Year Depreciation Expense
1
2
3
4
5

a-2. Calculate the depreciation expense for each year of the asset's life using Double-declining-balance depreciation.

Year Depreciation Expense
1
2
3
4
5

b. How much depreciation expense should be recorded by Freedom Co. for its fiscal year ended December 31, 2016, under each method? (Note: The machine will have been used for one-half of its first year of life.)

Depreciation Expense
Straight‑line
Double-declining balance

c. Calculate the accumulated depreciation and net book value of the machine at December 31, 2017, under each method.

Cost Accumulated Depreciation Net Book Value
Straight‑line $43,000
Double-declining‑balance 43,000

In: Accounting

A positive charge of magnitude Q1 = 9 nC is located at the origin. A negative...

A positive charge of magnitude Q1 = 9 nC is located at the origin. A negative charge Q2 = -9 nC is located on the positive x-axis at x = 18.5 cm from the origin. The point P is located y = 8.5 cm above charge Q2.

Calculate the x-component of the electric field at point P due to charge Q1. Write your answer in units of N/C.

Calculate the y-component of the electric field at point P due to charge Q1. Write your answer in units of N/C.

Calculate the y-component of the electric field at point P due to the Charge Q2. Write your answer in units of N/C.

Calculate the y-component of the electric field at point P due to both charges. Write your answer in units of N/C.

Calculate the magnitude of the electric field at point P due to both charges. Write your answer in units of N/C.

Calculate the angle in degrees of the electric field at point P relative to the positive x-axis.

In: Physics

You are interested in establishing a small business. Write a paper between 1,000 and 1,500 words...

You are interested in establishing a small business. Write a paper between 1,000 and 1,500 words discussing your small-business idea. Include the following:

1. Discuss your business and the product or service your small business provides.

2. Identify which accounting method (i.e. cash versus accrual) you plan to use for your business. Why did you select this choice?

3. List six business transactions you expect to incur with your company. State which accounts (from your chart of accounts) are impacted.

4. Discuss how each business transaction (see point 3) impacts your income statement, balance sheet and statement of cash flow.

5. Select one organization type (sole proprietorship, partnership, C-corporation, and S-corporation) for your company and explain why you selected this option.

In: Accounting