Hierarchy of object oriented program execution

Hi, I have a very basic question about the execution of object oriented program execution. In any OOP language, I know that the program enters in and begins at "main". From there, I am a little confused on how it executes. In simple machine language code, the program executes sequentially, line by line. So how does object-oriented code run?

For example, say I had a program structured the following way:

1
2
3
4
5
6
7
main()

initialization

void method 1()

void method 2()


Are these methods simultaneously running after some initialization, and which one executes depending on what i/o is happening in the code?
OOP is a design paradigm. It does not change the rules of how the languages operates. C++ still runs line-by-line, regardless of whether or not you are using OOP.

When you call a function from main... main's execution stops and the function's execution starts. Once that function returns, then main's execution begins again right where it left off.
Topic archived. No new replies allowed.