Identifying and Modeling Operation Parameters
So far, we’ve not been concerned with the parameters of our operations—we’ve attempted to gain only a basic understanding of the operations of each class. Let’s now take a closer look at some operation parameters. We identify an operation’s parameters by examining what data the operation requires to perform its assigned task.
authenticateUser operation of class
BankDatabase. To authenticate a user, this operation must know the account number and PIN supplied by the user. Thus we specify that operation
authenticateUser takes integer parameters
userPIN, which the operation must compare to the account number and PIN of an
Account object in the database. We prefix these ...