Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Assesment Prog 2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gavin.white
Assesment Prog 2
Commits
e6364472
Commit
e6364472
authored
Dec 08, 2022
by
gavin.white
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
9386f8b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
SavingsAccount.java
SavingsAccount.java
+21
-0
No files found.
SavingsAccount.java
0 → 100644
View file @
e6364472
package
assessment
;
public
class
SavingsAccount
extends
BankAccount
{
// constructor
public
SavingsAccount
(
int
accountNumber
,
String
name
)
{
super
(
accountNumber
,
name
);
}
// accrue interest on the current balance
public
void
accrueInterest
()
{
double
interest
=
this
.
getBalance
()
*
0.05
;
this
.
deposit
(
interest
);
}
// override the addOverdraft() method to prevent a SavingsAccount from having an
// overdraft limit
@Override
public
void
addOverdraft
(
double
overdraftLimit
)
{
// do nothing
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment