Questions
1. Explain in words why a regulator might want to sell as many permits as firms...

1. Explain in words why a regulator might want to sell as many permits as firms are willing to buy at some high price in a cap-and-trade system. Then explain why the regulator might offer to buy as many permits as firms are willing to sell at some low price in a cap-and-trade system.

In: Economics

1. Describe what a grounding wire does. ( In detail) 2. Is electrostatics a contact or...

1. Describe what a grounding wire does. ( In detail)

2. Is electrostatics a contact or field force? And how do we know that?

In: Physics

A train with six 80 K cars accelerates from a station at 4 ft/sec2. a What...

A train with six 80 K cars accelerates from a station at 4 ft/sec2.

a What torsion “T” is exerted on the support structure? What torsion is applied if another train coming into the station on the opposite track decelerates at the same rate?

b A 40’ wide, 5’ deep beam with top 30’ above street level supports the tracks beyond stations. To clear traffic and to light the street, it is a hammerhead supported by a 6’ diameter, 20’ tall solid reinforced concrete column (“J”). For the trains accelerating in opposite directions, find t max and angle of twist qat z = 0 ground level, using height L= 20’. The “J” of the hammerhead, beam and taper is ginormous.

In: Civil Engineering

Our accounting firm has won the engagement to be the new federal income tax consultant for...

Our accounting firm has won the engagement to be the new federal income tax consultant for a fortune 500 company. In the course of preparing the federal income tax returns for its tax year ending December 31, 2017, we reviewed the company's federal income tax returns for recent years. Our review discovered a large error in the company's computation of its domestic production activities deduction. The error is the result of misunderstanding the law, and was repeated on all of the recent returns. We have discussed the matter briefly and informally with the client, who has indicated that they would rather not file amended returns correcting the error. The client has also indicated that it would like a written analysis of the issue, including the chances of the issue being found by the IRS on audit and of the client prevailing on the matter if it winds up in court. To prepare for the next meeting with the client on this matter, we need to determine:

  • Under the IRS rules applicable to tax practitioners, what are our ethical obligations to the client and to the IRS with regard to these mistakes, the analysis requested by the client and our advice to the client?
  • Under the AICPA's standards, what are our ethical obligations to the client and to the IRS with regard to these mistakes, the analysis requested by the client and our advice to the client?

In: Accounting

Consider a particle with initial velocity v? that has magnitude 12.0 m/s and is directed 60.0...

Consider a particle with initial velocity v? that has magnitude 12.0 m/s and is directed 60.0 degrees above the negative x axis.

A) What is the x component v? x of v? ? (Answer in m/s)

B) What is the y component v? y of v? ? (Answer in m/s)

C) Now, consider this applet. Two balls are simultaneously dropped from a height of 5.0 m.How long tg does it take for the balls to reach the ground? Use 10 m/s2 for the magnitude of the acceleration due to gravity.

In: Physics

In C++ I just need a MAIN that uses the steps and uses the functions and...

In C++ I just need a MAIN that uses the steps and uses the functions and class given below.

Implement the BinarySearchTree ADT in a file BinarySearchTree.h exactly as shown below.

// BinarySearchTree.h
// after Mark A. Weiss, Chapter 4, Dr. Kerstin Voigt

#ifndef BINARY_SEARCH_TREE_H
#define BINARY_SEARCH_TREE_H

#include 
#include 
using namespace std;      

template 
class BinarySearchTree
{
  public:
    BinarySearchTree( ) : root{ nullptr }
    {
    }

    ~BinarySearchTree( ) 
    { 
        makeEmpty();
    }

    const C & findMin( ) const
    {
      assert(!isEmpty());
      return findMin( root )->element;
    }

    const C & findMax( ) const
    {
      assert(!isEmpty());
      return findMax( root )->element;
    }

    bool contains( const C & x ) const
    {
        return contains( x, root );
    }

    bool isEmpty( ) const
    {
        return root == nullptr;
    }

    void printTree( ) const
    {
        if( isEmpty( ) )
            cout << "Empty tree" << endl;
        else
            printTree( root );
    }

    void makeEmpty( )
    {
        makeEmpty( root );
    }
    
    void insert( const C & x )
    {
        insert( x, root );
    }     

    void remove( const C & x )
    {
        remove( x, root );
    }

  private:
    
    struct BinaryNode
    {
        C element;
        BinaryNode* left;
        BinaryNode* right;

        BinaryNode( const C & theElement, BinaryNode* lt, BinaryNode* rt )
          : element{ theElement }, left{ lt }, right{ rt } { }
    };

    BinaryNode* root;
    
    // Internal method to insert into a subtree.
    // x is the item to insert.
    // t is the node that roots the subtree.
    // Set the new root of the subtree.    
    void insert( const C & x, BinaryNode* & t )
    {
        if( t == nullptr )
            t = new BinaryNode{ x, nullptr, nullptr };
        else if( x < t->element )
            insert( x, t->left );
        else if( t->element < x )
            insert( x, t->right );
        else
            ;  // Duplicate; do nothing
    }
    
    // Internal method to remove from a subtree.
    // x is the item to remove.
    // t is the node that roots the subtree.
    // Set the new root of the subtree.    
    void remove( const C & x, BinaryNode* & t )
    {
        if( t == nullptr )
            return;   // Item not found; do nothing
        if( x < t->element )
            remove( x, t->left );
        else if( t->element < x )
            remove( x, t->right );
        else if( t->left != nullptr && t->right != nullptr ) // Two children
        {
            t->element = findMin( t->right )->element;
            remove( t->element, t->right );
        }
        else
        {
            BinaryNode* oldNode = t;
            t = ( t->left != nullptr ) ? t->left : t->right;
            delete oldNode;
        }
    }

    // Internal method to find the smallest item in a subtree t.
    // Return node containing the smallest item.    
    BinaryNode* findMin( BinaryNode* t ) const
    {
        if( t == nullptr )
            return nullptr;
        if( t->left == nullptr )
            return t;
        return findMin( t->left );
    }
    
    // Internal method to find the largest item in a subtree t.
    // Return node containing the largest item.
    BinaryNode* findMax( BinaryNode* t ) const
    {
        if( t != nullptr )
            while( t->right != nullptr )
                t = t->right;
        return t;
    }

    // Internal method to test if an item is in a subtree.
    // x is item to search for.
    // t is the node that roots the subtree.    
    bool contains( const C & x, BinaryNode* t ) const
    {
        if( t == nullptr )
            return false;
        else if( x < t->element )
            return contains( x, t->left );
        else if( t->element < x )
            return contains( x, t->right );
        else
            return true;    // Match
    }

    void makeEmpty( BinaryNode* & t )
    {
        if( t != nullptr )
        {
            makeEmpty( t->left );
            makeEmpty( t->right );
            delete t;
        }
        t = nullptr;
    }

    void printTree( BinaryNode* t) const
    {
        if( t != nullptr )
        {
            printTree( t->left);
            cout << t->element << " - ";
            printTree( t->right);
        }
    }
};
#endif

:Program your own file lab07.cpp in which your main() function will test the new data structure.

  • The main function is contained in the file lab07.cpp.
  • Declare an instance of BinarySearchTree (short: BST) suitable to hold integer values.
  • Prompt user to enter a random sequence of integer values, insert these values into the data structure (the entered values should NOT be in sorted order).
  • Call the printTree() member function in order to print out the values of the BST structure.
  • Prompt user to enter a random sequence of integer values, remove these values from your BST. Print out the reduced BST.
  • Add the following member function in your BinarySearchTree class template.
    public:
    
    void printInternal() 
    {
       print_Internal(root,0);
    }
    
    private:
    
    void printInternal(BinaryNode* t, int offset)
    {
       if (t == nullptr)
           return;
    
       for(int i = 1; i <= offset; i++) 
           cout << "...";
       cout << t->element << endl;
       printInternal(t->left, offset + 1);
       printInternal(t->right, offset + 1);
    }
    
  • Go back to your program lab07.cpp and call printInternal. Compile and run your program, and see what you get.

The expected result:

insert the values (stop when entering 0):
10 5 20 3 22 6 18 7 9 13 15 4 2 1 19 30 8 0
print the values:
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 13 - 15 - 18 - 19 - 20 - 22 - 30 - 
Print the tree:
10
...5
......3
.........2
............1
.........4
......6
.........7
............9
...............8
...20
......18
.........13
............15
.........19
......22
.........30
remove the values (stop when entering 0):
1 11 2 12 3 13 0
print the values:
4 - 5 - 6 - 7 - 8 - 9 - 10 - 15 - 18 - 19 - 20 - 22 - 30 - 
Print the tree:
10
...5
......4
......6
.........7
............9
...............8
...20
......18
.........15
.........19
......22
.........30

In: Computer Science

M11 Discussion - Data Security Data security is a concern every day for information technology professionals....

M11 Discussion - Data Security

Data security is a concern every day for information technology professionals. Users, even information technology professionals move data from point to point on a regular basis and often this requires some form of mobility. For this discussion, please address the points listed below. If you use web sources, include the complete URL to the article.

  • Think about your normal day. Describe how you use your smartphone, table, or laptop away from your home or office.
  • Now, refect on the possible areas in which your data could be breached, reviewed, copied, or stolen.
  • If you were an information technology professional, what are some of the things you would do to help prevent such data breaches?

Each student will be responsible for responding to the discussion question by Wednesday with a word count of at least 250 words.

In: Computer Science

Discuss the chemically impaired nurse/health care professional. Identify behaviors and actions that may signify chemical impairment...

Discuss the chemically impaired nurse/health care professional. Identify behaviors and actions that may signify chemical impairment in an employee or colleague. What risk factors result in an increased risk for chemical addiction in the nursing profession. What are your personal feelings/ experiences regarding the chemically impaired nurse/health care professional. How would your personal feelings affect your ability as a manager to address a chemically impaired employee.

In: Nursing

Many argue that CEOs of major public corporations receive exorbitant salaries. For example, Mr. Robert Iger,...

Many argue that CEOs of major public corporations receive exorbitant salaries. For example, Mr. Robert Iger, ex-CEO of Disney World received remuneration in excess of $ 35 million per year. Many others receive annual salaries and performance based bonuses that also include stock options. Drawing on agency theory, what is your opinion on this trend? Is it justifiable? Why or why not? What would an ideal formula be in terms of executive compensation for public firm CEOs?

In: Economics

A particular uncatalyzed reaction proceeds 200 times faster at 45 degrees celcius than at 0 degrees...

A particular uncatalyzed reaction proceeds 200 times faster at 45 degrees celcius than at 0 degrees celsius

A. Calculate the activation energy for the reaction

B. when the reaction at 45 degrees celsius is catalyzed, the reaction rate increases by a factor or 500. calculate the activation energy for the catalyzed reaction?

In: Chemistry

To monitor the breathing of a hospital patient, a thin belt is girded around the patient's...

To monitor the breathing of a hospital patient, a thin belt is girded around the patient's chest as in the figure below. The belt is a 160 turn coil. When the patient inhales, the area encircled by the coil increases by 40.0 cm2. The magnitude of earth's magnetic field is 50.0

In: Physics

Write a JAVA program that prompts the user to enter a character c that represents a...

Write a JAVA program that prompts the user to enter a character c that represents a binary digit (a bit!). (Recall that c can be only “0” or “1.”) Your program must use the character type for the input. If the user enters a character “x” that is not a bit, you must print out the following error message: “The character x is invalid: x is not a bit.” If the character c is a bit, your main program must print out its value in decimal. Example 1: If the user enters the character “0,” your program must print out the value 0. Example 2: If the user enters the character “1,” your program must print out the value 1. Example 3: If the user enters the character “B,” your program must print out the following error message: “The character B is invalid: B is not a bit.”

In: Computer Science

1.) First Question on Class – the class Circle Given the code below, modify it so...

1.) First Question on Class – the class Circle Given the code below, modify it so that it runs. This will require you to add a class declaration and definition for Circle. For the constructor of Circle that takes no arguments, set the radius of the circle to be 10. You are to design the class Circle around the main method. You may NOT modify the body of the main method in anyway, if you do your code WILL NOT BE ACCEPTED, AND WILL BE GRADED AS ALL WRONG. For this question, YOU MUST capture the output of a run of your program and submit it with your source code as your solution. (TIP: the formula to find the area of a Circle is pi times r squared, or PI * r * r).

#include using namespace std;

const float PI = 3.1416; i

nt main() {

Circle c1, c2, c3; c

1.setRadius(1.0);

c3.setRadius(4.5);

Circle circles[] = {c1, c2, c3};

for (int i = 0; i < 3; i++) {

float rad, diam, area;

Circle c = circles[i];

rad = c.getRadius();

diam = c.getDiameter();

area = c.getArea();

cout << "circle " << (i) << " has a radius of: " << rad << ", a diameter of: " << diam << ", and an area of: " << area << endl;

}

return 0;

The language is C++, thanks in advance

In: Computer Science

According to the judge, in the Fund of Funds case, Arthur Andersen could have chosen to...

According to the judge, in the Fund of Funds case, Arthur Andersen could have chosen to resign from the Fund of Funds engagement when it discovered the excessive prices being charged the mutual fund by King Resource. Arthur Andersen contended that resigning that point would not have benefited Fund of Funds. Do you agree? why or why not?

In: Accounting

QUESTION - smith and jones has $500,000 to invest. the company is trying to decide between...

QUESTION - smith and jones has $500,000 to invest. the company is trying to decide between two alternatives uses of the funds. the alternative follow. Any working capital for projects will be released at the end of the life of the project. The company's discount rate is 12%
A B
Cost of equipment required 400,000 250000
Required- working capital required 100,000 250000
annual cash inflows 150,000 120000
Which alternative would you recommend the company accept? repair required in year 2 10,000 15000
repair required in year 4 12,000 40000
Show all computation using net present value approach. salvage value of equipment 70,000 25000
life of the project 6 6
Prepare separate computation for each project.

In: Accounting