📄 account.html
字号:
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Account(ope.account.Customer, double)"><!-- --></A><H3>
Account</H3>
<PRE>
public <B>Account</B>(<A HREF="../../ope/account/Customer.html" title="class in ope.account">Customer</A> owner,
double interestRate)</PRE>
<DL>
<DD>Creates a new account of the given customer. The new
account has a given interest rate and a zero balance.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>owner</CODE> - the customer whose account is being created<DD><CODE>interestRate</CODE> - the interest rate of the new account, e.g. 0.05 means a 5% interest rate</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getOwner()"><!-- --></A><H3>
getOwner</H3>
<PRE>
public <A HREF="../../ope/account/Customer.html" title="class in ope.account">Customer</A> <B>getOwner</B>()</PRE>
<DL>
<DD>Returns the customer who owns the account.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>account owner</DL>
</DD>
</DL>
<HR>
<A NAME="getBalance()"><!-- --></A><H3>
getBalance</H3>
<PRE>
public double <B>getBalance</B>()</PRE>
<DL>
<DD>Returns the current balance of the account.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>account balance</DL>
</DD>
</DL>
<HR>
<A NAME="deposit(double)"><!-- --></A><H3>
deposit</H3>
<PRE>
public void <B>deposit</B>(double amount)</PRE>
<DL>
<DD>Deposits the a given sum onto the account if the
given value is positive. Otherwise, does nothing.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>amount</CODE> - the amount to deposit</DL>
</DD>
</DL>
<HR>
<A NAME="withdraw(double)"><!-- --></A><H3>
withdraw</H3>
<PRE>
public double <B>withdraw</B>(double amount)</PRE>
<DL>
<DD>Tries to withdraw the given sum from the account if
the given value is positive. Otherwise, does nothing.
If the given value is higher than the account's current
balance, only the money currently available on the
account is withdrawn.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>amount</CODE> - the amount to withdraw
<DT><B>Returns:</B><DD>the amount of money successfully withdrawn from the account</DL>
</DD>
</DL>
<HR>
<A NAME="transferTo(ope.account.Account, double)"><!-- --></A><H3>
transferTo</H3>
<PRE>
public boolean <B>transferTo</B>(<A HREF="../../ope/account/Account.html" title="class in ope.account">Account</A> anotherAccount,
double amount)</PRE>
<DL>
<DD>Transfers the given sum from this account to another given
account, assuming that there is sufficient money available in
this account. If not, no transfer is made at all.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>anotherAccount</CODE> - the accont the money is deposited on<DD><CODE>amount</CODE> - the amount to transfer
<DT><B>Returns:</B><DD>a boolean value indicating if the transfer was successful</DL>
</DD>
</DL>
<HR>
<A NAME="getInterestRate()"><!-- --></A><H3>
getInterestRate</H3>
<PRE>
public double <B>getInterestRate</B>()</PRE>
<DL>
<DD>Returns the interest rate of the account
<P>
<DD><DL>
<DT><B>Returns:</B><DD>interest rate</DL>
</DD>
</DL>
<HR>
<A NAME="setInterestRate(double)"><!-- --></A><H3>
setInterestRate</H3>
<PRE>
public void <B>setInterestRate</B>(double interestRate)</PRE>
<DL>
<DD>Sets the interest rate of the account to a new
value. If the given value is negative, the interest
rate is set to zero instead.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>interestRate</CODE> - the new interest rate of the account, e.g. 0.05 means a 5% interest rate</DL>
</DD>
</DL>
<HR>
<A NAME="addInterest()"><!-- --></A><H3>
addInterest</H3>
<PRE>
public void <B>addInterest</B>()</PRE>
<DL>
<DD>Adds interest to the account according to the account's
interest rate. E.g. if the interest rate is set to 0.05,
adds 5% of the account's balance to the account.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../ope/account/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../ope/account/Customer.html" title="class in ope.account"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?ope/account/Account.html" target="_top"><B>FRAMES</B></A>
<A HREF="Account.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -