DIP Implementation
class PaymentService {
private let _database: Database
init(database: Database) {
_database = database
}
func paymentIsValid() {
// Implementation code
}
func openDatabase() {
// Implementation code
}
func addNewPayment() {
// Implementation code
}
func removePaymentByID() {
// Implementation code
}
func updatePaymentByID() {
// Implementation code
}
}INFO