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
c1191516
Commit
c1191516
authored
May 04, 2022
by
a-j.towse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parents
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
BankAccount.java
ClassAssessment3/src/BankAccount.java
+45
-0
No files found.
ClassAssessment3/src/BankAccount.java
0 → 100644
View file @
c1191516
public
class
BankAccount
{
int
accountNumber
;
String
name
;
double
balance
;
public
BankAccount
(){
accountNumber
=
0
;
name
=
"N/A"
;
balance
=
0
;
}
public
BankAccount
(
int
accnum
,
String
accname
,
double
accbalance
){
accountNumber
=
accnum
;
name
=
accname
;
balance
=
accbalance
;
}
public
void
deposit
(
double
inAmount
){
balance
+=
inAmount
;
}
public
void
withdrawal
(
double
outAmount
){
if
(
outAmount
<=
balance
||
outAmount
>
0
){
balance
-=
outAmount
;
}
}
public
void
bankFees
(){
double
fee
=
balance
*
0.05
;
balance
-=
fee
;
}
public
void
display
(){
System
.
out
.
println
(
accountNumber
);
System
.
out
.
println
(
name
);
System
.
out
.
println
(
balance
);
}
public
void
addOverdraft
(
double
overdraft
){
}
}
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