memo

I need someone to help to fix my Proposal Memo(single-spaced, memo format). I will upload the instruction for this assignment.

and I only need you to write 50 words.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

cap 485 w2 resolving conflict

CAP-485 Integrated Capstone

Week 2 – Resolving Conflict

Two Parts to this assignment:

Part I:

Answer the DQ’s in 50 words or more (be specific):

You and a co-worker rarely see eye to eye. Tomorrow, your co-worker will yell at you for the first time. With what tools will you approach this confrontation? How will the tools that you choose impact your response?

Part II:

Assignment Detail:

  • Describe a conflict that was resolved and considered a “win–win” resolution within your current or past working environment that involved you or someone with whom you directly worked.
  • Research effective conflict resolution strategies
  • Prepare a 15 slide PowerPoint presentation (excluding title and references slides) that includes the following:

  • Describe the communications involved during the conflict.
  • Identify the method(s) used to resolve the workplace conflict.
  • Determine strategies implemented to help facilitate a “win–win” resolution to the problem.
  • How did these compare to the ones that you researched?
  • Explain how the resolution strategies and processes that were used could also be used for future conflicts within the workplace or similar environment.
  • Include speaker notes of around 75 words per slide

Note: the slides are short bullet points; and the speaker notes must be at least 75 words each.

  • Format your paper using APA formatting
  • Include a minimum of two scholarly sources
 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

statistics homework help 10

1. Eighty-five mall customers were randomly surveyed across the state to determine if the live entertainment provided had increased the amount of money they spent. Can the probability be found by using the binomial probability formula? Why or why not?

(1 point)

a. No. The trials are fixed, but the events are independent and the 5% guideline does not apply to this situation.

b. Yes. The events are dependent; however, the 5% guideline can be applied to this situation.

c. Yes. The outcomes can be classified into two categories: the trials are fixed, and the events are independent.

d. No. The events are dependent.

2. A local community college determines the probability that a student will reenroll for a second year is 0.91. A representative surveys 100 random first-year students and asks them if they will be enrolling for the next year. What is the probability that exactly 91 of them will enroll? (1 point)

a 0.138 b. 1.000 c. 0.910 d. 0.276

3. You roll a die 100 times, interested in finding the number of rolls that come up even. Which of the following reasons is needed to satisfy the requirements for a binomial distribution? (1 point)

aEach outcome is easily obtainable.

bThe number of times you roll the die is greater than 1.

cEach of the 100 outcomes can be placed in one of two categories of outcomes.

dEach roll of the die has 2 equally likely outcomes.

4. A bag contains 40 jellybeans with 5 dierent colors. Each color is equally represented. You are interested in randomly drawing one jellybean at a time and checking the color before eating it. You want to know how many red jelly beans you will pull out of the bag during the first 10 draws. Can the probability be found by using the binomial probability formula? Why or why not? (1 point)

aYes. The trials are fixed and the probability of success remains the same for every trial.

bNo. The events are dependent, and the 5% guideline cannot be applied to this situation.

cNo. The trials are fixed, but the events are independent.

dYes. The events are dependent; however, the 5% guideline can be applied to this situation.

5. You flip a coin 10 times. Knowing that the event satisfies the requirements for a binomial distribution, find the probability that exactly 7 of the outcomes are heads. (1 point) a. 0.120 b. 0.001 c.0.117

6. The probability of drawing a heart from a standard deck of cards is 0.25. You record the card you draw and return the card before shuling to ensure a binomial distribution. If you do this 20 times, what is the probability that you will draw a heart 7 times? (1 point) 0.888 0.001 0.112 0.473

7. Assume that a procedure yields a binomial distribution with a trial that is repeated 10 times. Use the binomial probability formula to find the probability of 6 successes given that a single success has a probability of 0.30. (1 point) 0.400 0.368 0.037 0.600

8. The probability of rolling a sum of 7 when rolling two dice simultaneously is 0.167. You decide to test that probability by rolling the dice 12 times. What is the probability that exactly 2 of the rolls is a sum of 7? (1 point) 0.296 0.167 1.000 0.636

9. A student randomly draws a card from a standard deck and checks to see if it is his favorite suit. He then returns the card to the deck, shules, and repeats the experiment. He performs the experiments 30 times. Can the probability of drawing his favorite suit be found by using the binomial probability formula? Why or why not? (1 point)

aYes. The events are dependent; however, the 5% guideline can be applied to this situation.

bNo. The trials are fixed, but the probability of success changes for every trial.

cNo. The probability of success remains the same for every trial, but the trials are not fixed.

dYes. The outcomes can be classified into two categories, the trials are fixed, and the events are independent.

10. Assume that a procedure yields a binomial distribution with a trial that is repeated 5 times. Use the binomial probability formula to find the probability of 2 successes given that a single success has a probability of 0.712. (1 point) 0.205 0.121 0.012 0.879

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

discussion board 538

The Distinction Between Leadership
and Management

Think of the managers you have reported to thus far in your career. Now consider the people you have worked with or know of that you would consider leaders. Based on these experiences, what would you surmise about the responsibilities of managers and leaders and about the distinctions between these two categories in health care settings?

This week’s Learning Resources classify management and leadership (which are often confused in everyday discussion) and explain their significance for health care organizations. As you advance professionally, it is critical to understand the distinctions between management and leadership and how you can apply this knowledge for increasing effectiveness in your workplace.

To prepare:

  • Review the information in the Learning Resources.
  • Conduct additional research on your own and select at least two current, credible sources that contribute to your understanding of management and leadership.
  • Reflect on how the roles of management and leadership differ in supporting the organization to set and achieve goals.
  • Drawing upon specific examples from a current or previous practice setting, bring to mind someone who seemed to be a leader but not a manager and someone who seemed to be a manager but not a leader (generally speaking, or within a specific circumstance). Be prepared to support your assessment with specific behavioral descriptions found in the literature.

By Day 3

Post an analysis of how management and leadership roles differ in terms of supporting an organization to set and achieve goals. In addition, post descriptions of an individual who demonstrates leadership behaviors but not management behaviors and an individual who demonstrates management behaviors but not leadership behaviors. Provide your rationale, identifying specific characteristics of effective managers and leaders. (Note: Do not identify these individuals by name, position, or location.)

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

essay ghuh

Book: Glass castle by Jeanette Walls

Did the main character janette meet two of Maslows hierarchy of needs?

Define the needs .

What literary devices did she use to prove her point?

FORMAT:

INTRO

NEED 1 and 5 quotes in body paragraph 1

NEED 2 and 5 quotes in body paragraph 2

CONCLUSION

3 pages, 12 font, double spaced

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

assignment 3 77

Please review lesson on “Customer Relationship Developmental Stages” and review how to write an essay.

Video http://youtu.be/Ae3EVQdjeGY

Presentation slides https://docs.google.com/presentation/d/1vMUd88t-ZAZGys1buPxZSNOoUL-hzoX5BhxqS8XSJno/edit?usp=sharing

Based on my book https://docs.google.com/file/d/0B5hAidGqjpfnMjZHbWVOalpmcEU/edit?usp=sharing

Review how to write an essay:

Directions:

Please discuss the topic of customer relationship management (CRM) stages from the presentation shared in a 5-paragraph essay.

Be sure to include why using CRM well is important and what the stages (p.22, 24-26) are. Explain how understanding the customer’s emotional stage and status is a key component to CRM.

Please include 5 cited facts and a 5+ references list.

Rubric:

  1. Please discuss the topic of customer relationship management (CRM) stages in a 5-paragraph essay based on the presentation.
  2. Be sure to include why using CRM well is important and what the stages are.
  3. Explain how understanding the customer’s emotional stage and status is a key component to CRM.
  4. Please include 5 cited facts.
  5. 5+ references list.
 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

case study 878

Instructions

For this final unit, you will prepare a four- to five-page paper, excluding the title and reference pages, examining U.S. security strategies and foreign policy as it relates to the country of your choice (excluding the United States). This paper should be written as if you are the U.S. Secretary of State and preparing a report on the country to determine U.S. policy and action.

You will need to discuss the impact of globalization and how it affects your target country, its partners, and its enemies. You should also address the following:

  • The relationship between foreign policy decisions and security operations;
  • How potential policy decisions might impact international politics;
  • Your recommendations, as U.S. Secretary of State, for future interactions, policy, and security.

Feel free to incorporate other political science concepts and ideas from other units in the course. Your paper may utilize any resource used in the course. You may also reference news articles if you desire. All references must be properly cited in APA format.

Textbook: Parsons, C. (2017). Introduction to political science: How to think for yourself about politics. Boston, MA: Pearson.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

rate of return for stocks and bonds 26

Can somebody put these problems in a excel spread sheet I need to be able to see the formulas, the work is done I just need them in a excel spread sheet calculations need to be seen.In either case, students are to show your work—formulas/inputs/ answer. If you submit in Excel, the formulas can be used to solve in Excel, thus showing your work.

  1. “A stock has an initial price of $100 per share, paid a dividend of $2.00 per share during the year, and had an ending share price of $125. Compute the percentage total return, capital gains yield, and dividend yield.”

1a) Percentage total return = (Dividends paid + Change in market value) / Initial stock price

Percentage total return = ($2 + ($125-$100))/ $100 = $27 / $100 = 0.27 or 27%

1b) Capital gains yield = (Ending share price – Initial share price)/Initial share price

Capital gains yield = ($125 – $100) / $100 = $25 / $100 = .25 or 25%

1c) Dividend yield = Dividend per share earn during the year / the initial stock price

Dividend yield = $2.00 / $100 = 0.02 or 2%

Total Return

  1. “You bought a share of 4 percent preferred stock for $100 last year. The market price for your stock is now $120. What was your total return for last year?”

Total return = (Dividend paid + Change in market value) / Initial stock price

Total return = ((4% x $100) + ($120 – $100)) / $100 = ($4 + $20) / $100 = 0.24 or 24%

CAPM

  1. “A stock of a beta of 1.20 the expected market rate of return is 12% and a risk-free rate of 5 percent. What is the expected rate of return of the stock?”

Expected rate of return = Risk-free rate + (Beta x (Expected market rate – Risk-free rate))

Expected rate of return = 5% + (1.20 x (12% – 5%) = 5% + (1.20 x 7%) = 5% + 8.4%

Expected rate of return = 13.4%

WACC

  1. “The Corporation has a targeted capital structure of 80% common stock and 20% debt. The cost of equity is 12% and the cost of debt is 7%. The tax rate is 30%. What is the company’s weighted average cost of capital (WACC)?”

WACC = (Weight of Equity x Cost of Equity x (1 – Tax rate)) + (Weight of Debt x Cost of debt)

WACC = (80% x 12% x (1 – 30%)) + (20% x 7%) = (6.72% + 1.4%) = 8.12%

FLOTATION COSTS

  1. “Medina Corp. has a debt-equity ratio of .75. The company is considering a new plant that will cost $125 million to build. When the company issues new equity, it incurs a flotation cost of 10 percent. The flotation cost on new debt is 4 percent. What is the initial cost of the plant if the company raises all equity externally?”

% of Debt = 0.75 / (1+0.75) = 42.86%

% of Equity = 100% – % of Debt = 100% – 42.86% = 57.14%

A) Plant funded through debt: 42.86% x $125 million = $53,575,000

B) Flotation cost on Debt = $53,575,000 x 4% = $2,143,000

C) Plant funded through equity: 57.14% x $125 million = $71,425,000

D) Flotation cost on equity = $71,425,000 x 10% = $7,142,500

E) Total Flotation cost = $2,143,000 + $7,142,500 = $9,285,5000

F) Initial Cost = $125,000,000 + $9,285,5000 = $134,285,500

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

java soft deletion in trees

JAVA

Soft Deletion in Trees

Understand the Problem

Understand the Classes

You are going to be changing the general tree class template,

FHtree
, of the lectures by adding a single member to it:

   boolean deleted; // true if the node has been removed from the tree

The idea is that when a client asks this class to delete a node, all we will do is set this boolean to true and return without further ado.

You will have to rename the classes from FHtreeNode and FHtree (from the lectures) to FHsdTreeNode and FHsdTree, respectively, to distinguish them from the normal-deletion implementations in those lectures.

That’s it in a nutshell. The purpose of this new, deleted,

member
is to avoid ever physically removing a node when the client wants to delete it.

Instead
we just set deleted = true and it will be considered “gone”.

Of course, this is like passing a law. Unless everyone obeys the law, it won’t have any effect. So we have to modify most of the methods to take advantage of it.

Some might be easier, some not. For example, remove() may be simpler and shorter than before, since, once it finds the node, all it has to do is set deleted = true — no actual unlinking of the nodes, destruction of objects, etc. Other methods, like find(), will be more subtle. Finding a node means more than matching the data ( if (x.equals(root.data)) … ). Even though we might find the data, x, in the tree, this does not mean x is really there. It may have been deleted at some point in the past. Remember: now, deleting it leaves it physically in the tree with the deleted flag set. You have to add a second test, if (deleted) …, before you know whether or not you have really found x. Same thing with display(), size(), etc. They will only report on the virtual tree, not the physical one that is stored in memory. If a node is deleted, it may not be counted or displayed by the various methods.

On the other hand, there will be some new methods that don’t have general tree counterparts.

sizePhysical
()
will report on the size of the tree, counting both deleted and non-deleted nodes (so it will basically be exactly our old size()method. displayPhysical() will likewise show everything, including deleted nodes (it will not be required to show the deleted status for this assignment, although that’s a nice touch). displayPhysical(), also, can be engineered to reuse the code of the old display() method since that method, by virtue of its ignorance of the newly added deleted flag, already shows all the nodes.

In soft deletion, trees don’t normally ever shrink; they keep getting larger. Even though the client may be adding and removing the same number of objects, the add()s will always add nodes, but the remove()s will never take nodes away, just mark them as deleted. This is the meaning and expected

behavior
of soft deletion. It is used when normal deletion (which we can now call hard or physical deletion to emphasize the difference) has some disruptive effect on the tree and we want to avoid such physical disruption for some reason.

[When we get to binary trees and probing hash tables in the next course, we will be able to re-use the deleted nodes when a

client wants
to add something that is physically present but marked as deleted. However, for general trees, this refinement is both trickier and less useful, so there is no need for us to burden ourselves with that technique.]

Finally, we will need a collectGarbage() method that goes through the entire tree and physically removes all deleted nodes. This is the only method that will shrink the tree size and bring its physical and virtual contents, at least temporarily, into alignment.

For your convenience, the complete listing of the hard-deletion-based general tree presented in the lectures can

he
downloaded here

FHtree.java

public class FHtree<E> implements Cloneable
{
protected int mSize;
protected FHtreeNode<E> mRoot;

public FHtree() { clear(); }
public boolean empty() { return (mSize == 0); }
public int size() { return mSize; }
public void clear() { mSize = 0; mRoot = null; }

public FHtreeNode<E> find(E x) { return find(mRoot, x, 0); }
public boolean remove(E x) { return remove(mRoot, x); }
public void display() { display(mRoot, 0); }

public < F extends Traverser< ? super E > >
void traverse(F func) { traverse(func, mRoot, 0); }

public FHtreeNode<E> addChild( FHtreeNode<E> treeNode, E x )
{
// empty tree? – create a root node if user passes in null
if (mSize == 0)
{
if (treeNode != null)
return null; // error something’s fishy. treeNode can’t right
mRoot = new FHtreeNode<E>(x, null, null, null);
mRoot.myRoot = mRoot;
mSize = 1;
return mRoot;
}
if (treeNode == null)
return null; // error inserting into non_null tree with a null parent
if (treeNode.myRoot != mRoot)
return null; // silent error, node does not belong to this tree

// push this node into the head of the sibling list; adjust prev pointers
FHtreeNode<E> newNode = new FHtreeNode<E>(x,
treeNode.firstChild, null, treeNode, mRoot); // sb, chld, prv, rt
treeNode.firstChild = newNode;
if (newNode.sib != null)
newNode.sib.prev = newNode;
++mSize;
return newNode;
}

public FHtreeNode<E> find(FHtreeNode<E> root, E x, int level)
{
FHtreeNode<E> retval;

if (mSize == 0 || root == null)
return null;

if (root.data.equals(x))
return root;

// otherwise, recurse. don’t process sibs if this was the original call
if ( level > 0 && (retval = find(root.sib, x, level)) != null )
return retval;
return find(root.firstChild, x, ++level);
}

public boolean remove(FHtreeNode<E> root, E x)
{
FHtreeNode<E> tn = null;

if (mSize == 0 || root == null)
return false;

if ( (tn = find(root, x, 0)) != null )
{
removeNode(tn);
mSize–;
return true;
}
return false;
}

private void removeNode(FHtreeNode<E> nodeToDelete )
{
if (nodeToDelete == null || mRoot == null)
return;
if (nodeToDelete.myRoot != mRoot)
return; // silent error, node does not belong to this tree

// remove all the children of this node
while (nodeToDelete.firstChild != null)
removeNode(nodeToDelete.firstChild);

if (nodeToDelete.prev == null)
mRoot = null; // last node in tree
else if (nodeToDelete.prev.sib == nodeToDelete)
nodeToDelete.prev.sib = nodeToDelete.sib; // adjust left sibling
else
nodeToDelete.prev.firstChild = nodeToDelete.sib; // adjust parent

// adjust the successor sib’s prev pointer
if (nodeToDelete.sib != null)
nodeToDelete.sib.prev = nodeToDelete.prev;
}

public Object clone() throws CloneNotSupportedException
{
FHtree<E> newObject = (FHtree<E>)super.clone();
newObject.clear(); // can’t point to other’s data

newObject.mRoot = cloneSubtree(mRoot);
newObject.mSize = mSize;
newObject.setMyRoots(newObject.mRoot);

return newObject;
}

private FHtreeNode<E> cloneSubtree(FHtreeNode<E> root)
{
FHtreeNode<E> newNode;
if (root == null)
return null;

// does not set myRoot which must be done by caller
newNode = new FHtreeNode<E>
(
root.data,
cloneSubtree(root.sib), cloneSubtree(root.firstChild),
null
);

// the prev pointer is set by parent recursive call … this is the code:
if (newNode.sib != null)
newNode.sib.prev = newNode;
if (newNode.firstChild != null)
newNode.firstChild.prev = newNode;
return newNode;
}

// recursively sets all myRoots to mRoot
private void setMyRoots(FHtreeNode<E> treeNode)
{
if (treeNode == null)
return;

treeNode.myRoot = mRoot;
setMyRoots(treeNode.sib);
setMyRoots(treeNode.firstChild);
}

// define this as a static member so recursive display() does not need
// a local version
final static String blankString = ” “;

// let be public so client can call on subtree
public void display(FHtreeNode<E> treeNode, int level)
{
String indent;

// stop runaway indentation/recursion
if (level > (int)blankString.length() – 1)
{
System.out.println( blankString + ” … ” );
return;
}

if (treeNode == null)
return;

indent = blankString.substring(0, level);

// pre-order processing done here (“visit”)
System.out.println( indent + treeNode.data ) ;

// recursive step done here
display( treeNode.firstChild, level + 1 );
if (level > 0 )
display( treeNode.sib, level );
}

// often helper of typical public version, but also callable by on subtree
public <F extends Traverser<? super E>>
void traverse(F func, FHtreeNode<E> treeNode, int level)
{
if (treeNode == null)
return;

func.visit(treeNode.data);

// recursive step done here
traverse( func, treeNode.firstChild, level + 1);
if (level > 0 )
traverse( func, treeNode.sib, level);
}
}

FHtreeNode.java

public class FHtreeNode<E>
{
// use protected access so the tree, in the same package,
// or derived classes can access members
protected FHtreeNode<E> firstChild, sib, prev;
protected E data;
protected FHtreeNode<E> myRoot; // needed to test for certain error

public FHtreeNode( E d, FHtreeNode<E> sb, FHtreeNode<E> chld, FHtreeNode<E> prv )
{
firstChild = chld;
sib = sb;
prev = prv;
data = d;
myRoot = null;
}

public FHtreeNode()
{
this(null, null, null, null);
}

public E getData() { return data; }

// for use only by FHtree (default access)
protected FHtreeNode( E d, FHtreeNode<E> sb, FHtreeNode<E> chld,
FHtreeNode<E> prv, FHtreeNode<E> root )
{
this(d, sb,

chld
,

prv
);
myRoot = root;
}
}

Foothill.java

import java.text.*;
import java.util.*;

//——————————————————
public class Foothill
{
// ——- main ————–
public static void main(String[] args) throws Exception
{
FHtree<String> sceneTree = new FHtree<String>();
FHtreeNode<String> tn;

// create a scene in a room
tn = sceneTree.addChild(null, “room”);

// add three objects to the scene tree
sceneTree.addChild(tn, “Lily the canine”);
sceneTree.addChild(tn, “Miguel the human”);
sceneTree.addChild(tn, “table”);
// add some parts to Miguel
tn = sceneTree.find(“Miguel the human”);

// Miguel’s left arm
tn = sceneTree.addChild(tn, “torso”);
tn = sceneTree.addChild(tn, “left arm”);
tn = sceneTree.addChild(tn, “left hand”);
sceneTree.addChild(tn, “thumb”);
sceneTree.addChild(tn, “index finger”);
sceneTree.addChild(tn, “middle finger”);
sceneTree.addChild(tn, “ring finger”);
sceneTree.addChild(tn, “pinky”);

// Miguel’s right arm
tn = sceneTree.find(“Miguel the human”);
tn = sceneTree.find(tn, “torso”, 0);
tn = sceneTree.addChild(tn, “right arm”);
tn = sceneTree.addChild(tn, “right hand”);
sceneTree.addChild(tn, “thumb”);
sceneTree.addChild(tn, “index finger”);
sceneTree.addChild(tn, “middle finger”);
sceneTree.addChild(tn, “ring finger”);
sceneTree.addChild(tn, “pinky”);

// add some parts to Lily
tn = sceneTree.find(“Lily the canine”);
tn = sceneTree.addChild(tn, “torso”);
sceneTree.addChild(tn, “right front paw”);
sceneTree.addChild(tn, “left front paw”);
sceneTree.addChild(tn, “right rear paw”);
sceneTree.addChild(tn, “left rear paw”);
sceneTree.addChild(tn, “spare mutant paw”);
sceneTree.addChild(tn, “wagging tail”);

// add some parts to table
tn = sceneTree.find(“table”);
sceneTree.addChild(tn, “north east leg”);
sceneTree.addChild(tn, “north west leg”);
sceneTree.addChild(tn, “south east leg”);
sceneTree.addChild(tn, “south west leg”);

sceneTree.display();

sceneTree.remove(“spare mutant paw”);
sceneTree.remove(“Miguel the human”);
sceneTree.remove(“an imagined higgs boson”);

sceneTree.display();
}
}

/* —————— RUN ————-
room
table


south west
leg


south east
leg


north west
leg
north east leg
Miguel the human
torso
right arm
right hand
pinky
ring finger
middle finger
index finger
thumb
left arm
left hand
pinky
ring finger
middle finger
index finger
thumb
Lily the canine
torso
wagging tail
spare mutant paw
left rear paw
right rear paw
left front paw
right front paw
room
table


south west
leg


south east
leg


north west
leg
north east leg
Lily the canine
torso
wagging tail
left rear paw
right rear paw
left front paw
right front paw

——————————————– */

Traverser.java

public interface Traverser<E>
{
public void visit(E x);
}

Download the .zip file,

unziop
it and drag a copy of FHtree.java, FHtreeNode.java

and
Traverser.java into your project’s src folder. Then, incorporate these classes into your project (in Eclipse, use File → Refresh). Also, copy and

past
the contents of the client, Foothill.java into your main .java file. If your main class is not named Foothill, make adjustments, accordingly. If you compile and run the project after doing this, you should get the original output as shown in the modules.

Understand the Client

The client main() that is provided in the lesson (and in your zipped download file, above) will eventually need to be modified in two ways for this assignment:

Any references to

FHtreeNode
and FHtree in the downloaded client must be changed to refer to the new classes we are designing, FHsdTreeNode and FHsdTree.

The client will contain some extra tests in addition to the ones that were there. For example, we’ll need to write and test methods like displayPhysical(), collectGarbage().

Implementation Details

After you succeed in compiling and running the lecture code as described above, rename FHtree.java to FHsdTree.java, and rename and FHtreeNode.java to FHsdTreeNode.java Change the names of the classes that these files contain to FHsdTreeNode and FHsdTree. [Note: Eclipse, will do all this for you automatically once you Refactor → Rename each file, but other IDEs might require that you adjust the contents of all the files, manually, to accommodate the new file names.] Do whatever it takes to both these .java files and your main .java file so that everything compiles with these new names (but don’t attempt any new implementation yet). Run again to make sure you get the same output as before. You are now ready to begin your assignment.

Class FHsdTreeNode

Data Members:

All previous members remain plus the one new private (or protected if you prefer) data member boolean deleted.

Methods To Modify:

All parameter-taking constructors should be modified to take a new parameter for the

deleted


member
, and the default constructor should make sure the value for the deleted member is initialized

to


false
.

Class FHsdTree

Overriding Methods:

addChild() – not much difference from old addChild(). In particular, we do not see if the data is already in the tree as deleted and get clever. We always add the node, exactly as if this were an ordinary tree. However, optionally, you can check the first parameter (treeNode, root, or whatever you call it) to see if it is

deleted,
and reject the

add


if
it is. There are some unusual scenarios in which the client might inadvisably attempt to make a useless addition under/to a deleted node.

find() – Two versions, just like the old implementation: one non-recursive takes only the data, x, and the other which takes two more parameters for recursion. The non-recursive calls the recursive. The recursive method should check the deleted flag of any data match (a “found” x) and, if true, should return as if the data were not in the tree. If the deleted flag is false, then you would return the node as before, a “good find”. Note: the sub-tree of a deleted node is considered entirely deleted, even if individual sub-tree nodes might be still have deleted = false.

remove() – Two versions, just like the previous implementation of a general tree, however, the deleted flag of the appropriate node is set to true. The node is not physically removed from the tree. Note the meaning: this has the same meaning as the old remove(). If a node is marked as deleted, then the entire child sub-tree is considered gone. Those nodes, while not marked themselves (big error to waste time marking them), are no longer in the tree. Caution: While you might think it best to mark the firstChild of the deleted node to null, thereby allowing the Java garbage collector to get rid of that subtree for you, do not do this. Leave the

firstChild
, and all the children still in the physical tree. In CS 1C, we will see how we can reuse deleted nodes left in the tree to save work. This forces us to write our other methods (like display() and find()) to obey the deleted flag and consciously skip processing children of a deleted node.

Others — any other method which

require
overriding must be overridden. You have to decide. Using common sense on the meaning and interpretation of deleted is part of your assignment. There are several methods that require overriding. Hint: size() will not use

mSize


,
since that member only reflects physical size. Instead, size() has to compute the size, manually (read “recursively”), so it is harder than the old size(). traverse() is another that needs tweaking. Check for more.

New Methods:

“Physical” versions of some methods are needed so we can (for debugging and maintenance purposes) see the actual tree on the console, replete with both deleted and undeleted nodes. Some of these methods work almost exactly as the prior implementation of methods in the non-soft-deletion trees.



sizePhysical
()
– returns the actual, physical size. This is easy: just like our old size() from the lectures. It just has a new name in this regime since the old name, size(), is now used to return the virtual size of the tree (a count of non-deleted nodes — and remember, all children/sub-trees of deleted nodes are considered deleted, even if their deleted flag is still set to false).

displayPhysical() – like the old display() from the lectures. Ignores the deleted flag. Optionally, place a ” (D)” after any node that has deleted == true. Note: you don’t have to add the ” (D)” if the node is not marked as deleted, even though it might actually be deleted by virtue of its being in a subtree of a deleted node.

collectGarbage() – physically removes all nodes that are marked as deleted. After this method is called, the physical and virtual size of the tree would be the same. A physical and virtual display() would also be the same after a call to

collectGarbage
()
(at least temporarily, until more items

are


remove
()
ed from the tree). This method does exactly what it says: it takes out the garbage. Hint: make use of removeNode(), which can be preserved from the original general tree class.


Suggestion
about Order of Implementation

Add the deleted member to the FHsdTreeNode class as private or protected.

Update the signatures of the constructors FHsdTreeNode(), to accommodate the extra parameter (wherever you want to put it).


One at-a-time
, begin updating the FHsdTree methods as demanded by the new FHsdTreeNode member, deleted. Suggestion: Start with addChild(), then find(), then remove(). Test as you go. Once these three are working, you’ll implement all the rest.

Client

Here is a client you can use to test your code. I am not going to tell you what this client should produce. You should be able to predict that on your own and make a judgment about whether your code is working. At this point in the second programming course, I expect you to be able to make these kinds of determinations. This is the minimal client for testing, but you can add to it, optionally, if you wish.

import java.text.*;
import java.util.*;

//------------------------------------------------------
public class Foothill
{ 
   // -------  main --------------
   public static void main(String[] args) throws Exception
   {
      FHsdTree<String> sceneTree = new FHsdTree<String>();
      FHsdTreeNode<String> tn;
      
      System.out.println("Starting tree empty? " + sceneTree.empty() + "n");
      // create a scene in a room
      tn = sceneTree.addChild(null, "room");

      // add three objects to the scene tree
      sceneTree.addChild(tn, "Lily the canine");
      sceneTree.addChild(tn, "Miguel the human");
      sceneTree.addChild(tn, "table");
      // add some parts to Miguel
      tn = sceneTree.find("Miguel the human");

      // Miguel's left arm
      tn = sceneTree.addChild(tn, "torso");
      tn = sceneTree.addChild(tn, "left arm");
      tn =  sceneTree.addChild(tn, "left hand");
      sceneTree.addChild(tn, "thumb");
      sceneTree.addChild(tn, "index finger");
      sceneTree.addChild(tn, "middle finger");
      sceneTree.addChild(tn, "ring finger");
      sceneTree.addChild(tn, "pinky");

      // Miguel's right arm
      tn = sceneTree.find("Miguel the human");
      tn = sceneTree.find(tn, "torso", 0);
      tn = sceneTree.addChild(tn, "right arm");
      tn =  sceneTree.addChild(tn, "right hand");
      sceneTree.addChild(tn, "thumb");
      sceneTree.addChild(tn, "index finger");
      sceneTree.addChild(tn, "middle finger");
      sceneTree.addChild(tn, "ring finger");
      sceneTree.addChild(tn, "pinky");

      // add some parts to Lily
      tn = sceneTree.find("Lily the canine");
      tn = sceneTree.addChild(tn, "torso");
      sceneTree.addChild(tn, "right front paw");
      sceneTree.addChild(tn, "left front paw");
      sceneTree.addChild(tn, "right rear paw");
      sceneTree.addChild(tn, "left rear paw");
      sceneTree.addChild(tn, "spare mutant paw");
      sceneTree.addChild(tn, "wagging tail");

      // add some parts to table
      tn = sceneTree.find("table");
      sceneTree.addChild(tn, "north east leg");
      sceneTree.addChild(tn, "north west leg");
      sceneTree.addChild(tn, "south east leg");
      sceneTree.addChild(tn, "south west leg");

      System.out.println("n------------ Loaded Tree ----------------- n");
      sceneTree.display();
      
      sceneTree.remove("spare mutant paw");
      sceneTree.remove("Miguel the human");
      sceneTree.remove("an imagined higgs boson");
      
      System.out.println("n------------ Virtual (soft) Tree --------------- n");
      sceneTree.display();

      System.out.println("n----------- Physical (hard) Display ------------- n");
      sceneTree.displayPhysical();
      
      System.out.println("------- Testing Sizes (compare with above) -------- n");
      System.out.println("virtual (soft) size: " + sceneTree.size()  );
      System.out.println("physiical (hard) size: " + sceneTree.sizePhysical()  );

      System.out.println("------------ Collecting Garbage ---------------- n");
      System.out.println("found soft-deleted nodes? " 
            + sceneTree.collectGarbage()  );
      System.out.println("immediate collect again? " 
            + sceneTree.collectGarbage()  );

      System.out.println("--------- Hard Display after garb col ------------ n");

      sceneTree.displayPhysical();

      System.out.println("Semi-deleted tree empty? " + sceneTree.empty() + "n");
      sceneTree.remove("room");
      System.out.println("Completely-deleted tree empty? " + sceneTree.empty() 
         + "n");
      
      sceneTree.display();
   }
}

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

outcome 6 organized labor for my friend

ompose a 6-8 page research paper that explores the current and future trends of organized labor and the impact of various legal and regulatory issues on the changes occurring in the workforce.

You may propose an alternative project of your own design that shows attainment of the corresponding course outcome. The mentor must approve the alternative project.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.