#include <iostream>
#include <string>
#include "account.h"


using namespace std;

int main()
{
	char firstName[255];
	char lastName[255];
	char sinNumber[255];
	double balance = 0;
	int accountType = 0;
	int transactions = 0;
	
	


	//Retrieve client information
	cout << "Please fill out the information below for registration:" << endl;
	cout << "Enter first name:      ";
	cin.getline(firstName, 255);
	cout << "Enter last  name:      ";
	cin.getline(lastName, 255);
	cout << "Enter SIN number:      ";
	cin.getline(sinNumber, 255);
	cout << "Enter initial balance: ";
	cin >> balance;
	cout << "Enter account type:\n       Chequing - 1\n        Savings - 2 (Or any number)\n            Choice:    ";
	cin >> accountType;
	cout << "\nPlease wait..." << endl;
	
	//Creating the account
	Account account(firstName, lastName, sinNumber, balance, accountType, transactions);

	double deposit;
	double withdraw;
	double amount;
	double ammount;
	int transaction;
	
	cout << "Amount to deposit:     ";
	cin >> amount;
	deposit = account.DepositAmt(amount);
	cout << "Your new balance is:   " << deposit << endl;
	cout << "Amount to withdraw:    ";
	cin >> ammount;
	withdraw = account.WithdrawAmt(ammount);
	if (deposit >= 1 && withdraw >=1)
	{
       transactions = transactions + 2;
       
    }
	else if (deposit >= 1 || withdraw >=1)
	{
        transactions = transactions + 1;
        
	}
	else
	{

	};
	cout << "Your new balance is:   " << withdraw << endl;
	cout << account.getAccountType()  << "\n" << endl;
	cout << "Statement is ready:\n  " << endl;
	cout << "Transactions:  " << transactions << endl;

}
