From 4b5ffbfefdc206d3c2582a950a8942e06c243fe7 Mon Sep 17 00:00:00 2001 From: amostafa147 Date: Mon, 8 Apr 2024 15:45:32 -0700 Subject: [PATCH] added PA2 --- .DS_Store | Bin 0 -> 6148 bytes PA2/MyStack.java | 94 ++++++++++++++++++++++++++ PA2/WebBrowser.java | 90 ++++++++++++++++++++++++ PA2/utilities/FullStackException.java | 13 ++++ 4 files changed, 197 insertions(+) create mode 100644 .DS_Store create mode 100644 PA2/MyStack.java create mode 100644 PA2/WebBrowser.java create mode 100644 PA2/utilities/FullStackException.java diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..47881504aafd3f2001299d211ee88cb72d34de43 GIT binary patch literal 6148 zcmeHKJx{|h5IwgYQh`KA7?3gnTd5!=N(a~&!o=K_KfuV$#KeDK z=8wQTpWDQwFd~HRB>Oq{VZXdYaZE&Jcr)t}b%-cJV{Ek1Z7_~=t69T)c7TTGNawxr zG|v{bOm+NK1^C&us7rIYqU-SaJs(tKS)L@5G@rm1Jua8G=kKqBFh2V+zPPNs8x4Nn zs7WU@px#lMPyNj7=2^QR&Nyk66>^L2%Se^kX||VpW`6c8FL~9Y0V}fQdi{`<*+;0( zsvol2eps{WS6RKi+^zHyR*06Y>d}zZA+u`J8I7P#LdU=^Wi$&J($g1)T&1Q8r~<0M zW(BZkvqf8i+N%PpfGV(7fWHqGjWPCE2)a)PI(GyBw%~S#vHQ0JT6O?qkA)ySFe9Zv zDK-9xVWb>>>+@odg`kv^aVujUzq0Ws6ysKh-@0@%v7q* history; + private MyStack prev; + private MyStack next; + + private static final String DEFAULT_PAGE = "google.com"; + + /** + * TODO + */ + + public WebBrowser() { + // TODO: complete implementation + } + + /** + * TODO + */ + public String getCurrentPage() { + // TODO: complete implementation + } + + /** + * TODO + */ + public void openNewPage(String newLink) { + // TODO: complete implementation + } + + /** + * TODO + */ + public void previousPage() { + // TODO: complete implementation + } + + /** + * TODO + */ + public void nextPage() { + // TODO: complete implementation + } + + /** + * TODO + */ + public void newTab() { + // TODO: complete implementation + } + + /** + * TODO + */ + public ArrayList getHistory() { + // TODO: complete implementation + } + + /** + * TODO + */ + public void clearHistory() { + // TODO: complete implementation + } + + /** + * TODO + */ + public boolean findLink(String link) { + // TODO: complete implementation + } + +} diff --git a/PA2/utilities/FullStackException.java b/PA2/utilities/FullStackException.java new file mode 100644 index 0000000..04a9f93 --- /dev/null +++ b/PA2/utilities/FullStackException.java @@ -0,0 +1,13 @@ +package utilities; + +public class FullStackException extends RuntimeException { + // no-argument constructor + public FullStackException() { + this( "Stack is full" ); + } // end no-argument FullStackException constructor + + // one-argument constructor + public FullStackException( String exception ) { + super( exception ); + } // end one-argument FullStackException constructor +} // end class FullStackException