\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{megphibbs} \pdfinfo{ /Title (exam-1.pdf) /Creator (Cheatography) /Author (megphibbs) /Subject (Exam 1 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{6973FF} \definecolor{LightBackground}{HTML}{F5F6FF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Exam 1 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{megphibbs} via \textcolor{DarkBackground}{\uline{cheatography.com/55461/cs/14748/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}megphibbs \\ \uline{cheatography.com/megphibbs} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 16th February, 2018.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{ArrayLists}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Useful Code:}} & `contains()` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & `subList()` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 3 (+ 0) % Row 3 \SetRowColor{white} {\bf{General Notes:}} & Good for creating an array with variable size \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} & Necessary to turn an array into a set \tn % Row Count 7 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.0445 cm} x{11.2255 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Sets}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Important Methods:}} & `add(Element)` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & `addAll(Collection)` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} & \seqsplit{`containsAll(Collection)`} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} & `remove(Element)` \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} & `removeAll(Collection)` \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 6 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{TreeSets:}} & Time complexity - O(log(n)) \tn % Row Count 8 (+ 2) % Row 7 \SetRowColor{white} & Organized in order from least to greatest \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} & All elements need a compareTo() method \tn % Row Count 12 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 12 (+ 0) % Row 10 \SetRowColor{LightBackground} {\bf{HashSets:}} & Time complexity - O(1) \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} & Faster than TreeSets - organized more efficiently \tn % Row Count 15 (+ 2) % Row 12 \SetRowColor{LightBackground} & All elements need a HashCode \tn % Row Count 17 (+ 2) % Row 13 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 17 (+ 0) % Row 14 \SetRowColor{LightBackground} {\bf{General Notes:}} & All items are unique \tn % Row Count 19 (+ 2) % Row 15 \SetRowColor{white} & Can declare using a list \tn % Row Count 20 (+ 1) % Row 16 \SetRowColor{LightBackground} & Length is dynamic \tn % Row Count 21 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.0445 cm} x{11.2255 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Maps}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Important Methods:}} & `containsKey()` \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & `containsValue()` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} & `entrySet()` \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} & `keySet()` \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} & `remove()` \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 6 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{TreeMaps:}} & Time complexity: O(log(n)) \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} & Keys are stored in a specific order (key must have a .compareTo()) \tn % Row Count 10 (+ 3) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 10 (+ 0) % Row 9 \SetRowColor{white} {\bf{HashMaps:}} & Time complexity: O(1) \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} & Keys are stored based on hash codes (key must have a .hashCode() method) \tn % Row Count 14 (+ 3) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 14 (+ 0) % Row 12 \SetRowColor{LightBackground} {\bf{General Notes:}} & Maps are useful for key-value pairs \tn % Row Count 16 (+ 2) % Row 13 \SetRowColor{white} & Efficient way to add things to map: loop through and check if it contains the key already (then add) or if it doesn't (create new object and put key) \tn % Row Count 22 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.8718 cm} x{11.3982 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{File Input}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Useful Code:}} & `Scanner scan = new \seqsplit{Scanner('filename.txt');`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & `hasNext()` \tn % Row Count 3 (+ 1) % Row 2 \SetRowColor{LightBackground} & `hasNextInt()` \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} & `nextInt()` \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} & `next()` \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} & `useDelimiter()` \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 7 (+ 0) % Row 7 \SetRowColor{white} {\bf{Useful Delimiters}} & " " \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.7353 cm} x{10.5347 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Types of Analysis}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Empirical Analysis:}} & Measure run times, then plot and fit a curve \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Useful for predicting, but cannot explain \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 4 \SetRowColor{LightBackground} {\bf{Mathematical Analysis:}} & Analyze algorithm to estimate number of operations as a function of input size \tn % Row Count 8 (+ 4) % Row 5 \SetRowColor{white} & Useful for both predicting and explaining \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} & Independent of machine/compiler \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} & Where Big O comes into play \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.8718 cm} x{11.3982 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Big O}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Use}} & Determines the algorithmic complexity of something \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Figure out which strategy is the most efficient/least timely \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 5 (+ 0) % Row 3 \SetRowColor{white} {\bf{Determining Big O}} & 1. Determine a general function for the algorithm \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} & 2. Strip away all constants and only keep term with the highest order \tn % Row Count 10 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 10 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{Useful Formulas}} & 1 + 2 + 4 + 8 + ... = 2\textasciicircum{}n+1\textasciicircum{} - 1 \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} & 1 + 2 + 3 + 4 + 5 + ... = n(n + 1) / 2 \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 14 (+ 0) % Row 9 \SetRowColor{white} {\bf{Efficiency}} & Algorithms with the smallest big O are the most efficient \tn % Row Count 17 (+ 3) % Row 10 \SetRowColor{LightBackground} & n\textasciicircum{}2 takes significantly longer to execute than n or 1 \tn % Row Count 20 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.6991 cm} x{11.5709 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Comparing Objects}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{==}} & Useful to see if two variables point to the same object or for comparing primitives \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} & Cannot determine if two objects have the same elements \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 7 (+ 0) % Row 3 \SetRowColor{white} {\bf{`.equals()`}} & Useful for comparing contents of objects/testing equality for strings \tn % Row Count 10 (+ 3) % Row 4 \SetRowColor{LightBackground} & Determines if two objects contain the same elements \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 12 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{`a.compareTo(b)`}} & Useful for putting objects in a specific order \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} & Returns \textless{} 0 if a \textless{} b \tn % Row Count 15 (+ 1) % Row 8 \SetRowColor{LightBackground} & Returns 0 if a is equal to b \tn % Row Count 17 (+ 2) % Row 9 \SetRowColor{white} & returns \textgreater{} 0 if a \textgreater{} b \tn % Row Count 18 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{7.5988 cm} x{9.6712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Hashing}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Making Effective Hash Codes}} & Be sure to create a hash code that depends on the order of things - for example, \{"a", "b", "c"\} should have a different code than \{"b", "a", "c"\} \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} & For objects with multiple instance fields, ensure that each variable has influence over the hash code \tn % Row Count 12 (+ 5) % Row 2 \SetRowColor{LightBackground} & Generally, things are added to the hashcode \tn % Row Count 14 (+ 2) % Row 3 \SetRowColor{white} & Multiply by prime numbers (37) \tn % Row Count 16 (+ 2) % Row 4 \SetRowColor{LightBackground} & Avoid using 0 - can mess things up \tn % Row Count 18 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 18 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{Collisions}} & Occur when two objects have the same hashcode \tn % Row Count 21 (+ 3) % Row 7 \SetRowColor{white} & Decreases \seqsplit{performance/efficiency}, but still yields correct results \tn % Row Count 24 (+ 3) % Row 8 \SetRowColor{LightBackground} & Don't use hashcodes as keys for this reason - in this case, collisions will cause errors \tn % Row Count 28 (+ 4) % Row 9 \SetRowColor{white} & Can use .equals() to see if two objects with the same hashcode are actually equal \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{7.5988 cm} x{9.6712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Hashing (cont)}} \tn % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 0 (+ 0) % Row 11 \SetRowColor{white} {\bf{Conjunction with .equals()}} & Every object that overrides .equals() MUST also override .hashCode() to prevent errors \tn % Row Count 4 (+ 4) % Row 12 \SetRowColor{LightBackground} & Only overriding one leads to conflicts in code. \tn % Row Count 7 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{NBody}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{General Notes:}} & Small timestep means more accurate (to a degree - overly small causes issues) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & Large timestep doesn't update frequently enough, which causes errors \tn % Row Count 6 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.3899 cm} x{10.8801 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Markov}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{General Notes:}} & Comparing efficiency of TreeMaps vs. HashMaps \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Looking at Big O Time functions \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 3 \SetRowColor{white} {\bf{EfficientMarkov}} & Declares and instantiates a map in an init method, then accesses that map later on \tn % Row Count 8 (+ 4) % Row 4 \SetRowColor{LightBackground} & Better than MarkovModel because MM iterates through every single time (VERY inefficient) \tn % Row Count 12 (+ 4) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 12 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{WordGram}} & Purpose: creating a comparable object (possible to use in TreeMaps) \tn % Row Count 15 (+ 3) % Row 7 \SetRowColor{white} & Made a hashCode as well \tn % Row Count 16 (+ 1) % Row 8 \SetRowColor{LightBackground} & Used for EfficientWordMarkov \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 18 (+ 0) % Row 10 \SetRowColor{LightBackground} {\bf{EfficientWordMarkov}} & Keys are WordGram objects \tn % Row Count 20 (+ 2) % Row 11 \SetRowColor{white} & More efficient that WordMarkovModel for the same reason as EfficientMarkov \tn % Row Count 23 (+ 3) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 23 (+ 0) % Row 13 \SetRowColor{white} {\bf{Benchmark}} & Used for testing efficiency \tn % Row Count 25 (+ 2) % Row 14 \SetRowColor{LightBackground} & **Note: this is an example of empirical analysis \tn % Row Count 27 (+ 2) % Row 15 \SetRowColor{white} & Seeing how different methods change how much time it takes \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{6.3899 cm} x{10.8801 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{Markov (cont)}} \tn % Row 16 \SetRowColor{LightBackground} & Also can be used to compare tree and hash maps \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{APT 1}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{CirclesCountry}} & Tested for circles that lay within one another \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Good way to learn efficient programming \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 4 (+ 0) % Row 3 \SetRowColor{white} {\bf{LaserShooting}} & Added up different angles \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} & Struggled with this a lot - taught importance of casting doubles etc. \tn % Row Count 9 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 9 (+ 0) % Row 6 \SetRowColor{LightBackground} {\bf{Totality}} & Takes input of string - either "odd", "even", or "all" \tn % Row Count 11 (+ 2) % Row 7 \SetRowColor{white} & Returns \# of odd, \# of even, or total \# \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 13 (+ 0) % Row 9 \SetRowColor{white} {\bf{SandwichBar}} & Takes two arrays as inputs - list of ingredients and list of sandwiches \tn % Row Count 16 (+ 3) % Row 10 \SetRowColor{LightBackground} & returns the index of the first sandwich that can be made with the ingredients listed \tn % Row Count 20 (+ 4) % Row 11 \SetRowColor{white} & first use of sets in this class \tn % Row Count 22 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 22 (+ 0) % Row 13 \SetRowColor{white} {\bf{ClassScores}} & Takes an array of ints as input \tn % Row Count 24 (+ 2) % Row 14 \SetRowColor{LightBackground} & Returns the mode score - if there are multiple modes, return the array of them in numerical order \tn % Row Count 28 (+ 4) % Row 15 \SetRowColor{white} & Where TreeSets become useful \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{APT 1 (cont)}} \tn % Row 16 \SetRowColor{LightBackground} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 0 (+ 0) % Row 17 \SetRowColor{white} {\bf{Gravity}} & Teaches the ability to solve a simple equation using Java \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{APT 2}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Thesaurus}} & Never figured this one out \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Tested ability of decomposition \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} & Used retainAll() method \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 5 (+ 0) % Row 4 \SetRowColor{LightBackground} {\bf{Anonymous}} & Takes in two String arrays (list of headlines and list of messages) \tn % Row Count 8 (+ 3) % Row 5 \SetRowColor{white} & Returns the number of messages that can be constructed using only letters in the headlines \tn % Row Count 12 (+ 4) % Row 6 \SetRowColor{LightBackground} & Made use of String.trim() \tn % Row Count 13 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 13 (+ 0) % Row 8 \SetRowColor{LightBackground} {\bf{SimpleWordGame}} & Takes in two String arrays (list of words in set, list of player guesses) \tn % Row Count 16 (+ 3) % Row 9 \SetRowColor{white} & Each correct guess receives a score of guess.length() * guess.length() \tn % Row Count 19 (+ 3) % Row 10 \SetRowColor{LightBackground} & Returns the sum of all of the players scores \tn % Row Count 21 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 21 (+ 0) % Row 12 \SetRowColor{LightBackground} {\bf{MemberCheck}} & Takes in three string arrays (club1, club2, club3) \tn % Row Count 23 (+ 2) % Row 13 \SetRowColor{white} & Returns the list of members who attended more than one club \tn % Row Count 26 (+ 3) % Row 14 \SetRowColor{LightBackground} & Makes use of retainAll(), nested for loops, uniqueness of sets \tn % Row Count 29 (+ 3) % Row 15 \SetRowColor{white} \mymulticolumn{2}{x{17.67cm}}{} \tn % Row Count 29 (+ 0) % Row 16 \SetRowColor{LightBackground} {\bf{ServiceNames}} & First time using maps \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{17.67cm}{x{5.3537 cm} x{11.9163 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{17.67cm}}{\bf\textcolor{white}{APT 2 (cont)}} \tn % Row 17 \SetRowColor{LightBackground} & Maps a specific input to the types of services it offers \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \end{document}