//This is An OOP Model of a bank account
//OOP is suitable for when you have relatively 
//few operations and and large data sets


//Base account model implements the standard features 

class Account {
	constructor(name, age, amount) {
		this._name = name;
		this._age = age;
		this._balance = amount;	
	}

	//deposit method for account class
	deposit(amount){
		this._balance += amount;
		return "TRANSACTION SUCCESSFUL: You have deposited " + amount;
	}

	//withdraw method for account class
	withdraw(amount){
		if (amount < this._balance) {
			this._balance -= amount;	
			return "TRANSACTION SUCCESSFUL: You have withdrawn " + amount;
		}
		
	}

	//balance method for account class
	balance(){
		this._balance;
		return "TRANSACTION SUCCESSFUL: You have " + this._balance + " in your account";
	}
}


//export an instance 
module.exports = {
	Ade : new Account("Adeoluwa Adejumo", 5, 5000)
	Victoria: new SavingsAcc("Victoria Offoma" 19, 50000)
}
@@ -801,16 +801,87 @@
 %0A%09%7D%0A%7D%0A%0A%0A
+class SavingsAcc extends Account %7B%0A%09super(name, age, amount) %7B%0A%09%7D%09%0A%7D%0A%0A%0A
 //export
@@ -956,16 +956,18 @@
 o%22, 
-5
+20
 , 5000)
+,
 %0A%09Vi
@@ -1006,16 +1006,17 @@
  Offoma%22
+,
  19, 500

implement savings account class