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
5bf05289
Commit
5bf05289
authored
May 04, 2022
by
austin.blanke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final Commit
parent
e45581e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
BankAccount.java
BankAccount.java
+39
-0
No files found.
BankAccount.java
0 → 100644
View file @
5bf05289
public
class
BankAccount
{
int
accountNumber
;
String
Name
;
double
balance
;
double
limit
;
public
BankAccount
(){
accountNumber
=
0
;
Name
=
"noName"
;
balance
=
0
;
limit
=
0
;
}
public
void
deposite
(
int
inputAmount
){
balance
=
balance
+
inputAmount
;
}
public
void
withdrawal
(
int
amountTaken
){
if
(
balance
+
limit
>
0
||
balance
+
limit
>=
amountTaken
){
balance
=
balance
-
amountTaken
;
}
}
public
void
bankFees
(){
balance
=
balance
*
.
95
;
}
public
void
display
(){
System
.
out
.
println
(
"Account Number: "
+
accountNumber
);
System
.
out
.
println
(
"Name: "
+
Name
);
System
.
out
.
println
(
"Balance: $"
+
balance
);
}
public
void
addOverdraft
(
double
setLimit
){
limit
=
setLimit
;
}
}
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