Consider a partial version of Bloch’s mutable Stack class: p…

Consider a partial version of Bloch’s mutable Stack class: public class Stack { private Object; } public void push (Object e) { ensureCapacity(); // implementation omitted from quiz elements = e; } public Object pop () { if (size == 0) throw new IllegalStateException(“Stack.pop”); Object result = elements; elements = null; return result; } } Also consider the following client interaction with Stack Stack s = new Stack(); s.push(“apple”); s.push(“orange”); System.out.println(s.pop()); What methods would be needed to convert the client interataction into an equivalent interaction with an immutable version called IStack? For each method, give just the method header – not the contract or implemetation. Choose the most correct answer.

What is the purpose of the ensureCapacity method in the Stac…

What is the purpose of the ensureCapacity method in the Stack class below? public class Stack { private Object; } public void push (Object e) { ensureCapacity(); elements = e; } public Object pop () { if (size == 0) throw new IllegalStateException(“Stack.pop”); Object result = elements; elements = null; // Eliminate obsolete reference return result; } private void ensureCapacity() { if (elements.length == size) { Object oldElements; System.arraycopy(oldElements, 0, elements, 0, size); } } }

33. A charge nurse is preparing to discuss the “Attitudes of…

33. A charge nurse is preparing to discuss the “Attitudes of Mindsets” a nurse uses to approach a problem with a group of newly licensed nurses.  Which of the following skills should the nurse plan to include in the discussion? Select all that apply.