0% found this document useful (0 votes)
86 views

PHP Assignment 7 OOP MVC ATM 1

This document outlines an assignment to create an ATM simulation application using PHP's MVC pattern. It includes: 1) Creating a BankDB database with an Account table containing fields like account number, name, amount, type, and password. 2) Defining an Account class to represent account objects with getters, setters, and a constructor. 3) Creating files like database.php for the database connection, account_db.php as the data access object, and views like login.php, atm.php, viewAccount.php, deposit.php, and transfer.php to handle authentication and account functions while storing the active account in sessions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

PHP Assignment 7 OOP MVC ATM 1

This document outlines an assignment to create an ATM simulation application using PHP's MVC pattern. It includes: 1) Creating a BankDB database with an Account table containing fields like account number, name, amount, type, and password. 2) Defining an Account class to represent account objects with getters, setters, and a constructor. 3) Creating files like database.php for the database connection, account_db.php as the data access object, and views like login.php, atm.php, viewAccount.php, deposit.php, and transfer.php to handle authentication and account functions while storing the active account in sessions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PHP ASSIGNMENT 4 – OOP – MVC: ATM1

Write an application to simulator an ATM which is design as below:

Model
database.php Database
account.php

account_db.php
Controller
account_controller.php
View
login.php
atm.php
viewAccount.php
deposit.php
transfer.php

database_error.php

Figure 1. Application Model

1. Create a database with name BankDB which contain a Account table as


below:
ACCOUNT table
accountNo: char(10)
ownerName: varchar(50)
amount: double
accountType: char(10)
Password: char(30)

Then fill for 5 records


2. Create an Account class describe as below:

ACCOUNT class
- accountNo
- ownerName
- amount
- accountType
- password
+Account()
+ Account(accountNo, ownerName, amount, accountType, password)
+ getter()/setter()

3. Create another files for application as figure 1. In this:


- database.php: is make a connection to database
- account_db: is DAO class for Account class
- login.php is login form, this is required when user want to use another
functions.
- atm.php is main screen of ATM, it contains buttons to call functions
- viewaccount.php: display detail information of login account.
- deposit.php: this page accept amount and run deposit system.
- Transfer.php: accept destination account number and amount then transfer
money from the login account to destination account.

Hint: use session to store login account

You might also like