Interface: MethodError: no method matching

Here’s how I think this is meant to be run:

  1. Clone the repo e.g.
$ git clone https://github.com/PacktPublishing/Hands-on-Design-Patterns-and-Best-Practices-with-Julia.git
  1. Change to the chapter directory and run julia from there:
$ cd Hands-on-Design-Patterns-and-Best-Practices-with-Julia/Chapter03/

:../Chapter03$ julia --project=.
  1. In the Julia REPL, go to package mode ]:
(Chapter03) pkg> dev FighterJets
(Chapter03) pkg> dev Vehicle

Then you can run the code:

julia> include("4_interface.jl")
Powered on: FighterJet(true, 0.0, (0.0, 0.0))
Changed direction to 0.52: FighterJet(true, 0.52, (0.0, 0.0))
Moved (867.82,496.88): FighterJet(true, 0.52, (867.82, 496.88))
Powered off: FighterJet(false, 0.52, (867.82, 496.88))

? @tk3369

1 Like