Nt1310 Unit 1 Modularization

650 Words3 Pages
1) What is modularization, and why do we want to do this?? Design It is an approach to program design that involves developing complex programs not as “contiguous structures” but as assemblages of self-contained parts or “modules”. The modules usually enclose one independent point of functionality relative to the total functionality of the program. They are “modular”in the sense of them being complete unto themselves and interchangeable into any larger “construction” also prepared to make use of its functionality. The analogy of interchangeable pieces of computer hardware designed to fit into different computer configurations is appropriate. There is also the added value of being able to visualize a program as a complex of of separate individual functions Execution Being able to task an individual programmer to complete one…show more content…
When would I want to pass by Value versus by Reference? Passing by value is the calling of another method within a main method that is paused while a variable within it is routed into and processed in the called method. The result of the processing of the variable however is not carried back into the main method. The main method merely resumes with the original value of the variable. Passing by reference by contrast involves carrying over the result of the processed variable from the called method into the main method. The main method then resumes but now with the processed variable. You would want to pass by value if you wanted the processing of a variable to confine itself only to the called method. That is, you want the output to localize only and don’t need it to carryover. There is additional functionality in other words to be had with the original variable(s) in the main method. In passing by reference, there isn’t. 3) Describe local, class level and global level scope. What is meant by declaring variables "Local as Possible" why do you want to do

More about Nt1310 Unit 1 Modularization

Open Document