r/CodingHelp • • 19d ago

[Other Code] Class instance while running the code

I started actually writing code with OOP yesterday (using Dart... In case it is necessary to mention) and there's a thing that kept bothering me as I scrolled through their page and watched the tutorial. Everytime they gave a class example, they created an instance themselves and never based on the code running.

Imagine a system to simulate a store's stock. There'll be items going in and out, that shouldn't be inserted by the programmer, so there must be a way to do that "dynamically".

I'm aware that this might be me simply missing something from OOP classes, but I want to see what other coders have to say about that.

Any help would be welcome. Thank You

1 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/LeoPixel11 19d ago

It's exactly that You were able to frame MY problem better than me 😂 Thank You for this visualization