Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Assessment Exercise 3 COM4005
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
austin.blanke
Assessment Exercise 3 COM4005
Commits
e45581e2
Commit
e45581e2
authored
May 04, 2022
by
austin.blanke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all but overdraft
parents
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
SavingsAccount.java
SavingsAccount.java
+33
-0
No files found.
SavingsAccount.java
0 → 100644
View file @
e45581e2
public
class
SavingsAccount
{
int
accountNumber
;
String
Name
;
double
balance
;
public
SavingsAccount
(){
accountNumber
=
0
;
Name
=
"noName"
;
balance
=
0
;
}
public
void
deposite
(
int
inputAmount
){
balance
=
balance
+
inputAmount
;
}
public
void
withdrawal
(
int
amountTaken
){
if
(
balance
>
0
||
balance
>=
amountTaken
||
amountTaken
<=
100
){
balance
=
balance
-
amountTaken
;
}
}
public
void
accrueIntrest
(){
balance
=
balance
*
1.05
;
}
public
void
display
(){
System
.
out
.
println
(
"Account Number: "
+
accountNumber
);
System
.
out
.
println
(
"Name: "
+
Name
);
System
.
out
.
println
(
"Balance: $"
+
balance
);
}
}
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