problem7

package
v0.0.0-...-cb75c49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 0 Imported by: 0

README

Problem 7

Create methods for BankAccount, FedexAccount and KazPostAccount. From BankAccount and KazPostAccount can be withdrawn money. From FedexAccount and KazPostAccount can be sent packages.

normanOsborne := BankAccount{
    name:    "Norman Osborne",
    balance: 1_000_000,
}
peterParker := FedexAccount{
    name: "Peter Parker",
	packages: make(string[])
}
auntMay := KazPostAccount{
    name:    "Aunt May",
    balance: 200,
	packages: make(string[])
}

withdrawMoney(10, normanOsborne, auntMay) // can be withdrawn by multiple people
sendPackagesTo("Mary Jane", peterParker, auntMay) // can be sent by multiple people

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BankAccount

type BankAccount struct {
}

type FedexAccount

type FedexAccount struct {
}

type KazPostAccount

type KazPostAccount struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL