Java

Site Stats
APCS schedule | APCS LogIn | APCS Forms | APCS Resources | APCS Archive | APCS Stuff
C++ schedule | C++ LogIn | C++ Forms | C++ Resources | C++ Archive | C++ Stuff
Adven schedule | Adven LogIn | Adven Forms | Adven Resources | Adven Archive | Adven Stuff
Stats schedule | Stats LogIn | Stats Forms | Stats Resources | Stats Archive | Stats Stuff

Java Account Class

Enter the code in this page and submit before creating the project : Banking<Lastname>

and writing the class Account<login ID>

Example class names : Accounth, Accountk, AccountSh, AccountSm, etc.

H K N O P Sh Sm W
L Not Listed

Last Name :

Email:

updated: Wednesday, February 24, 2010 8:28 AM

 

 

public class Account
{

private double balance;

public Account()
{

}
public Account(double bal)
{

}

//accessors

public double getBalance()
{

} //getBal

//Mutators

//Adds to the balance of the account
public void credit(double c)
{

}

//deducts from the balance of the account
public void debit(double d)
{

}

//helper

//Outputs the balance as   Balance : $<dollar amount>
//Example     Balance : $45.23
public String toString()
{

} //end toString

//returns true if the balance is less than 0 dollars
public boolean isOverdrawn()
{

}//end isOver

//APCS - write a compareTo method to compareTo accounts
//lewis pg 269 compareTo Interface and implementation

//change public class Account  to public class Account implements Comparable
Follow this link to submit the compareTo method

 

}//end account

 

 

 

 

Updated: Wednesday, February 24, 2010 8:28 AM

About Us | Site Map | Search | Contact Us | ©2005 brentwoodhigh.com