Writing a story and a program code is not that different from each other. In fact I would say that authors actually use object oriented programming to create a story.
So the Author of the story would be the 'Class'.
The characters of the story will be the 'Objects' of the class 'Author'. This is because the characters originate from within the mind of the author.
Each object i.e. character will have its own behavior (properties) and mannerism of doing things (which would be the Methods).
These characters would display all properties according to object oriented programming concept.
For example, they would display Polymorphism, where a character would behave differently in different situations.
The characters would display Encapsulation. All their knowledge and the logic to apply that knowledge to situations are encapsulated within the brain. They would move the story forward accordingly.
The characters would display Abstraction wherein they would not convey everything that is on their mind and instead only show what they want to show. It is those abstract gray areas that the author will have these characters have.
They would display Inheritance wherein the characters would influence another character, transferring some of the mannerisms and behavior as the story moves along.
The best thing I love about both programming and writing is: both need logic to create the intended flow.
No comments:
Post a Comment