give me some real life examples of procedural oriented programming methodology.
Answers
Answered by
0
Answer:
Explanation:
Assume you have a game like Space Invaders.
Every frame of the game, you have to redraw the screen. Starting from the top, you call a procedure to draw the aliens. Your procedure draws an alien at the coordinates you give it. Then you move on to the next one, and call your procedure to draw the alien again at the next position. You do that for the entire line. Then you go onto the next line. You call the procedure—or function—that draws aliens again. The aliens have no idea of “self” or position. That’s all contained in a data structure somewhere else. You have their position one place and have a function to draw aliens. They’re disconnected, but used together, accomplish the goal of representing aliens on the screen.
Similar questions