Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Assessment Exercise 3
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
sam.pople
Assessment Exercise 3
Commits
469d9e5a
Commit
469d9e5a
authored
Jun 05, 2022
by
sam.pople
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submission final
parent
942a5f47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
BankAccount.java
src/BankAccount.java
+7
-7
SavingsAccount.java
src/SavingsAccount.java
+2
-3
No files found.
src/BankAccount.java
View file @
469d9e5a
...
@@ -2,22 +2,22 @@ public class BankAccount {
...
@@ -2,22 +2,22 @@ public class BankAccount {
// Transactions are in pence
// Transactions are in pence
public
BankAccount
(
int
account
N
umber
,
String
name
,
int
balance
)
{
public
BankAccount
(
int
account
n
umber
,
String
name
,
int
balance
)
{
this
.
Account
Numbervalue
(
accountN
umber
);
this
.
Account
numbervalue
(
accountn
umber
);
this
.
Namevalue
(
name
);
this
.
Namevalue
(
name
);
this
.
Balancevalue
(
balance
);
this
.
Balancevalue
(
balance
);
}
}
private
int
accountNumber
;
private
int
accountnumber
;
private
int
balance
;
private
String
name
;
private
String
name
;
private
int
balance
;
private
double
fees
=
0.95
;
private
double
fees
=
0.95
;
protected
int
overdraft
=
0
;
protected
int
overdraft
=
0
;
public
int
getAccountNumber
()
{
public
int
getAccountNumber
()
{
return
account
N
umber
;
return
account
n
umber
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
name
;
return
name
;
...
@@ -32,8 +32,8 @@ public class BankAccount {
...
@@ -32,8 +32,8 @@ public class BankAccount {
return
overdraft
;
return
overdraft
;
}
}
public
void
Account
Numbervalue
(
int
accountN
umber
)
{
public
void
Account
numbervalue
(
int
accountn
umber
)
{
this
.
account
Number
=
accountN
umber
;
this
.
account
number
=
accountn
umber
;
}
}
public
void
Namevalue
(
String
name
)
{
public
void
Namevalue
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
...
...
src/SavingsAccount.java
View file @
469d9e5a
public
class
SavingsAccount
extends
BankAccount
{
public
class
SavingsAccount
extends
BankAccount
{
//final submission
public
SavingsAccount
(
int
accountnumber
,
String
name
,
int
balance
)
{
public
SavingsAccount
(
int
accountNumber
,
String
name
,
int
balance
)
{
super
(
accountnumber
,
name
,
balance
);
super
(
accountNumber
,
name
,
balance
);
this
.
Feesvalue
(
1.00
);
this
.
Feesvalue
(
1.00
);
}
}
...
...
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