This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ArrangementConverter.swift | |
// Banesco | |
// | |
// Created by Matías Gil Echavarría on 4/03/21. | |
// | |
import ArrangementsClient2 | |
import RetailAccountsAndTransactionsJourney | |
import ClientCommon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CustomAccountsUseCase.swift | |
// Banesco | |
// | |
// Created by Matías Gil Echavarría on 4/03/21. | |
// | |
import Foundation | |
import RetailAccountsAndTransactionsJourney | |
import Resolver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Receiver { | |
func receiveNotification() | |
} | |
class Notifier { | |
private var notificationReceiver: Receiver | |
init(receiver: Receiver) { | |
self.notificationReceiver = receiver | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Notifier { | |
private var notificationReceiver: NotificationReceiver | |
init(receiver: NotificationReceiver) { | |
self.notificationReceiver = receiver | |
} | |
func somethingHappened() { | |
notificationReceiver.receiveNotification() | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol ATM { | |
func withdrawMoney() | |
} | |
protocol ExquisiteATM: ATM { | |
func depositMoney() | |
} | |
// Simple ATM Machine CANNOT deposit money | |
class simpleATM: ATM { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rectangle { | |
var width: Double | |
var height: Double | |
init(width: Double, height: Double) { | |
self.width = width | |
self.height = height | |
} | |
func area() -> Double { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol GeometricFigure { | |
func area() -> Double | |
} | |
class Circle: GeometricFigure { | |
var radius: Double | |
init(radius: Double) { | |
self.radius = radius | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Circle { | |
var radius: Int | |
init(radius: Int) { | |
self.radius = radius | |
} | |
} | |
class Rectangle { | |
var width: Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rectangle { | |
var width: Int | |
var height: Int | |
init(width: Int, height: Int) { | |
self.width = width | |
self.height = height | |
} | |
} |
NewerOlder