The designer lists the operations and decides what buttons need to be pressed, and in what order, to tell the remote control about the operation to be performed.
Since this is the first time you've thought about designing an object, and you may not know what kind of operations to write, I'll write the operations down for you.
That might work if you only care about a Rectangle or two. But suppose you had several hundreds. You'd have to look it up. Have you ever called a credit card company to get information about your account? They ask for your account number. Why? To look it up. Didn't they set up your account? Well, yes, but they set up millions of accounts. It's easier for them to look up your information if you tell them the account number.
The last operations are Compute the area and Compute the perimeter. These thing can be computed once you know the height and width of the rectangle.
In Java, the operations are called methods. (They're called member functions in C++). We'll call them methods from now on.
Method names are identifiers. They follow the same rule as variable names. That is, you must start with an alphabetic character, underscore, or dollar sign, followed by zero or more alphabetic characters, digits, underscores or dollar signs.
Java style says that methods should follow the same rule as variable. Capitalize the first character of each word, except the first character of the first word. Don't use underscores or dollar signs.
Let's rewrite the operations as identifiers.
Getters look up information, or possibly compute information, but without modifying the object. So if we getHeight on an object, we are retrieving the height information from the Rectangle object. This should not change any internal values of the object.
Occasionally, we have methods that return a boolean type. these are called query methods. A query is a question. Query methods ask if an object has a certain property. For example, we have a method called isSquare which we use to determine if the height and width are the same.
Not all methods are getters or setters. However, they are common enough that we mention them now.