Question 14 6 6 Points Uml Class Diagram Stack Class Storing Integers Provided Lectures In Q25519293

Question 14 6 out of 6 points Below is the UML class diagram for the Stack class (storing Integers) provided in the lectures by the instructor. The dup) method is supposed to duplicate the top item on the stack. For example, Stack-integer> s = new Stack<>(); s.push(1): Is contains 1 s.push(2); /s contains 2,1 s.push(3); IIs contains 3, 2,1 s.dup0 s contains 3, 3, 2, 1</integer> Implement dup). You may assume that dup0 will not be called on an empty stack. DList Stack mList: DList +Stack): «ctor» +clear): void +dup): void +isEmpty): boolean +peek): Integer +pop0: Integer +push(pD ata: Integer): void +rotO void +toString: String«ov erride» #getListO: DList #setList(plist: DList): void

Question 14 6 out of 6 points Below is the UML class diagram for the Stack class (storing Integers) provided in the lectures by the instructor. The dup) method is supposed to duplicate the top item on the stack. For example, Stack-integer> s = new Stack(); s.push(1): Is contains 1 s.push(2); /s contains 2,1 s.push(3); IIs contains 3, 2,1 s.dup0 s contains 3, 3, 2, 1 Implement dup). You may assume that dup0 will not be called on an empty stack. DList Stack mList: DList +Stack): «ctor» +clear): void +dup): void +isEmpty): boolean +peek): Integer +pop0: Integer +push(pD ata: Integer): void +rotO void +toString: String«ov erride» #getListO: DList #setList(plist: DList): void Show transcribed image text

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *