Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Bank
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
jose.alencastro
Bank
Commits
4b119eaf
Commit
4b119eaf
authored
May 15, 2022
by
jose.alencastro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
29cb3a6c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
14 deletions
+13
-14
SavingsAccount.class
SavingsAccount.class
+0
-0
SavingsAccount.java
SavingsAccount.java
+13
-14
No files found.
SavingsAccount.class
View file @
4b119eaf
No preview for this file type
SavingsAccount.java
View file @
4b119eaf
public
class
SavingsAccount
{
// bank account attributes
...
...
@@ -14,12 +13,6 @@ public class SavingsAccount
balance
=
4000
;
}
// deposit method
public
void
deposit
(
double
amount
)
{
balance
=
balance
+
amount
;
}
// withdraw method
public
void
withdraw
(
double
amount
)
{
...
...
@@ -33,6 +26,12 @@ public class SavingsAccount
}
}
// deposit method
public
void
deposit
(
double
amount
)
{
balance
=
balance
+
amount
;
}
// bank fee method
public
double
bankFee
()
{
...
...
@@ -41,13 +40,6 @@ public class SavingsAccount
return
balance
;
}
// display method
public
void
displayAccountDetails
()
{
System
.
out
.
println
(
"Account Number: "
+
accountNumber
+
"\n"
);
System
.
out
.
println
(
name
+
": $"
+
balance
);
}
// interest method
public
int
accrueInterest
()
{
...
...
@@ -56,6 +48,13 @@ public class SavingsAccount
return
(
int
)
balance
;
}
// display method
public
void
displayAccountDetails
()
{
System
.
out
.
println
(
"Account Number: "
+
accountNumber
+
"\n"
);
System
.
out
.
println
(
name
+
": $"
+
balance
);
}
public
static
void
main
(
String
[]
args
)
{
SavingsAccount
bensAccount
=
new
SavingsAccount
();
...
...
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