McConnell_2004_Ch13_Unusual_Data_Structures Flashcards
How does a Jade REFERENCE differ from a Jade ATTRIBUTE?
??????
What is global data?
Global variables are accessible anywhere in a program.
Discuss common problems with Global data?
If you use global variable indiscriminately or you feel that not being able to use them is restrictive, you probably haven’t caught on to the full value of information hiding and modularity yet. Modularity information hiding, and the associated use of well-designed classes might not be reveled trues but they go in a long way toward making large programs understandable and maintainable. Once you get the mess, you’ll want to write routines and classes with as little connection as possible to global variables and the outside world.
Discuss how access routines can be used to replace global data…?
Anything you can do with global data, you can do better with access routines. The use of access routines is a core technique for implementing abstract data types and achieving information hiding. Even if you don’t want to use a full-blown abstract data type, you can still use access routines to centralize control over your data and protect yourself against changes.