
\documentclass[letterpaper, 10pt, oneside, draft]{article}

%include the usecases package
\usepackage{usecases}

\begin{document}

%Sometimes it is a good idea to put domain objects in \texttt{}
%The template and the descriptions are based on the book Applying UML and Patterns: 
%An Introduction to Object-Oriented Analysis and Design and Iterative Development
%(3rd Edition) by Craig Larman.
\begin{usecase}

\addtitle{Use Case 2.1}{Create State} 

%Scope: the system under design
%\addfield{Scope:}{System-wide}

%Level: "user-goal" or "subfunction"
%\addfield{Level:}{User-goal}

%Primary Actor: Calls on the system to deliver its services.
\addfield{Primary Actor:}{End-User}

%Preconditions: What must be true on start and worth telling the reader?
%\addfield{Preconditions:}{}
%when multiple
\additemizedfield{Preconditions:}{
	\item None
} 

%Postconditions: What must be true on successful completion and worth telling the reader
%\addfield{Postconditions:}{}
%when multiple
\additemizedfield{Postconditions:}{
	\item The State is initialized and valid
}

%Main Success Scenario: A typical, unconditional happy path scenario of success.
\addscenario{Main Success Scenario:}{
	\item The user calls State's parameterized constructor with the State's name, and conducting boolean as the two arguments
	\item The State is initialized successfully 
	}

%Extensions: Alternate scenarios of success or failure.
\addscenario{Extensions:}{
	\item[2a.] The State's name is an empty string
		\begin{enumerate}
		\item[1.] System throws a runtime exception notifying the user that the State name cannot be empty 
		\end{enumerate}
}

%Miscellaneous: Such as open issues/questions
%\addfield{Open Issues:}{}

\end{usecase}
\end{document}

