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

📄 account.html

📁 This project does not contain a full, runnable application program. Instead, the only package ope.ac
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!-- ========= 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>&nbsp;owner,

               double&nbsp;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&nbsp;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&nbsp;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>&nbsp;anotherAccount,

                          double&nbsp;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&nbsp;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>&nbsp;</TD>

  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>

  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>

  </TR>

</TABLE>

</TD>

<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>

</EM>

</TD>

</TR>



<TR>

<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">

&nbsp;PREV CLASS&nbsp;

&nbsp;<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>  &nbsp;

&nbsp;<A HREF="Account.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;

&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>

<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">

DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -