⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 account.tex.old

📁 国外的数据结构与算法分析用书
💻 OLD
字号:
\begin{program}
\PACKAGE\ Accounts;\\
\IMPORT\ People.Customer;\\
\\[\emptyline]
\textrm{/**}\>\textrm{Bank account for customers.}\\
\>\textrm{This class contains attributes that are common to all types of accounts. */}\\
\PUBLIC\ \ABSTRACT\ \CLASS\ Account\\
$\{$\\
\>\textrm{/**}\>\textrm{The account holder */}\\
\>\PROTECTED\ Customer owner; \\
\\[\emptyline]
\>\textrm{/**}\>\textrm{A unique number for each account */}\\
\>\PROTECTED\ \INT\ number; \\
\\[\emptyline]
\>\textrm{/**}\>\textrm{Amount of money in the acocunt */}\\
\>\PROTECTED\ \FLOAT\ balance; \\
\\[\emptyline]
\>\textrm{/**}\>\textrm{Create a new account with a customer and a number */}\\
\>\PUBLIC\ Account(Customer c, \INT\ n)\\
\>$\{$\\
\>\>owner = c;\\
\>\>number = n;\\
\>$\}$\\
\\[\emptyline]
\>\textrm{/**} \textrm{	Return the owner of this account */}\\
\>\PUBLIC\ Customer owner()\\
\>$\{$\\
\>\>\RETURN\ owner;\\
\>$\}$\\
\\[\emptyline]
\>\textrm{/**}\>\textrm{Return the account number */}\\
\>\PUBLIC\ \INT\ number()\\
\>$\{$\\
\>\>\RETURN\ number;\\
\>$\}$\\
\\[\emptyline]
\>\textrm{/**}\>\textrm{Return the account balance */} \\
\>\PUBLIC\ \FLOAT\ balance()\\
\>$\{$\\
\>\>\RETURN\ balance;\\
\>$\}$\\
\\[\emptyline]
\>\textrm{/**}\>\textrm{Generate a listing of account activity */}\\
\>\PUBLIC\ \ABSTRACT\ String generateMonthlyStmt();\\
$\}$\\
\end{program}
\vspace{\backup}

⌨️ 快捷键说明

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