Skip to content

Instantly share code, notes, and snippets.

View matiasdim's full-sized avatar

Matías matiasdim

View GitHub Profile
//
// ArrangementConverter.swift
// Banesco
//
// Created by Matías Gil Echavarría on 4/03/21.
//
import ArrangementsClient2
import RetailAccountsAndTransactionsJourney
import ClientCommon
//
// CustomAccountsUseCase.swift
// Banesco
//
// Created by Matías Gil Echavarría on 4/03/21.
//
import Foundation
import RetailAccountsAndTransactionsJourney
import Resolver
protocol Receiver {
func receiveNotification()
}
class Notifier {
private var notificationReceiver: Receiver
init(receiver: Receiver) {
self.notificationReceiver = receiver
}
class Notifier {
private var notificationReceiver: NotificationReceiver
init(receiver: NotificationReceiver) {
self.notificationReceiver = receiver
}
func somethingHappened() {
notificationReceiver.receiveNotification()
}
}
protocol ATM {
func withdrawMoney()
}
protocol ExquisiteATM: ATM {
func depositMoney()
}
// Simple ATM Machine CANNOT deposit money
class simpleATM: ATM {
protocol ATM {
func depositMoney()
func withdrawMoney()
}
// Simple ATM Machine CANNOT deposit money
class simpleATM: ATM {
func depositMoney() {
// This method is not used for this class, since it does not have this capability
}
class Rectangle {
var width: Double
var height: Double
init(width: Double, height: Double) {
self.width = width
self.height = height
}
func area() -> Double {
protocol GeometricFigure {
func area() -> Double
}
class Circle: GeometricFigure {
var radius: Double
init(radius: Double) {
self.radius = radius
}
class Circle {
var radius: Int
init(radius: Int) {
self.radius = radius
}
}
class Rectangle {
var width: Int
class Rectangle {
var width: Int
var height: Int
init(width: Int, height: Int) {
self.width = width
self.height = height
}
}