BlueJ1 - #BlueJ class context comment0.params=myID\...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #BlueJ class context comment0.params=myID\ myFirst\ myLast comment0.target=BankAccount(String,\ String,\ String) comment0.text=\nCreate\ a\ constructor\ for\ the\ objects\ in\ \n\n comment1.target=String\ getName() comment2.target=double\ getBalance() comment3.params=myID comment3.target=boolean\ isID(String) comment4.params=myAmount comment4.target=boolean\ doDeposit(double) comment5.params=myAmount comment5.target=boolean\ doWithdraw(double) numComments=6 /** * This class will allow us to use methods in order to * create a bank account and perform simple tasks. * * @author (Name) * @version (Date) */ public class BankAccount { // instance variables - these are the class variables private String firstName; private String lastName; private String accountID; private double accountBalance; /** * Create a constructor for the objects in */ public BankAccount(String myID, String myFirst, String myLast) { // initialise instance variables firstName = myFirst; lastName = myLast; accountID = myID; accountBalance = 0; } public String getName() { // use this method in order to get the name of the String fullname = firstName + lastName; return fullname; } public double getBalance() // create a method which will return the balance of the account back...
View Full Document

Page1 / 5

BlueJ1 - #BlueJ class context comment0.params=myID\...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online