Académique Documents
Professionnel Documents
Culture Documents
4. Coding 30 marks
Snapshots(partial
implementation)
5. References [for usage of tools, 10 marks
module specific developmental
approach]
ATM WITH HUMAN COMPUTER INTERACTION
Aim
Division of module
Data flow diagram
Proposed system
The project system is demonstrated with the help of vs to demonstrate how the user interface
should be designed and it should be flowed in terms of human interaction with respect to
computer
Module
3) User menu to choose their action like withdraw, deposit, balance etc
4) The system state or there next screen to enter the amount or to display the balance
5) Transaction state
Library
Packages
a. Account\
b. AccountBelowZero
c. AccountFiveStarBalance
d. AccountNominalBalance
e. AccountLoadEventArgs
f. AccountLowBalance
g. AccountLowBalance
h. AccountNominalBalance
i. LogOffEventArgs
j. Database
k. Customer
l. LogInEventArgs
m. User
n. Utility
o. TransactionEventArgs
Techniques
1) Account
// encapsulated data
private AccountStanding m_state = null;
private string m_customerID = string.Empty;
private int m_accountNumber = 0;
m_state.Deposit(amount);
}
m_state.Withdraw(amount);
}
}
}
2) Authentication
// class constructor
public Authentication()
{
InitializeComponent();
}
// form load
private void Authentication_Load(object sender, EventArgs e)
{
btnLogIn.Enabled = GetLogInButtonEnabledState();
txtUserName.Focus();
}
#endregion
if (CrendentialsProvided != null)
{
string userName = txtUserName.Text.Trim();
string passWord = txtPassword.Text.Trim();
LogInEventArgs e = new LogInEventArgs(userName, passWord);
CrendentialsProvided(this, e);
}
else
{
throw new Exception("Event: CrendentialsProvided Failed. Please
inspect Class: Authentication, Method: OnCredentialsProvided");
}
}
#endregion
return result;
}
#endregion
}
}
#region Initializations
// class constructor
public AutomatedTellerMachine()
{
InitializeComponent();
// object instantiation
m_dataBase = new Database();
#endregion
#endregion
tsslBalance.Text = string.Empty;
tsslStatus.Text = e.Message;
tsbLogIn.Enabled = true;
tsbNewAccount.Enabled = true;
// show form
m_frmTeller.Customer = e.Customer;
m_frmTeller.MdiParent = this;
m_frmTeller.Show();
if (e.Result == AuthenticationResult.AuthenticationFail)
{
// present a message box
MessageBox.Show(e.Message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{
// let me know if something goes wrong
// REQUIREMENT: Uses a message box and show user a bad login
string message = Utility.GetErrorMessage("AutomatedTellerMachine",
"Database_AuthenticationReceived", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
#endregion
}
}
4) Teller
namespace AutomatedTellerMachine
{
public partial class Teller : Form
{
// encapsulated data
private Customer m_customer = null;
private Account m_account = null;
// delegate -- a template for an event
public delegate void MoneyTransactedEventHandler(object sender,
TransactionEventArgs e);
public delegate void LoggedOffEventHandler(object sender, LogOffEventArgs e);
// event -- created based on the delegate like a class object variable
public event MoneyTransactedEventHandler MoneyTransacted;
public event LoggedOffEventHandler LoggedOff;
#region Initailizations
// class constructor
public Teller()
{
InitializeComponent();
}
#endregion
#endregion
if (LoggedOff!=null)
{
string message = string.Concat(m_customer.Name, " Thank you for
banking with us. Have a nice day.");
LogOffEventArgs e = new LogOffEventArgs(message);
LoggedOff(this,e);
}
}
if(MoneyTransacted!=null)
{
TransactionEventArgs e = new TransactionEventArgs(balance, status);
MoneyTransacted(this, e);
}
else
{
throw new Exception("Event: MoneyTransacted Failed. Please inspect
Class: Teller, Method: OnMoneyTransacted");
}
}
#endregion
// Row: City
ListViewItem city = new ListViewItem();
city.Text = "City:";
ListViewItem.ListViewSubItem cityData = new
ListViewItem.ListViewSubItem();
cityData.Text = m_customer.City;
city.SubItems.Add(cityData);
lvwCustomer.Items.Add(city);
// Row: Country
ListViewItem country = new ListViewItem();
country.Text = "Country:";
ListViewItem.ListViewSubItem countryData = new
ListViewItem.ListViewSubItem();
countryData.Text = m_customer.Country;
country.SubItems.Add(countryData);
lvwCustomer.Items.Add(country);
// show balance
lblBalance.Text = m_account.Balance.ToString();
}
}
catch (Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("Teller",
"Database_AccountReceived", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
#endregion
OnLogOff();
this.Close();
}
#endregion
}
}
5) Customer
namespace AutomatedTellerMachine
{
public class Customer
{
// Class: Customer
// Represents a person who does business with the bank in person
// A customer may not be a user yet however.
// A customer has to register to be a user
// encapsulated data
private string m_customerID = string.Empty;
private string m_customerName = string.Empty;
private string m_address = string.Empty;
private string m_city = string.Empty;
private string m_postalCode = string.Empty;
private string m_country = string.Empty;
Ouput
Reference
1) https://www.c-sharpcorner.com/forums/how-to-write-a-c-sharp-windows-form-application-for-
atm
2) User Interface Challenges of Banking ATM Systems in Nigeria Felix Chukwuma Aguboshim
Walden University - Dr. Gail Miles, Committee Chairperson, Information Technology Faculty Dr.
Jon McKeeby, Committee Member, Information Technology Faculty Dr. Steven Case, University
Reviewer, Information Technology Faculty Chief Academic Officer Eric Riedel, Ph.D. Walden
University 2018
3) A Survey on Human Computer Interaction Technology for ATM Mengxing Zhang, Feng Wang ∗ ,
Hui Deng, Jibin Yin, Computer Technology Application Key Lab, Kunming University of Science and
Technology
5) https://www.youtube.com/watch?v=c2KedGzMd2c