Disney web site - 326 Object-Based Programming Chapter 8 value in valueTextBox
326 Object-Based Programming Chapter 8 value in valueTextBox to the location specified in indexTextBox. The event handler for button Get Value by Name (159 164) invokes the overloaded method ShowValue- AtIndex (lines 125 129) to retrieve the value with the name specified in valueTextBox. The event handler for button Set Value by Name (lines 167 175) assigns the value in valueTextBoxto the location with the name specified in indexTextBox. 8.14 Data Abstraction and Information Hiding As we pointed out at the beginning of this chapter, classes normally hide the details of their implementation from their clients. This is called information hiding. As an example of information hiding, let us consider a data structure called a stack. Students can think of a stack as analogous to a pile of dishes. When a dish is placed on the pile, it is always placed at the top (referred to as pushing the dish onto the stack). Similarly, when a dish is removed from the pile, it is always removed from the top (referred to as popping the dish off the stack). Stacks are known as last-in, first-out (LIFO) data structures the last item pushed (inserted) on the stack is the first item popped (removed) from the stack. Stacks can be implemented with arrays and with other data structures, such as linked lists. (We discuss stacks and linked lists in Chapter 23, Data Structures.) A client of a stack class need not be concerned with the stack s implementation. The client knows only that when data items are placed in the stack, these items will be recalled in last-in, first-out order. The client cares about what functionality a stack offers, but not about how that functionality is implemented. This concept is referred to as data abstraction. Although programmers might know the details of a class s implementation, they should not write code that depends on these details. This enables a particular class (such as one that implements a stack and its operations, push and pop) to be replaced with another version without affecting the rest of the system. As long as the publicservices of the class do not change (i.e., every method still has the same name, return type and parameter list in the new class definition), the rest of the system is not affected. Most programming languages emphasize actions. In these languages, data exist to support the actions that programs must take. Data are less interesting than actions. Data are crude. Only a few built-in data types exist, and it is difficult for programmers to create their own data types. C# and the object-oriented style of programming elevate the importance of data. The primary activities of object-oriented programming in C# is the creation of data types (i.e., classes) and the expression of the interactions among objects of those data types. To create languages that emphasize data, the programming-languages community needed to formalize some notions about data. The formalization we consider here is the notion of abstract data types (ADTs). ADTs receive as much attention today as structured programming did decades earlier. ADTs, however, do not replace structured programming. Rather, they provide an additional formalization to improve the program- development process. Consider built-in type int, which most people would associate with an integer in mathematics. Rather, an int is an abstract representation of an integer. Unlike mathematical integers, computer ints are fixed in size. For example, type int in .NET is limited approximately to the range 2 billion to +2 billion. If the result of a calculation falls outside this range, an error occurs, and the computer responds in some machine-dependent manner.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.