Question: Part A is done, I do not know how to start these steps.. In computer science, an abstract data type (ADT) is a mathematical model

 Part A is done, I do not know how to start

Part A is done, I do not know how to start these steps..

"In computer science, an abstract data type (ADT) is a mathematical model for data types where a data type is defined by its behavior (semantics) from the point of view of a user of the data, specifically in terms of possible values, possible operations on data of this type, and the behavior of these operations." (Source: "Abstract Data Types." Wikipedia. Wikimedia Foundation, 2 Nov. 2016. Web. 9 Nov 2016. .) A stack is an example of an abstract data type (ADT). A. Create a Power Point Presentation (> = 6 slides) Research the basic concept of a stack and explain it in your presentation. Illustrate the concept with two reallife examples. Cite your sources. Implementation of the ADT Implement the stack ADT in a Stack class. The stack will hold integers (ints). For the implementation, use a fixed size array (not the ArrayList class). Implement the following methods: 1. the no-arg constructor initializes a stack with a default capacity of 4, i.e. the stack can take 4-elements at most), 2. a constructor that initializes a stack with a specific capacity (given as parameter), 3. push (adds a new element to the stack if it is not full), 4. pop (removes the last element from a stack if it is not empty), 5. peek (if the stack is not empty, returns the value of the last element from a stack, but does not remove the element from the stack), 6. getSize (returns how many elements are currently in the stack), 7. getCapacity (returns the capacity of the stack), 8. isFull (returns true if the stack is full), 9. isEmpty (returns true if the stack is empty). 10. toString (returns a string of all the elements). Optional (for bonus points): 11. equals (compares the stack with another stack given as parameter and returns true if both are of equal capacity and have the same elements in the same positions), 12. a constructor that copies another stack given as parameter, B. Design the Stack class using a UML diagram. C. Implement the Stack class in Java. D. Test all the methods of your ADT in a separate demo/test program. It is recommended to test each method right after it's implementation (to make sure it is working correctly), before moving on to the next one

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!