% Created 2022-04-04 Mon 15:02
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\input{../preamble}
\author{Instructor: Mehmet Emre}
\date{CS 32 Spring '22}
\title{Homework 4: Abstract Data Types}
\hypersetup{
 pdfauthor={Instructor: Mehmet Emre},
 pdftitle={Homework 4: Abstract Data Types},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 27.2 (Org mode 9.4.4)}, 
 pdflang={English}}
\begin{document}

\maketitle
\textbf{Due: 4/13 12:30pm} \\ 
\vspace{1em}
\textbf{Name \& Perm \#:} \\ 
\textbf{Homework buddy (leave blank if you worked alone):}

\vspace{1em}
\textbf{Reading:} "Abstract Data Types", PS 10.3


\section{}
\label{sec:orgf0d6776}

Savitch makes the following observations in the introduction to
Section 10.3:


\begin{quote}
"Unless \ldots{} defined and used with care, programmer-defined types can be
used in unintuitive ways that make a program difficult to understand and
difficult to modify. The best way to avoid these problems is to make
sure all the data types you define are ADTs. The way that you do this in
C++ is to use classes, but not every class is an ADT. To make it an ADT
you must define the class in a certain way\ldots{}"
\end{quote}

\begin{enumerate}
\item (4 pts) What does ADT stand for?
\vspace{4em}
\item (4 pts) According to Savitch, a data type consists of a collection
of values, together with \ldots{} what?
\vspace{4em}
\item (4 pts) According to Savitch, a data type is called an ADT if
\ldots{} what?
\vspace{4em}
\end{enumerate}

\section{}
\label{sec:orge0ca3b4}

Savitch describes two ways of characterizing what makes a class an ADT:
first he describes two things that should be completely separated, and
then he describes three rules for achieving that separation.

What are the two things that should be separated?

\begin{enumerate}
\item (4 pts) First thing:
\item (4 pts) Second thing:
\end{enumerate}

\section{}
\label{sec:org98e459a}
What are the three rules for keeping those things separate?

\begin{enumerate}
\item (4 pts) Rule 1:
\item (4 pts) Rule 2:
\item (4 pts) Rule 3:
\end{enumerate}

\section{(4 pts)}
\label{sec:orgec4222c}

When you define an ADT as a class, what items are considered part of
the interface for the ADT?
\vspace{4em}

\section{(4 pts)}
\label{sec:orgb376198}

When you define an ADT as a class, what items are considered part of
the implementation for the ADT?
\vspace{4em}
\end{document}