Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ClassAssessment3
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
a-j.towse
ClassAssessment3
Commits
70f42e14
Commit
70f42e14
authored
May 04, 2022
by
a-j.towse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final commit
parent
a911463c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
BankAccount.class
ClassAssessment3/bin/BankAccount.class
+0
-0
BankAccount.class
ClassAssessment3/src/BankAccount.class
+0
-0
BankAccount.java
ClassAssessment3/src/BankAccount.java
+5
-4
No files found.
ClassAssessment3/bin/BankAccount.class
View file @
70f42e14
No preview for this file type
ClassAssessment3/src/BankAccount.class
0 → 100644
View file @
70f42e14
File added
ClassAssessment3/src/BankAccount.java
View file @
70f42e14
...
@@ -2,11 +2,13 @@ public class BankAccount {
...
@@ -2,11 +2,13 @@ public class BankAccount {
int
accountNumber
;
int
accountNumber
;
String
name
;
String
name
;
double
balance
;
double
balance
;
double
overdraft
;
public
BankAccount
(){
public
BankAccount
(){
accountNumber
=
0
;
accountNumber
=
0
;
name
=
"N/A"
;
name
=
"N/A"
;
balance
=
0
;
balance
=
0
;
overdraft
=
0
;
}
}
...
@@ -22,10 +24,9 @@ public class BankAccount {
...
@@ -22,10 +24,9 @@ public class BankAccount {
}
}
public
void
withdrawal
(
double
outAmount
){
public
void
withdrawal
(
double
outAmount
){
if
(
outAmount
<=
balance
||
outAmount
>
0
){
if
(
outAmount
<=
balance
||
outAmount
>
0
-
overdraft
){
balance
-=
outAmount
;
balance
-=
outAmount
;
}
}
}
}
public
void
bankFees
(){
public
void
bankFees
(){
...
@@ -39,7 +40,7 @@ public class BankAccount {
...
@@ -39,7 +40,7 @@ public class BankAccount {
System
.
out
.
println
(
balance
);
System
.
out
.
println
(
balance
);
}
}
public
void
addOverdraft
(
double
over
draft
){
public
void
addOverdraft
(
double
over
){
double
overdraft
=
over
;
}
}
}
}
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