SlideShare a Scribd company logo
(1) The goal is to implement DataStructures.ArrayStack according to the interface ADTs.StackADT
********************************************
package DataStructures;
import ADTs.StackADT;
import Exceptions.EmptyCollectionException;
import Exceptions.StackOverflowException;
public class ArrayStack<T> implements StackADT<T> {
/** The index of where the top of the stack is */
int top;
/** The array that holds the stack */
T[] buffer;
public ArrayStack() {
}
public ArrayStack(int initialCapacity) {
}
}
*******************************************************
package ADTs;
import Exceptions.EmptyCollectionException;
import Exceptions.StackOverflowException;
/**
* An interface for a Stack
* Specific stack implementations will implement this interface
* For use Data Structures & Algorithms
*
*
* author unknown
*/
public interface StackADT<T> extends CollectionADT<T> {
/**
* Adds the specified element to the top of the stack
*
* @param element element to be pushed onto the stack
*/
public void push(T element) throws StackOverflowException;
/**
* Removes and returns the element that is on top of the stack
*
* @return the element removed from the stack
* @throws EmptyCollectionException
*/
public T pop() throws EmptyCollectionException;
/**
* Returns (without removing) the element that is on top of the stack
*
* @return the element on top of the stack
* @throws EmptyCollectionException
*/
public T peek() throws EmptyCollectionException;
}
*****************************************
package ADTs;
import Exceptions.*;
/**
* An interface for an ordered (NOT SORTED) List
* Elements stay in the order they are put in to the list
* For use in Data Structures & Algorithms
*
*
* @author unknown
*/
public interface ListADT<T> extends CollectionADT<T> {
/**
* Adds the specified element to the list at the front
*
* @param element: the element to be added
*
*/
public void addFirst(T element);
/**
* Adds the specified element to the end of the list
*
* @param element: the element to be added
*/
public void addLast(T element);
/**
* Adds the specified element to the list after the existing element
*
* @param existing: the element that is in the list already
* @param element: the element to be added
* @throws ElementNotFoundException if existing isn't in the list
*/
public void addAfter(T existing, T element) throws ElementNotFoundException,
EmptyCollectionException;
/**
* Removes and returns the specified element
*
* @return the element specified
* @throws EmptyCollectionException
* @throws ElementNotFoundException
*/
public T remove(T element) throws EmptyCollectionException, ElementNotFoundException;
/**
* Removes and returns the first element
*
* @return the first element in the list
* @throws EmptyCollectionException
*/
public T removeFirst() throws EmptyCollectionException;
/**
* Removes and returns the last element
*
* @return the last element in the list
* @throws EmptyCollectionException
*/
public T removeLast() throws EmptyCollectionException;
/**
* Returns (without removing) the first element in the list
*
* @return element at the beginning of the list
* @throws EmptyCollectionException
*/
public T first() throws EmptyCollectionException;
/**
* Returns (without removing) the last element in the list
*
* @return element at the end of the list
* @throws EmptyCollectionException
*/
public T last() throws EmptyCollectionException;
/**
* Return whether the list contains the given element.
*
* @param element
* @return
* @throws EmptyCollectionException
*/
public boolean contains(T element) throws EmptyCollectionException;
/**
* Returns the index of the given element.
*
* @param element
* @return the index of the element, or -1 if not found
*/
public int indexOf(T element);
/**
* Return the element at the given index of a list.
*
* @param element
* @return
* @throws EmptyCollectionException
*/
public T get(int index) throws EmptyCollectionException, InvalidArgumentException;
/**
* Set the at the given index of a list.
*
* @param element
* @return
* @throws EmptyCollectionException
*/
public void set(int index, T element) throws EmptyCollectionException, InvalidArgumentException;
}
***********************************************
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ADTs;
/**
* An interface for an AbstractDataType
* Specific ADT interfaces will extend this
* For use in Data Structures & Algorithms
*
*
* @author unknown
*/
public interface CollectionADT<T> {
/**
* Returns true if the collection contains no elements
*
* @return true if the collection is empty
*/
public boolean isEmpty();
/**
* Returns the number of elements in the collection
*
* @return the number of elements as an int
*/
public int size();
/**
* Returns a string representation of the collection
*
* @return a string representation of the collection
*/
@Override
public String toString();
}
**********************************
Project must compile (otherwise no grade)
(1) JavaDoc for DataStructures.ArrayStack class
(2) Tests passing for DataStructures.ArrayStack class
Ad

More Related Content

Similar to 1 The goal is to implement DataStructuresArrayStack accor.pdf (20)

Posfix
PosfixPosfix
Posfix
Fajar Baskoro
 
Hi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdfHi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdf
annaelctronics
 
EmptyCollectionException-java -- - Represents the situation in which.docx
EmptyCollectionException-java --  - Represents the situation in which.docxEmptyCollectionException-java --  - Represents the situation in which.docx
EmptyCollectionException-java -- - Represents the situation in which.docx
BlakeSGMHemmingss
 
Please complete all the code as per instructions in Java programming.docx
Please complete all the code as per instructions in Java programming.docxPlease complete all the code as per instructions in Java programming.docx
Please complete all the code as per instructions in Java programming.docx
cgraciela1
 
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docxNew folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
curwenmichaela
 
StackInterface An interface for the ADT stack. Do not modif.pdf
StackInterface An interface for the ADT stack. Do not modif.pdfStackInterface An interface for the ADT stack. Do not modif.pdf
StackInterface An interface for the ADT stack. Do not modif.pdf
ARCHANASTOREKOTA
 
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdfNote- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Augstore
 
Fix my codeCode.pdf
Fix my codeCode.pdfFix my codeCode.pdf
Fix my codeCode.pdf
Conint29
 
Implementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdfImplementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdf
maheshkumar12354
 
For this lab you will complete the class MyArrayList by implementing.pdf
For this lab you will complete the class MyArrayList by implementing.pdfFor this lab you will complete the class MyArrayList by implementing.pdf
For this lab you will complete the class MyArrayList by implementing.pdf
fashiongallery1
 
So I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdfSo I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdf
aksahnan
 
STAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdfSTAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdf
babitasingh698417
 
Note- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docxNote- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docx
VictorzH8Bondx
 
Note- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdfNote- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdf
Stewart29UReesa
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
fantasiatheoutofthef
 
@author Derek Harter @cwid 123 45 678 @class .docx
@author Derek Harter  @cwid   123 45 678  @class  .docx@author Derek Harter  @cwid   123 45 678  @class  .docx
@author Derek Harter @cwid 123 45 678 @class .docx
adkinspaige22
 
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdfImplement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
rishabjain5053
 
File LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdfFile LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdf
Conint29
 
In this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdfIn this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdf
contact41
 
Please help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdfPlease help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdf
seoagam1
 
Hi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdfHi,I have added the methods and main class as per your requirement.pdf
Hi,I have added the methods and main class as per your requirement.pdf
annaelctronics
 
EmptyCollectionException-java -- - Represents the situation in which.docx
EmptyCollectionException-java --  - Represents the situation in which.docxEmptyCollectionException-java --  - Represents the situation in which.docx
EmptyCollectionException-java -- - Represents the situation in which.docx
BlakeSGMHemmingss
 
Please complete all the code as per instructions in Java programming.docx
Please complete all the code as per instructions in Java programming.docxPlease complete all the code as per instructions in Java programming.docx
Please complete all the code as per instructions in Java programming.docx
cgraciela1
 
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docxNew folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
New folderjsjfArrayStack.classpackage jsjf;publicsynchronize.docx
curwenmichaela
 
StackInterface An interface for the ADT stack. Do not modif.pdf
StackInterface An interface for the ADT stack. Do not modif.pdfStackInterface An interface for the ADT stack. Do not modif.pdf
StackInterface An interface for the ADT stack. Do not modif.pdf
ARCHANASTOREKOTA
 
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdfNote- Can someone help me with the public boolean isEmpty()- public bo.pdf
Note- Can someone help me with the public boolean isEmpty()- public bo.pdf
Augstore
 
Fix my codeCode.pdf
Fix my codeCode.pdfFix my codeCode.pdf
Fix my codeCode.pdf
Conint29
 
Implementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdfImplementation The starter code includes List.java. You should not c.pdf
Implementation The starter code includes List.java. You should not c.pdf
maheshkumar12354
 
For this lab you will complete the class MyArrayList by implementing.pdf
For this lab you will complete the class MyArrayList by implementing.pdfFor this lab you will complete the class MyArrayList by implementing.pdf
For this lab you will complete the class MyArrayList by implementing.pdf
fashiongallery1
 
So I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdfSo I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdf
aksahnan
 
STAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdfSTAGE 2 The Methods 65 points Implement all the methods t.pdf
STAGE 2 The Methods 65 points Implement all the methods t.pdf
babitasingh698417
 
Note- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docxNote- Can someone help me with the private E get(int index- int curren (1).docx
Note- Can someone help me with the private E get(int index- int curren (1).docx
VictorzH8Bondx
 
Note- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdfNote- Can someone help me with the Public boolean add(E value) method.pdf
Note- Can someone help me with the Public boolean add(E value) method.pdf
Stewart29UReesa
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
fantasiatheoutofthef
 
@author Derek Harter @cwid 123 45 678 @class .docx
@author Derek Harter  @cwid   123 45 678  @class  .docx@author Derek Harter  @cwid   123 45 678  @class  .docx
@author Derek Harter @cwid 123 45 678 @class .docx
adkinspaige22
 
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdfImplement the interface you wrote for Lab B (EntryWayListInterface)..pdf
Implement the interface you wrote for Lab B (EntryWayListInterface)..pdf
rishabjain5053
 
File LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdfFile LinkedList.java Defines a doubly-l.pdf
File LinkedList.java Defines a doubly-l.pdf
Conint29
 
In this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdfIn this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdf
contact41
 
Please help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdfPlease help me to make a programming project I have to sue them today- (1).pdf
Please help me to make a programming project I have to sue them today- (1).pdf
seoagam1
 

More from saradashata (20)

Which one of the following is NOT one of the four key differ.pdf
Which one of the following is NOT one of the four key differ.pdfWhich one of the following is NOT one of the four key differ.pdf
Which one of the following is NOT one of the four key differ.pdf
saradashata
 
When you complete the birth certificate workbook develop a .pdf
When you complete the birth certificate workbook develop a .pdfWhen you complete the birth certificate workbook develop a .pdf
When you complete the birth certificate workbook develop a .pdf
saradashata
 
Wohlers amp Co issued convertible bonds with a face value.pdf
Wohlers amp Co issued convertible bonds with a face value.pdfWohlers amp Co issued convertible bonds with a face value.pdf
Wohlers amp Co issued convertible bonds with a face value.pdf
saradashata
 
Which of the following describes the respiratory membrane in.pdf
Which of the following describes the respiratory membrane in.pdfWhich of the following describes the respiratory membrane in.pdf
Which of the following describes the respiratory membrane in.pdf
saradashata
 
Use a commercial passanger airline company to illustrate a s.pdf
Use a commercial passanger airline company to illustrate a s.pdfUse a commercial passanger airline company to illustrate a s.pdf
Use a commercial passanger airline company to illustrate a s.pdf
saradashata
 
We discussed in class extensively Porters five forces Two.pdf
We discussed in class extensively Porters five forces Two.pdfWe discussed in class extensively Porters five forces Two.pdf
We discussed in class extensively Porters five forces Two.pdf
saradashata
 
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdfUnilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
saradashata
 
Use the following Excel payroll register to answer the remai.pdf
Use the following Excel payroll register to answer the remai.pdfUse the following Excel payroll register to answer the remai.pdf
Use the following Excel payroll register to answer the remai.pdf
saradashata
 
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdfVaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
saradashata
 
Todo lo siguiente est asociado con la presentacin de infor.pdf
Todo lo siguiente est asociado con la presentacin de infor.pdfTodo lo siguiente est asociado con la presentacin de infor.pdf
Todo lo siguiente est asociado con la presentacin de infor.pdf
saradashata
 
The mission of The Walt Disney Company is to be one of the w.pdf
The mission of The Walt Disney Company is to be one of the w.pdfThe mission of The Walt Disney Company is to be one of the w.pdf
The mission of The Walt Disney Company is to be one of the w.pdf
saradashata
 
Segn los autores si una persona hiciera un viaje por carre.pdf
Segn los autores si una persona hiciera un viaje por carre.pdfSegn los autores si una persona hiciera un viaje por carre.pdf
Segn los autores si una persona hiciera un viaje por carre.pdf
saradashata
 
Tanmlanamayan Sektrler Sonraki iki soruyu cevaplamak iin .pdf
Tanmlanamayan Sektrler  Sonraki iki soruyu cevaplamak iin .pdfTanmlanamayan Sektrler  Sonraki iki soruyu cevaplamak iin .pdf
Tanmlanamayan Sektrler Sonraki iki soruyu cevaplamak iin .pdf
saradashata
 
Report Topic about The difference between growing aging an.pdf
Report Topic about  The difference between growing aging an.pdfReport Topic about  The difference between growing aging an.pdf
Report Topic about The difference between growing aging an.pdf
saradashata
 
S 20 alfa 005 1 kuyruk Bo hipotez Madeni para adil .pdf
S  20  alfa  005 1 kuyruk  Bo hipotez Madeni para adil .pdfS  20  alfa  005 1 kuyruk  Bo hipotez Madeni para adil .pdf
S 20 alfa 005 1 kuyruk Bo hipotez Madeni para adil .pdf
saradashata
 
Please read this case Case Mrs Z is a 70yearold Pakistani.pdf
Please read this case Case Mrs Z is a 70yearold Pakistani.pdfPlease read this case Case Mrs Z is a 70yearold Pakistani.pdf
Please read this case Case Mrs Z is a 70yearold Pakistani.pdf
saradashata
 
Qu cree que es ms importante el desempeo de la tarea e.pdf
Qu cree que es ms importante el desempeo de la tarea e.pdfQu cree que es ms importante el desempeo de la tarea e.pdf
Qu cree que es ms importante el desempeo de la tarea e.pdf
saradashata
 
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdf
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdfQuito contracts with Rewind Graphix Inc to pay 5000 for.pdf
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdf
saradashata
 
Q no 1 Since she was a child Sunita Arora has had an eye f.pdf
Q no 1 Since she was a child Sunita Arora has had an eye f.pdfQ no 1 Since she was a child Sunita Arora has had an eye f.pdf
Q no 1 Since she was a child Sunita Arora has had an eye f.pdf
saradashata
 
Pregunta 4 Qu se entiende por contabilidad creativa Usa.pdf
Pregunta 4   Qu se entiende por contabilidad creativa Usa.pdfPregunta 4   Qu se entiende por contabilidad creativa Usa.pdf
Pregunta 4 Qu se entiende por contabilidad creativa Usa.pdf
saradashata
 
Which one of the following is NOT one of the four key differ.pdf
Which one of the following is NOT one of the four key differ.pdfWhich one of the following is NOT one of the four key differ.pdf
Which one of the following is NOT one of the four key differ.pdf
saradashata
 
When you complete the birth certificate workbook develop a .pdf
When you complete the birth certificate workbook develop a .pdfWhen you complete the birth certificate workbook develop a .pdf
When you complete the birth certificate workbook develop a .pdf
saradashata
 
Wohlers amp Co issued convertible bonds with a face value.pdf
Wohlers amp Co issued convertible bonds with a face value.pdfWohlers amp Co issued convertible bonds with a face value.pdf
Wohlers amp Co issued convertible bonds with a face value.pdf
saradashata
 
Which of the following describes the respiratory membrane in.pdf
Which of the following describes the respiratory membrane in.pdfWhich of the following describes the respiratory membrane in.pdf
Which of the following describes the respiratory membrane in.pdf
saradashata
 
Use a commercial passanger airline company to illustrate a s.pdf
Use a commercial passanger airline company to illustrate a s.pdfUse a commercial passanger airline company to illustrate a s.pdf
Use a commercial passanger airline company to illustrate a s.pdf
saradashata
 
We discussed in class extensively Porters five forces Two.pdf
We discussed in class extensively Porters five forces Two.pdfWe discussed in class extensively Porters five forces Two.pdf
We discussed in class extensively Porters five forces Two.pdf
saradashata
 
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdfUnilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
Unilever bir zamanlar ondan fazla farkl amar deterjan marka.pdf
saradashata
 
Use the following Excel payroll register to answer the remai.pdf
Use the following Excel payroll register to answer the remai.pdfUse the following Excel payroll register to answer the remai.pdf
Use the following Excel payroll register to answer the remai.pdf
saradashata
 
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdfVaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
Vaka almas eriden 2011 ylnda bir federal jri tannm bir .pdf
saradashata
 
Todo lo siguiente est asociado con la presentacin de infor.pdf
Todo lo siguiente est asociado con la presentacin de infor.pdfTodo lo siguiente est asociado con la presentacin de infor.pdf
Todo lo siguiente est asociado con la presentacin de infor.pdf
saradashata
 
The mission of The Walt Disney Company is to be one of the w.pdf
The mission of The Walt Disney Company is to be one of the w.pdfThe mission of The Walt Disney Company is to be one of the w.pdf
The mission of The Walt Disney Company is to be one of the w.pdf
saradashata
 
Segn los autores si una persona hiciera un viaje por carre.pdf
Segn los autores si una persona hiciera un viaje por carre.pdfSegn los autores si una persona hiciera un viaje por carre.pdf
Segn los autores si una persona hiciera un viaje por carre.pdf
saradashata
 
Tanmlanamayan Sektrler Sonraki iki soruyu cevaplamak iin .pdf
Tanmlanamayan Sektrler  Sonraki iki soruyu cevaplamak iin .pdfTanmlanamayan Sektrler  Sonraki iki soruyu cevaplamak iin .pdf
Tanmlanamayan Sektrler Sonraki iki soruyu cevaplamak iin .pdf
saradashata
 
Report Topic about The difference between growing aging an.pdf
Report Topic about  The difference between growing aging an.pdfReport Topic about  The difference between growing aging an.pdf
Report Topic about The difference between growing aging an.pdf
saradashata
 
S 20 alfa 005 1 kuyruk Bo hipotez Madeni para adil .pdf
S  20  alfa  005 1 kuyruk  Bo hipotez Madeni para adil .pdfS  20  alfa  005 1 kuyruk  Bo hipotez Madeni para adil .pdf
S 20 alfa 005 1 kuyruk Bo hipotez Madeni para adil .pdf
saradashata
 
Please read this case Case Mrs Z is a 70yearold Pakistani.pdf
Please read this case Case Mrs Z is a 70yearold Pakistani.pdfPlease read this case Case Mrs Z is a 70yearold Pakistani.pdf
Please read this case Case Mrs Z is a 70yearold Pakistani.pdf
saradashata
 
Qu cree que es ms importante el desempeo de la tarea e.pdf
Qu cree que es ms importante el desempeo de la tarea e.pdfQu cree que es ms importante el desempeo de la tarea e.pdf
Qu cree que es ms importante el desempeo de la tarea e.pdf
saradashata
 
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdf
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdfQuito contracts with Rewind Graphix Inc to pay 5000 for.pdf
Quito contracts with Rewind Graphix Inc to pay 5000 for.pdf
saradashata
 
Q no 1 Since she was a child Sunita Arora has had an eye f.pdf
Q no 1 Since she was a child Sunita Arora has had an eye f.pdfQ no 1 Since she was a child Sunita Arora has had an eye f.pdf
Q no 1 Since she was a child Sunita Arora has had an eye f.pdf
saradashata
 
Pregunta 4 Qu se entiende por contabilidad creativa Usa.pdf
Pregunta 4   Qu se entiende por contabilidad creativa Usa.pdfPregunta 4   Qu se entiende por contabilidad creativa Usa.pdf
Pregunta 4 Qu se entiende por contabilidad creativa Usa.pdf
saradashata
 
Ad

Recently uploaded (20)

COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
How to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo SlidesHow to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo Slides
Celine George
 
How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
COPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDFCOPA Apprentice exam Questions and answers PDF
COPA Apprentice exam Questions and answers PDF
SONU HEETSON
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptxUnit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Unit 5 ACUTE, SUBACUTE,CHRONIC TOXICITY.pptx
Mayuri Chavan
 
How to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo SlidesHow to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo Slides
Celine George
 
How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
Chemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptxChemotherapy of Malignancy -Anticancer.pptx
Chemotherapy of Malignancy -Anticancer.pptx
Mayuri Chavan
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
BÀI TẬP BỔ TRỢ TIẾNG ANH 9 THEO ĐƠN VỊ BÀI HỌC - GLOBAL SUCCESS - CẢ NĂM (TỪ...
Nguyen Thanh Tu Collection
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
Ad

1 The goal is to implement DataStructuresArrayStack accor.pdf

  • 1. (1) The goal is to implement DataStructures.ArrayStack according to the interface ADTs.StackADT ******************************************** package DataStructures; import ADTs.StackADT; import Exceptions.EmptyCollectionException; import Exceptions.StackOverflowException; public class ArrayStack<T> implements StackADT<T> { /** The index of where the top of the stack is */ int top; /** The array that holds the stack */ T[] buffer; public ArrayStack() { } public ArrayStack(int initialCapacity) { } } ******************************************************* package ADTs; import Exceptions.EmptyCollectionException; import Exceptions.StackOverflowException; /** * An interface for a Stack * Specific stack implementations will implement this interface * For use Data Structures & Algorithms * * * author unknown */ public interface StackADT<T> extends CollectionADT<T> { /** * Adds the specified element to the top of the stack * * @param element element to be pushed onto the stack */ public void push(T element) throws StackOverflowException; /** * Removes and returns the element that is on top of the stack * * @return the element removed from the stack * @throws EmptyCollectionException */ public T pop() throws EmptyCollectionException;
  • 2. /** * Returns (without removing) the element that is on top of the stack * * @return the element on top of the stack * @throws EmptyCollectionException */ public T peek() throws EmptyCollectionException; } ***************************************** package ADTs; import Exceptions.*; /** * An interface for an ordered (NOT SORTED) List * Elements stay in the order they are put in to the list * For use in Data Structures & Algorithms * * * @author unknown */ public interface ListADT<T> extends CollectionADT<T> { /** * Adds the specified element to the list at the front * * @param element: the element to be added * */ public void addFirst(T element); /** * Adds the specified element to the end of the list * * @param element: the element to be added */ public void addLast(T element); /** * Adds the specified element to the list after the existing element * * @param existing: the element that is in the list already * @param element: the element to be added * @throws ElementNotFoundException if existing isn't in the list */ public void addAfter(T existing, T element) throws ElementNotFoundException, EmptyCollectionException;
  • 3. /** * Removes and returns the specified element * * @return the element specified * @throws EmptyCollectionException * @throws ElementNotFoundException */ public T remove(T element) throws EmptyCollectionException, ElementNotFoundException; /** * Removes and returns the first element * * @return the first element in the list * @throws EmptyCollectionException */ public T removeFirst() throws EmptyCollectionException; /** * Removes and returns the last element * * @return the last element in the list * @throws EmptyCollectionException */ public T removeLast() throws EmptyCollectionException; /** * Returns (without removing) the first element in the list * * @return element at the beginning of the list * @throws EmptyCollectionException */ public T first() throws EmptyCollectionException; /** * Returns (without removing) the last element in the list * * @return element at the end of the list * @throws EmptyCollectionException */ public T last() throws EmptyCollectionException; /** * Return whether the list contains the given element. * * @param element * @return * @throws EmptyCollectionException
  • 4. */ public boolean contains(T element) throws EmptyCollectionException; /** * Returns the index of the given element. * * @param element * @return the index of the element, or -1 if not found */ public int indexOf(T element); /** * Return the element at the given index of a list. * * @param element * @return * @throws EmptyCollectionException */ public T get(int index) throws EmptyCollectionException, InvalidArgumentException; /** * Set the at the given index of a list. * * @param element * @return * @throws EmptyCollectionException */ public void set(int index, T element) throws EmptyCollectionException, InvalidArgumentException; } *********************************************** /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ADTs; /** * An interface for an AbstractDataType * Specific ADT interfaces will extend this * For use in Data Structures & Algorithms * * * @author unknown */ public interface CollectionADT<T> {
  • 5. /** * Returns true if the collection contains no elements * * @return true if the collection is empty */ public boolean isEmpty(); /** * Returns the number of elements in the collection * * @return the number of elements as an int */ public int size(); /** * Returns a string representation of the collection * * @return a string representation of the collection */ @Override public String toString(); } ********************************** Project must compile (otherwise no grade) (1) JavaDoc for DataStructures.ArrayStack class (2) Tests passing for DataStructures.ArrayStack class
  翻译: