Skip to content

Account deposit

Go method with receiver

Flowchart (ISO 5807)

StartInput amounta.balance = a.balance + amountEndFigure 1 — Account.Deposit

Source code

Go
func (a *Account) Deposit(amount int) {
    a.balance += amount
}

The editor opens with this code — change it and the chart redraws.

Language
Go
Constructs
method with receiver
Topic
Classes & methods
Formats
Word, Visio, draw.io, PDF, SVG

Related examples