listopensectionstrans.tex

来自「国外的数据结构与算法分析用书」· TEX 代码 · 共 24 行

TEX
24
字号
\begin{program}
\PACKAGE\ Transactions;\\
\\[\emptyline]
\IMPORT\ Sets.DepartmentSet;\\
\IMPORT\ dslib.list.LinkedListUos;\\
\IMPORT\ Entities.*;\\
\\[\emptyline]
\textrm{/**}\>\textrm{List the section for a specific course that have not}\\
\>\textrm{reached their enrollment limit */}\\
\PUBLIC\ \CLASS\ ListOpenSectionsTrans\\
$\{$\\
\>\PUBLIC\ LinkedListUos openSectionsList;\\
\\[\emptyline]
\>\PUBLIC\ \jVOID\ execute(\INT\ deptNum, \INT\ courseNum)\\
\>$\{$\\
\>\>Course course = DepartmentSet.getCourse(deptNum, courseNum);\\
\>\>\IF\ (course != \NULL)\\
\>\>\>openSectionsList = course.openSections();\\
\>\>\ELSE\\
\>\>\>openSectionsList = \NEW\ LinkedListUos();\\
\>$\}$\\
$\}$\\
\end{program}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?