Questions
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

Isle Royale, an island in Lake Superior, has provided an important study site of wolves and...

Isle Royale, an island in Lake Superior, has provided an important study site of wolves and their prey. Of special interest is the study of the number of moose killed by wolves. In the period from 1958 to 1974, there were 296 moose deaths identified as wolf kills. The age distribution of the kills is as follows.

Age of Moose in Years Number Killed by Wolves
Calf (0.5 yr)
1-5
6-10
11-15
16-20
105
52
73
63
3

(a) For each age group, compute the probability that a moose in that age group is killed by a wolf. (Round your answers to three decimal places.)

0.5    
1-5    
6-10    
11-15    
16-20    


(b) Consider all ages in a class equal to the class midpoint. Find the expected age of a moose killed by a wolf and the standard deviation of the ages. (Round your answers to two decimal places.)

μ =
σ =

In: Math

Question 4 Part A: If you were to extract your own DNA would you expect it...

Question 4 Part A: If you were to extract your own DNA would you expect it to look different from your plant DNA extract? Why or why not?

In: Biology

DO NOT HARD CODE ANYTHING! Write a class that maintains the scores for a game application....

DO NOT HARD CODE ANYTHING!

Write a class that maintains the scores for a game application. Implement the addition and removal function to update the database. The gamescore.txt contains player’ name and score data record fields separated by comma. For Removal function, uses the name field to select record to remove the game score record.

Use the List.java, LList.java, Dlink.java, GameEntry.java and gamescore.txt found below

Read gamescore.txt to initialize the Linked list in sorted order by score.

Important****ASK the user to Remove, Add and update function to the sorted linked list.

Display “Name exist” when add an exist name to the list.

Display “Name does not exist” when remove a name not on the list.

List.java File:

/** Source code example for "A Practical Introduction to Data

Structures and Algorithm Analysis, 3rd Edition (Java)"

by Clifford A. Shaffer

Copyright 2008-2011 by Clifford A. Shaffer

*/

/** List ADT */

public interface List<E>

{

/**

* Remove all contents from the list, so it is once again empty. Client is

* responsible for reclaiming storage used by the list elements.

*/

public void clear();

/**

* Insert an element at the current location. The client must ensure that

* the list's capacity is not exceeded.

*

* @param item

* The element to be inserted.

*/

public void insert(E item);

/**

* Append an element at the end of the list. The client must ensure that

* the list's capacity is not exceeded.

*

* @param item

* The element to be appended.

*/

public void append(E item);

/**

* Remove and return the current element.

*

* @return The element that was removed.

*/

public E remove();

/** Set the current position to the start of the list */

public void moveToStart();

/** Set the current position to the end of the list */

public void moveToEnd();

/**

* Move the current position one step left. No change if already at

* beginning.

*/

public void prev();

/**

* Move the current position one step right. No change if already at end.

*/

public void next();

/** @return The number of elements in the list. */

public int length();

/** @return The position of the current element. */

public int currPos();

/**

* Set current position.

*

* @param pos

* The position to make current.

*/

public void moveToPos(int pos);

/** @return The current element. */

public E getValue();

}

LList.java File:

/**

* Source code example for "A Practical Introduction to Data Structures and

* Algorithm Analysis, 3rd Edition (Java)" by Clifford A. Shaffer Copyright

* 2008-2011 by Clifford A. Shaffer

*/

// Doubly linked list implementation

class LList<E> implements List<E>

{

private DLink<E> head; // Pointer to list header

private DLink<E> tail; // Pointer to last element in list

protected DLink<E> curr; // Pointer ahead of current element

int cnt; // Size of list

// Constructors

LList(int size)

{

this();

} // Ignore size

LList()

{

curr = head = new DLink<E>(null, null); // Create header node

tail = new DLink<E>(head, null);

head.setNext(tail);

cnt = 0;

}

public void clear()

{ // Remove all elements from list

head.setNext(null); // Drop access to rest of links

curr = head = new DLink<E>(null, null); // Create header node

tail = new DLink<E>(head, null);

head.setNext(tail);

cnt = 0;

}

public void moveToStart() // Set curr at list start

{

curr = head;

}

public void moveToEnd() // Set curr at list end

{

curr = tail.prev();

}

/** Insert "it" at current position */

public void insert(E it)

{

curr.setNext(new DLink<E>(it, curr, curr.next()));

curr.next().next().setPrev(curr.next());

cnt++;

}

/** Append "it" to list */

public void append(E it)

{

tail.setPrev(new DLink<E>(it, tail.prev(), tail));

tail.prev().prev().setNext(tail.prev());

cnt++;

}

/** Remove and return current element */

public E remove()

{

if (curr.next() == tail)

return null; // Nothing to remove

E it = curr.next().element(); // Remember value

curr.next().next().setPrev(curr);

curr.setNext(curr.next().next()); // Remove from list

cnt--; // Decrement the count

return it; // Return value removed

}

/** Move curr one step left; no change if at front */

public void prev()

{

if (curr != head) // Can't back up from list head

curr = curr.prev();

}

// Move curr one step right; no change if at end

public void next()

{

if (curr != tail.prev())

curr = curr.next();

}

public int length()

{

return cnt;

}

// Return the position of the current element

public int currPos()

{

DLink<E> temp = head;

int i;

for (i = 0; curr != temp; i++)

temp = temp.next();

return i;

}

// Move down list to "pos" position

public void moveToPos(int pos)

{

assert (pos >= 0) && (pos <= cnt) : "Position out of range";

curr = head;

for (int i = 0; i < pos; i++)

curr = curr.next();

}

public E getValue()

{

// Return current element

if (curr.next() == tail)

return null;

return curr.next().element();

}

// reverseList() method that reverses the LList

public void reverseList()

{

LList<E> revList = new LList<E>();

curr = tail.prev();

while (curr != head)

{

revList.append(curr.element());

curr = curr.prev();

}

head.setNext(revList.head.next());

}

// Extra stuff not printed in the book.

/**

* Generate a human-readable representation of this list's contents that

* looks something like this: < 1 2 3 | 4 5 6 >. The vertical bar

* represents the current location of the fence. This method uses

* toString() on the individual elements.

*

* @return The string representation of this list

*/

public String toString()

{

// Save the current position of the list

int oldPos = currPos();

int length = length();

StringBuffer out = new StringBuffer((length() + 1) * 4);

moveToStart();

out.append("< ");

for (int i = 0; i < oldPos; i++)

{

if (getValue() != null)

{

out.append(getValue());

out.append(" ");

}

next();

}

out.append("| ");

for (int i = oldPos; i < length; i++)

{

out.append(getValue());

out.append(" ");

next();

}

out.append(">");

moveToPos(oldPos); // Reset the fence to its original position

return out.toString();

}

}

DLink.java File:

/** Source code example for "A Practical Introduction to Data

Structures and Algorithm Analysis, 3rd Edition (Java)"

by Clifford A. Shaffer

Copyright 2008-2011 by Clifford A. Shaffer

*/

/** Doubly linked list node */

class DLink<E>

{

private E element; // Value for this node

private DLink<E> next; // Pointer to next node in list

private DLink<E> prev; // Pointer to previous node

/** Constructors */

DLink(E it, DLink<E> p, DLink<E> n)

{

element = it;

prev = p;

next = n;

}

DLink(DLink<E> p, DLink<E> n)

{

prev = p;

next = n;

}

/** Get and set methods for the data members */

DLink<E> next()

{

return next;

}

DLink<E> setNext(DLink<E> nextval)

{

return next = nextval;

}

DLink<E> prev()

{

return prev;

}

DLink<E> setPrev(DLink<E> prevval)

{

return prev = prevval;

}

E element()

{

return element;

}

E setElement(E it)

{

return element = it;

}

}

GameEntry.java File:

public class GameEntry {
protected String name;
protected int score;

public GameEntry(String n, int s) {
name = n;
score = s;
}

public String getName() {return name;}

public int getScore() {return score;}

public String toString() {
return "("+name+","+score+")";
}

}

gamescore.txt File:

Mike,1105
Rob,750
Paul,720
Anna,660
Rose,590
Jack,510

In: Computer Science