Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package atm;
- import java.util.Date;
- public class AtmMachine {
- public enum BankAccountStatus {
- ACTIVE, BLOCKED, BANNED, COMPROMISED, UNKNOWN, DISABLED, ARCHIVED;
- }
- public enum TransactionStatus {
- SUCCESS, FALIED, PARTIAL, CANCELLED, INTERUPTTED, FULL, UNKNOWN
- }
- public enum TransactionType {
- WITHDRAW, BALANCE_CHECK, CASH_DEPOSIT, CHEQUE_DEPOSIT
- }
- public class Address {
- String street, landmark, city, state, pincode, country;
- }
- public class Bank {
- String bankId;
- String name;
- Address address;
- // Add ATM
- }
- public class ATM {
- String bankId;
- String atmId;
- Address address;
- Screen screes;
- KeyPad keypad;
- Cashdispancr cd;
- Printer p;
- CheckDepositSlot cdp;
- CashDepositSlot cashdp;
- // Authenticate user
- // makeTransaction(Customer c,TransactionType t);
- }
- public class Screen {
- // display
- TransactionType tType;
- }
- public class KeyPad {
- // take input
- }
- public class Cashdispancr {
- // withdraw money
- }
- public class Printer {
- // print Receipt
- }
- public abstract class DepositSlot {
- private double totalAmount;
- // public double getTotalAmount();
- }
- public class CheckDepositSlot extends DepositSlot {
- // public double getCheckAmount();
- }
- public class CashDepositSlot extends DepositSlot {
- // public double receiveDollarBill();
- }
- public class Account {
- String accountNo;
- String bankID;
- BankAccountStatus status;
- int avilableBalance;
- }
- public class Card {
- String carNumber;
- Date expiry;
- String cardType;
- String pincode;
- Address billingAddress;
- }
- public class Customer {
- String name, mobile, email;
- Address address;
- Account account;
- Card card;
- // changeBillingAddress
- // make transcation(Transaction );
- }
- public abstract class Transcation {
- String transctionId;
- Date creation;
- TransactionStatus status;
- }
- public class WithDraw extends Transcation {
- double withdrawAMount;
- }
- public class BalanceCheck extends Transcation {
- String accountNo;
- }
- public abstract class Deposit extends Transcation {
- private double amount;
- // public double getAmount();
- }
- public class CheckDeposit extends Deposit {
- private String checkNumber;
- private String bankCode;
- // public String getCheckNumber();
- }
- public class CashDeposit extends Deposit {
- private double cashDepositLimit;
- }
- public class Transfer extends Transcation {
- private int destinationAccountNumber;
- // public int getDestinationAccount();
- }
- }
Add Comment
Please, Sign In to add comment