Vous êtes sur la page 1sur 19

SAVEETHA INSTITUTE OF MEDICAL AND TECHNICAL SCIENCES

SAVEETHA SCHOOL OF ENGINEERING

GRADING RUBRICS FOR COURSE BASED PROJECT

Report/Assignment -2 – 100 marks

S.No Grading Rubric Maximum Marks Marks obtained


1. Division of your project 10 marks
problem into various modular
activities. Role you take in
solving a particular module and
description of the approach
taken by you to solve the
modular problem.
2. Data flow diagram- 20 marks
Interconnection between
different modules and
dependencies with other
modules
3. Proposed Design document for 30 marks
your module. Various aspects of
the project that this module
would address and criticality of
your module. Part of the
implementation of the module.
Limitations of your project
design.
Components to be included:
 Library
 Packages
 Algorithms
 Techniques

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

The Interaction design consists of various modules such

1) User home screen

2) User pin entry and validation

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

The various library which is include are

1) System.io for system input and output

2) System.net for various networking

3) System.windows.form to support windows components

And other required library for supporting the windows form

Packages

1) Each and every module is integrated as package

2) List of modules integrated as package are

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) It must be a C# Windows Form Application.

2) The application must have multiple forms and dialog boxes

3) Provide a means for the user to log in.

a. Show a welcome message on successful login

b. Show an error message on failed login

4) The list of users must be stored in an array

5) Must use classes, variables and constants in the program

6) Must use decision and looping structures

7) Use error trapping


Coding

Few main modules are

1) Account

To validate user login


namespace AutomatedTellerMachine
{
public class Account
{
// Class: Account
// Use Case: A customer uses an account.
// Its a privledge to use an account. Customer doesn't own the account
// There for the account is not a compositional object in the customer class

// encapsulated data
private AccountStanding m_state = null;
private string m_customerID = string.Empty;
private int m_accountNumber = 0;

public Account(string customerID, int accountNumber)


{
m_customerID = customerID;
m_accountNumber = accountNumber;
// start all account at a state: AccountNominalBalance
this.m_state = new AccountNominalBalance(3000.00m, this);
}

public AccountStanding AccountStanding


{
get { return m_state; }
set { m_state = value; }
}

public string CustomerID


{
get { return m_customerID; }
}

public decimal Balance


{
get { return m_state.Balance; }
set { m_state.Balance = value; }
}

public string Status


{
get { return m_state.Status; }
set { m_state.Status = value; }
}

public int AccountNumber


{
get { return m_accountNumber; }
}

public void Deposit(decimal amount)


{
// Method: Deposite
// Return: None
// Add money to the balance via state

m_state.Deposit(amount);
}

public void Withdraw(decimal amount)


{
// Method: Withdraw
// Return: None
// Subract money from the balance via state

m_state.Withdraw(amount);
}
}
}

2) Authentication

To get return back user field and proceed to next step


namespace AutomatedTellerMachine
{
public partial class Authentication : Form
{
// encapsulated data

// delegate - a template for an event


public delegate void PassCredentialEventHandler(object sender, LogInEventArgs
e);
// event -- created based on the delegate like a class object variable
public event PassCredentialEventHandler CrendentialsProvided;

// class constructor
public Authentication()
{
InitializeComponent();
}

// form load
private void Authentication_Load(object sender, EventArgs e)
{
btnLogIn.Enabled = GetLogInButtonEnabledState();
txtUserName.Focus();
}

#region Other UI Events

private void btnLogIn_Click(object sender, EventArgs e)


{
// send user name and password back to AutomatedTellerMachine
OnCredentialsProvided();
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void txtUserName_Enter(object sender, EventArgs e)


{
txtUserName.SelectAll();
}

private void txtPassword_Enter(object sender, EventArgs e)


{
txtPassword.SelectAll();
}

#endregion

#region event related code

protected virtual void OnCredentialsProvided()


{
// Method: OnPassCredentials()
// Return: None
// Publisher Annoucement to all subscribers: Hey!!! A user just provided
their credentials
// Subscriber: AutomatedTellerMachine

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

#region ui controls state


private Boolean GetLogInButtonEnabledState()
{
// Method: GetLogInButtonEnabledState
// Return: Boolean
// returns button enabled state during application runtime

Boolean result = false;

// Conditions for True


// there must be a value in txtUserName
string userValue = txtUserName.Text.Trim();
Boolean condition1 = (userValue.Length > 0);
// there must be a value in txtPassword
string passValue = txtPassword.Text.Trim();
Boolean condition2 = (passValue.Length > 0);

result = ((condition1 == true) && (condition2 == true));

return result;
}

private void txtUserName_TextChanged(object sender, EventArgs e)


{
btnLogIn.Enabled = GetLogInButtonEnabledState();
}

private void txtPassword_TextChanged(object sender, EventArgs e)


{
btnLogIn.Enabled = GetLogInButtonEnabledState();
}

#endregion

}
}

3) Automated teller machine

To have an front welcome page


namespace AutomatedTellerMachine
{
public partial class AutomatedTellerMachine : Form
{
// encapsulated data
// REQUIREMENT: Application must have multiple forms
// REQUIREMENT: Application uses mulitple classes, variables and constants
private Authentication m_frmAuthentication = null; // FORM - CLASS
private Teller m_frmTeller = null; // FORM - CLASS
private Database m_dataBase = null; // CLASS

#region Initializations
// class constructor
public AutomatedTellerMachine()
{
InitializeComponent();
// object instantiation
m_dataBase = new Database();

// Initial Event Registrations -- publisher += subscriber


m_dataBase.AuthenticationProvided += this.Database_AuthenticationRecieved;
}

private void AutomatedTellerMachine_Load(object sender, EventArgs e)


{
// REQUIREMENT: Implementation of Constant
this.Text = Utility.ApplicationName;
}

#endregion

#region UI Control Events


private void tsbLogIn_Click(object sender, EventArgs e)
{
// Method: tsbLongIn_Click
// Return: None
// Subscribes to Authentication Events
// Present the form Authentication

// REQUIREMENT: Error Handling


try
{
// instaniate form
m_frmAuthentication = new Authentication();

// event registration -- publisher += subscriber -- as needed


m_frmAuthentication.CrendentialsProvided +=
this.Authentication_CredentialsRecieved;

// present Authenticate Form


m_frmAuthentication.Show();
}
catch (Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("AutomatedTellerMachine",
"tsbLogIn_Click", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void tsbNewAccount_Click(object sender, EventArgs e)


{
// present a message box
MessageBox.Show("Impelmentation under consideration",
Utility.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}

#endregion

#region Event Subscriptions


private void Authentication_CredentialsRecieved(object sender, LogInEventArgs
e)
{
// Method: Authentication_CredentialsRecieved
// Return: None
// Recieves log in credentials
// Sends log in credentials for authentication
try
{
m_dataBase.Authenticate(e.UserName, e.Password);
}
catch (Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("AutomatedTellerMachine",
"Authentication_CredentialsRecieved", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void Teller_UpdateOnMoneyTransacted(object sender,


TransactionEventArgs e)
{
// Method: Teller_UpdateOnMoneyTransacted
// Return: None
// Receives feedback from publisher: Teller

// REQUIREMENT: Error Handling


try
{
tsslBalance.Text = string.Concat("Balance: ", e.Balance.ToString());
tsslStatus.Text = e.Status;
}
catch (Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("AutomatedTellerMachine",
"Account_UpdateOnMoneyTransacted", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

private void Teller_LoggedOff(object sender, LogOffEventArgs e)


{
// Method: Teller_LoggedOff
// Return: None
// Recieves a message from publisher: Teller
// presents the message
// change ui state

tsslBalance.Text = string.Empty;
tsslStatus.Text = e.Message;
tsbLogIn.Enabled = true;
tsbNewAccount.Enabled = true;

private void Database_AuthenticationRecieved(object sender,


AuthenticateEventArgs e)
{
// Method: Database_AuthenticationRecieved
// Return: None
// Recieves authentication result from publisher: Authentication
// responds to the authentication result

// REQUIREMENT: Error Handling


try
{
if (e.Result == AuthenticationResult.AuthenticationPass)
{
// close log in
m_frmAuthentication.Close();
// disable toolbar buttons
// fire up an account
m_frmTeller = new Teller();
// event registration -- publisher += subscriber -- as needed
m_dataBase.AccountProvided +=
m_frmTeller.Database_AccountReceived;
m_frmTeller.MoneyTransacted +=
this.Teller_UpdateOnMoneyTransacted;
m_frmTeller.LoggedOff += this.Teller_LoggedOff;

// show form
m_frmTeller.Customer = e.Customer;
m_frmTeller.MdiParent = this;
m_frmTeller.Show();

// load customer account


m_dataBase.LoadAccount(e.Customer.CustomerID);

// update atm ui state


tsslStatus.Text = e.Message;
tsbLogIn.Enabled = false;
tsbNewAccount.Enabled = false;
}

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();
}

// form load event


private void Teller_Load(object sender, EventArgs e)
{
// initialize listview columns
lvwCustomer.Columns.Clear();
lvwCustomer.Columns.Add("Customer Attribute", 100);
lvwCustomer.Columns.Add("Data", 100);
}

#endregion

#region Class Properties


// customer property
public Customer Customer
{
set { m_customer = value; }
}

#endregion

#region Publisher Announcments


protected virtual void OnLogOff()
{
// Method: OnLogOff
// Return: none
// Publisher Annoucement to all subscribers: Hey!!! The customer logged
off!
// Subscriber: AutomatedTellerMachine

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);
}
}

protected virtual void OnMoneyTransacted(decimal balance, string status)


{
// Method: OnMoneyTransacted
// Return: none
// Publisher Annoucement to all subscribers: Hey!!! A transaction just
occured.
// Subscriber: AutomatedTellerMachine

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

#region Event Subscriptions


public void Database_AccountReceived(object sender, AccountLoadEventArgs e)
{
// Method: Database_AccountReceived
// Return: None
// receives a customer account from its publisher, Database
// loads the customer's accounts for display

// REQUIREMENT: Error Handling


try
{
m_account = e.Account;
// UI Form Update -- Show us the data
string titleText = string.Concat(m_customer.Name, " - Account Number:
", m_account.AccountNumber.ToString());
this.Text = titleText;

// test for null


if (m_account != null)
{
// populate listview
lvwCustomer.Items.Clear();
// Row: Customer Name
ListViewItem customerName = new ListViewItem();
customerName.Text = "Customer:";
ListViewItem.ListViewSubItem customerNameData = new
ListViewItem.ListViewSubItem();
customerNameData.Text = m_customer.Name;
customerName.SubItems.Add(customerNameData);
lvwCustomer.Items.Add(customerName);
// Row: Address
ListViewItem address = new ListViewItem();
address.Text = "Address:";
ListViewItem.ListViewSubItem addressData = new
ListViewItem.ListViewSubItem();
addressData.Text = m_customer.Address;
address.SubItems.Add(addressData);
lvwCustomer.Items.Add(address);

// 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: Postal Code


ListViewItem postalCode = new ListViewItem();
postalCode.Text = "Postal Code:";
ListViewItem.ListViewSubItem postalCodeData = new
ListViewItem.ListViewSubItem();
postalCodeData.Text = m_customer.PostalCode;
postalCode.SubItems.Add(postalCodeData);
lvwCustomer.Items.Add(postalCode);

// 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

#region UI Contol Events


private void btnDeposit_Click(object sender, EventArgs e)
{
// Method: btnDeposit_Click
// Return: None
// Add to the balance
decimal amount = nudAmount.Value;

// REQUIREMENT: Error Handling


try
{
// make a deposit
m_account.Deposit(amount);
// update Teller UI
lblBalance.Text = m_account.Balance.ToString();
// Announce to subscriber AutomatedTellerMachine a transaction has
been made
OnMoneyTransacted(m_account.Balance, m_account.Status);
}
catch (Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("Teller", "btnDeposit_Click",
ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}

private void btnWithdraw_Click(object sender, EventArgs e)


{
// Method: btnWithdraw_Click
// Return: None
// Subtract from the balance

decimal amount = nudAmount.Value;

// REQUIREMENT: Error Handling


try
{
// make a withdraw
m_account.Withdraw(amount);
// update Teller UI
lblBalance.Text = m_account.Balance.ToString();
// Announce to subscriber AutomatedTellerMachine a transaction has
been made
OnMoneyTransacted(m_account.Balance, m_account.Status);
}
catch(Exception ex)
{
// let me know if something goes wrong
string message = Utility.GetErrorMessage("Teller",
"btnWithdraw_Click", ex.Message);
MessageBox.Show(message, Utility.ApplicationName,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}

private void nudAmount_Enter(object sender, EventArgs e)


{
// making data entry just a little easier... Hopefully!
nudAmount.Select(0, nudAmount.Value.ToString().Length);
}

private void btnClose_Click(object sender, EventArgs e)


{

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;

public Customer(string customerID, string customerName, string address, string


city, string postalCode, string country)
{
m_customerID = customerID;
m_customerName = customerName;
m_address = address;
m_city = city;
m_postalCode = postalCode;
m_country = country;
}

public string CustomerID


{
get { return m_customerID; }
}

public string Name


{
get { return m_customerName; }
}

public string Address


{
get { return m_address; }
}
public string City
{
get { return m_city; }
}

public string PostalCode


{
get { return m_postalCode; }
}

public string Country


{
get { return m_country; }
}
}
}

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

4) AUTOMATED TELLER MACHINE MENU DESIGN COMPARATIVE ANALYSIS: A CASE STUDY OF


SELECTED BANKS IN ABUJA, NIGERIA. Osaigbovo Timothy, Department of ICT, Aduvie
International School, Abuja Nigeria Garba Suleiman Department of ICT, FCT College of Education,
Abuja Nigeria Peter Ayemhonlan Department of ICT, National Defence College, Abuja Nigeria

5) https://www.youtube.com/watch?v=c2KedGzMd2c

Vous aimerez peut-être aussi