Sample Midterm Essay Questions

1)    Moving data between functions is an important programming principle. Describe the three parameter passing methods and give an example of when you would would use each one. (pass by reference, pass by value, pass by constant reference)

 

2)    Explain how topdown design is used to solve a problem.

 

3)    Give a brief explanation of the two memory management strategies, static and dynamic. How are they typically implemented in C++? How is data accessed? What are the main advantages/disadvantages of each.

 

4)    Code re-use is a key principle of software design. Describe several techniques that promote code re-use.

 

5)    The company/employee problem can be approached using procedural programming (function design) or OOD (object-oriented design). Which would you choose and why?