Commit 4bb8bb0e authored by Suleman Hussain's avatar Suleman Hussain

sdfsdf]

parent 041db0f5
Assessment Exercise 3
Video Brief
This exercise is a little different. You don’t get a started project to work from. You should create a new project yourself and then follow the instructions below.
Bank Accounts
Standard Account
Make a class for a standard bank account, following the instructions below. NB money can only be withdrawn if it is available in the account.
Create a class called BankAccount which represents a bank account, having as attributes: accountNumber (integer type), name (name of the account owner as string type), balance.
Create a constructor with parameters: accountNumber, name, balance.
Create a deposit() method which manages the deposit actions.
Create a withdrawal() method which manages withdrawals actions.
Create an bankFees() method to apply the bank fees with a percentage of 5% of the balance account.
Create a display() method to display account details.
Savings Account
Make a new class that follows the rules for the standard account except the bank fees are 0% (i.e. there are no fees) and there is a £100 withdrawal limit.
create a accrueInterest() method (for savings account) which adds 5% interest to the balance.
Overdraft
Add an addOverdraft() method which adds an overdraft limit (passed as a parameter). A user with an overdraft can withdraw money until they run out of overdraft. A savings account cannot have an overdraft.
Marking
25 marks are available for this exercise. This breaks down as follows.
Bank Account - 10 Marks
Savings Account - 5 Marks
OVerdraft Changes - 10 Marks
Submission
Your project should be uploaded to your gitlab account and you should submit a link to the gitlab project, alongside the rest of the assessment, through moodle, by 12 noon 16/05/22.
\ No newline at end of file
No preview for this file type
Assessment Exercise 3
Video Brief
This exercise is a little different. You don’t get a started project to work from. You should create a new project yourself and then follow the instructions below.
Bank Accounts
Standard Account
Make a class for a standard bank account, following the instructions below. NB money can only be withdrawn if it is available in the account.
Create a class called BankAccount which represents a bank account, having as attributes: accountNumber (integer type), name (name of the account owner as string type), balance.
Create a constructor with parameters: accountNumber, name, balance.
Create a deposit() method which manages the deposit actions.
Create a withdrawal() method which manages withdrawals actions.
Create an bankFees() method to apply the bank fees with a percentage of 5% of the balance account.
Create a display() method to display account details.
Savings Account
Make a new class that follows the rules for the standard account except the bank fees are 0% (i.e. there are no fees) and there is a £100 withdrawal limit.
create a accrueInterest() method (for savings account) which adds 5% interest to the balance.
Overdraft
Add an addOverdraft() method which adds an overdraft limit (passed as a parameter). A user with an overdraft can withdraw money until they run out of overdraft. A savings account cannot have an overdraft.
Marking
25 marks are available for this exercise. This breaks down as follows.
Bank Account - 10 Marks
Savings Account - 5 Marks
OVerdraft Changes - 10 Marks
Submission
Your project should be uploaded to your gitlab account and you should submit a link to the gitlab project, alongside the rest of the assessment, through moodle, by 12 noon 16/05/22.
\ No newline at end of file
public class Standard_Account {
public int accountNumber;
public String name;
public double balance;
public void desposit(int i) {
balance = i + balance;
}
public double display() {
return balance;
}
public void setbal(int i) {
balance=i;
}
public void withdrawl(int i) {
balance = balance - i;
}
}
public class main {
public static void main(String[] args) throws Exception {
class BankAccount{
Integer acountNumber;
String name;
BankAccount bank = new BankAccount();
bank.setbal(5);
System.out.println(bank.display());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment