\documentclass[12pt]{article} \usepackage{locals} \usepackage{epsfig} \setlength{\topmargin}{-0.25in} \setlength{\textwidth}{6.7in} \setlength{\textheight}{9.5in} \setlength{\oddsidemargin}{-0.15in} \parindent=0pt \pagestyle{empty} %\newcommand{\answer}[1]{\begin{bf} #1 \end{bf}} \newcommand{\answer}[1]{\begin{quote}\begin{sffamily} #1 \end{sffamily}\end{quote}} \newcommand{\name}[1]{\hspace{5in} {\bf\sf Name: } #1} \newcommand{\labsection}[1]{\hspace{5in} {\bf\sf Section: } #1} \begin{document} % NOTE: PLEASE FILL IN YOUR NAME AND SECTION NUMBER BELOW \name{Your Name} % This blank line is required. \labsection{0} \begin{center} {\LARGE\bf \sf Software Engineering} \\ \vspace{0.15in} {\Large\bf \sf CSE470 \hspace*{4.0truein} Spring 2002} \\ \vspace{0.15in} {\Large \bf \sf Homework 1 \hspace*{3.3truein} Due: 1/24/2002} \end{center} \vspace{0.2in} % % Each question is represented by \item % % Put your answer between the braces in the \answer{ } construct. % \begin{enumerate} \item An {\em abstract class} is class from which no objects are instantiated and serves as a common parent in an inheritance hierarchy. For example, a \textbf{polygon} abstract class could be the superclass for a \textbf{triangle} and \textbf{square} class. Only \textbf{squares} and \textbf{triangles} would be instantiated, but all the common attributes would be in \textbf{polygon}. You may find abstract classes useful in this problem. We want to design a drawing tool for simple finite state machines. A {\em machine} is a collection of one or more {\em states} and zero or more {\em transitions}. Our customers can't decide whether they want circular states or rectangular states with rounded corners, each of which has it's own drawing format, so we'll allow both forms in our tool. Each state can have zero or more transitions outbound, and zero or more transitions inbound. States have an $x$ and $y$ location on the canvas and a name string. Transitions have a string that denotes the transition expression. Draw the class diagram to represent the figures used in this tool (state machine, states (both kind), and transitions). Be sure to get the multiplicities correct, show all relevant associations, and show the attributes mentioned above. Here is an example of one of these goofy diagrams: \begin{center} \epsfig{file=s02hw1.eps,width=2.5in} \end{center} Note: You may hand-draw the diagram. If you do, use the \LaTeX\ \verb|\vspace| command to make white space. For example, \verb|\vspace{2in}| reserves two inches of space on the page. \answer{} \item Describe the difference between {\em generalization} and {\em abstraction}. Don't simply define each. \answer{} \end{enumerate} \end{document}