Fundamentals First

This book adopts the fundamentals-first and problem-driven strategy, proceeding at a steady pace through all the necessary and important basic concepts, then moving to object-oriented programming, and then to the use of the object-oriented approach to build applications with advanced features.

Why Fundamentals First?

Learning basic logic and fundamental programming techniques like loops and step-wise refinement is essential for new programmers to succeed. Students who cannot write code in procedural programming are not able to learn object-oriented programming. A good introduction on primitive data types, control statements, functions, and arrays prepares students to learn object-oriented programming.

From Fundamentals to Object-Oriented

The book is fundamentals-first. Often students have difficulty to adapt to object-oriented paradigm. The book addresses this issue in chapter 10 on transition from procedural programming to object-oriented programming. The chapter focuses on class design. Several examples are used to demonstrate the advantages of object-oriented programming. Students learn how and when to apply OOP effectively.

Problem Driven

This book uses the problem-driven approach to teach problem solving. Interesting and practical examples are used not only to illustrate syntax but also to teach problem solving and programming. Interesting and practical problems introduce each chapter and are solved within the chapter. The book uses a wide variety of problems with various levels of difficulty to motivate students. The problems cover many application areas in gaming, math, business, science, animation, and multimedia.

Why Problem-Driven?

Programming isn't just syntax, classes, or objects. It is really problem solving. Loops, methods, and arrays are fundamental techniques for problem solving. From fundamental programming techniques to object-oriented programming, there are many layers of abstraction. Classes are simply a layer of abstraction. Applying the concept of abstraction in the design and implementation of software projects is the key to developing software. The overriding objective of the book, therefore, is to teach students to use many layers of abstraction in solving problems and to see problems in small and in large. The examples and exercises throughout the book emphasize problem solving and foster the concept of developing reusable components and using them to create practical projects.

Programming, Data Structures, and Algorithms in One Text

The book seamlessly integrates programming, data structures, and algorithms into one text. It employs a practical approach to teach data structures. We first introduce how to use various data structures to develop efficient algorithms, and then show how to implement these data structures. Through implementation, students gain a deep understanding on the efficiency of data structures and on how and when to use certain data structures. Finally we introduce design and implement custom data structures for trees and graphs.

Personal Observations on Teaching Programming

I teach four programming courses on Java, C++, or Python every semester. I use a hybrid of traditional lecture and flipped classroom. Traditional lecture covers important concepts and issues. Flipped classroom is to first assign reading, programming exercises, and quizzes, and then review these in the class. I probably use 50% of time for traditional lecture and 50% time on flipped classroom. My class meets three times a week. I embrace the "the more you do it, the better you get at it" model by assigning one or two programming exercises after every meeting. Students submit programming exercises online to LiveLab. The programming exercises are automatically graded in most cases. My exercises include some even-numbered exercises. Students are asked to first attempt to solve these even-numbered exercises and then compare their programs with the solutions provided online. For more information about my courses, see