Behavior

noun

say it: “bih-HAYV-yer” /bɪˈheɪvjər/

What an object can do: the methods it offers.

What is Behavior?

An object's behavior is what it can do: the set of methods it offers. A Microwave object's behavior might include Start, Stop and AddTime.

microwave.AddTime(30);
microwave.Start();
microwave.Stop();

In a sentence

  • “A shopping cart's behavior includes adding an item and working out the total.”

Level: Novice · More OOP terms at this level

Updated