Accessor, Mutator, and Constructors


Hey guys, I’ve searched this subreddit for posts like this and I’m still super confused about accessors mutators and constructors (especially constructors). From what I’ve gathered, accessors access private information and show it to the public (?, right?), mutators change private variables in public (?, again Idk), and I honestly have no clue what constructors do. My teacher has a very confusing way of explaining it that I can’t understand, and with the zoom era it’s difficult to ask questions. Please help me understand what they are and how I could use them but in very basic terms. THank you.

In: Engineering