Title: Enriched Learning Summary
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER

Enriched Learning Summary

Learning Enrichment: How Do I Approach Writing a Program?

- This is an Interactive Learning Enrichment that demonstrates how to address the issue of How to approach writing a program.
- The first step is to thoroughly understand the problem to be solved.
- It is also necessary to break a problem down into manageable pieces.
- The 2 people in this Learning Enrichment material provide some insight into this process.

Learning Enrichment: Debugging with Print Statements

- If you are having trouble figuring out why your program doesn't work, then it is possible that simply placing a strategic print statement will tell you a lot. It is good to have a meaningful output and it is also useful to incrementally add the print statements until it becomes clear what is really happening.
- In this Learning Enrichment you will see some interactive discussions between several characters in an attempt to use the print statement approach to figuring out what is wrong with a program.

Learning Enrichment: Using the Eclipse Debugger

- If you have difficulty figuring out what is wrong with your program, a previous Learning exercise worked through the idea of adding strategic print statements. Using print statements is a good way to go, but you will find it worth your while to learn how to use the Eclipse debugger. This optional unit goes through some of the key Eclipse debugger features.

Learning Enrichment: Object-Oriented techniques versus over using static data

- In JH4, you had a chance to write a program using 2 different approaches (Object-Oriented Programming (OOP) versus using static). Although this particular assignment didn't show the advantages of OOP approachs, you should normally use the OOP approach. This Learning explores the advantages of Object-Oriented programming.
- Object-Oriented Programming (OOP) techniques are the modern way to go with programming. Using static methods and data is the old-fashion "Fortran/Cobol" approach. Using OOP techniques provides the following advantages over older more traditional techniques:
  - OOP techniques create more modular programs that can be expanded to very large projects with many people working on the same project.
  - OOP techniques will usually provide a simpler way to understand the created project
  - OOP code is easier to expand and update.
- Unfortunately first time Java programmers often struggle with and resist using OOP techniques. Common problems include:
  - Putting all code in main
  - Creating too much static (i.e. global) data
  - Not breaking the logic down to simple classes and methods that capture the concepts of the project.

Last Modified: September 19, 2015 12:37 PM