Question: ASSIGNMENT DESCRIPTION In this assignment you will be implementing a basic Bank Account class. Some goals for this assignment are to learn how to implement
ASSIGNMENT DESCRIPTION
In this assignment you will be implementing a basic Bank Account class. Some goals for this assignment are to learn how to implement an interface and how to write code to build an object based on an implemented class.
OVERVIEW
You are given an interface called BankAccountInt,
You need to create a class called BankAccount that implements the BankAccountInt interface.
You need to create a class Program to test your code and ensure that your class correctly implements the interface.
DETAILS
The BankAccountInt interface:
An interface is a contract. programmers must implement all of the methods that the interface lists.
The BankAccount class that you will be writing see below must implement the BankAccountint interface.
Download BankAccountInt.java darr, and into your project folder in Eclipse.
You will need to read the comments above each method declaration in BankAccountInt.java to see what each method is supposed to do
You do not modify BankAccountInt.java. You will be adding your code to BankAccount.java.
The BankAccount class:
This is the class that you will need to create to implement the BankAccountint interface you downloaded earlier.
In the Package Explorer, select the edu.sbcccs package New Class.
In the wizard, set the name to BankAccount. Then click the Add interface button, and search for BankAccountInt. Check the "Inherited abstract methods" box. Click Finish. Eclipse will create the class and automatically add method stubs that meet the BankAccountInt interface.
You will need to read the comments above each method declaration in BankAccountntjava to see what each method is supposed to do
In addition to implernenting BankAccountInt interface, the BankAccount class must also implement the Comparable
BankAccountInt Java code
Defines the interface for a bank account.
public interface BankAccountInt
Returns the account number of this bank account
@return the account number String Something like this for example:
"ACTN
public String getAccountNumber;
Update the account number of this bank account
@param the account number String Something like this for example:
"ACTN
public void setAccountNumberString acctN;
Returns the first name of this bank account's owner
@return the first name String Something like: "Joe" or "Jane"
public String getFirstName;
Returns the last name of this bank account's owner
@return the last name String Something like: "Smith" or "Lopez"
public String getLastName;
Updates this bank account's owner's first name
@param the first name of the account's owner
public void setFirstNameString firstN;
Updates this bank account's owner's last name
@param the last name of the account's owner
public void setLastNameString lastN;
Returns the balance of this bank account
@return the balance double Something like:
public double getBalance;
Updates this bank account's balance
@param the new balance of this account
public void setBalancedouble balance;
Prints the values of all the items in this account AccountN FName, LName,
Balance Like this: Account Info: Joe Smith, Acount# ACTN Balance:
$
public void printAccountInfo;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
