/bank

Primary LanguageGo

Day 14/100: Learn about structs

  • create first Struct Account
  • using how to initialize the struct

Day 14/100: Learn about reference, pointers

  • using new to create an account
  • comparing the accounts to understend References, pointers
  • create method withdraw: validations to withdraw be greater than 0 and if streamline has money available

Day 14/100: Returns, packages, visibility

  • created deposit method: it returns a message (string) and new amount (float64);
  • create transfer method
  • create package accounts

Day 15/100:

  • structs composition
  • nested structs
  • visibilidade
  • new package clients to save clients info
  • field Owner from Account now is using new type from clients.go

Day 15/100: Interface

  • create saving account (similar to streamline)
  • create a method PayBill, also created an Interface verifyAccountType. This way both streamline or savings can pay a bill