© Doug Winnie 2021
D. WinnieEssential Java for AP CompScihttps://doi.org/10.1007/978-1-4842-6183-5_52

52. The Role-Playing Game Character

Doug Winnie1  
(1)
Mission Hills, KS, USA
 

When we program multiple lines of code in a process, we refer to this as the program flow. As we run through our program, there is a flow, like the flow of a river that carries water from the origin to the river’s end. A flow is how the program operates and what happens with values throughout our code.

But as we look at object-oriented programming, the approach is much different. We focus on the objects that we have in our program and how they work together to make our program work. The flow is still there, but it is encapsulated within each of the objects we work with. Each ...

Get Essential Java for AP CompSci: From Programming to Computer Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.