The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Classes, Ownership, and Data Structures with C++ for CS2
Correct code can still rest on a weak design. Own the Design is a course-length Computer Science II (CS2) textbook for students who have completed a first programming course. It teaches students to design classes and abstract data types, reason about ownership, implement linked structures, and test through public interfaces in C++17.
Interested in this book? Show your support by saying what you'd like to pay for it!
About the Book
A program can produce the right answer and still rest on a weak design. In Computer Science II (CS2), the central questions change: What should an object be responsible for? Which behavior belongs in the public interface? Who owns each resource? Which representation makes the required operations clear, safe, and efficient?
Who This Book Is For
Own the Design is Part II of the Programming by Design series and a course-length C++17 textbook for students continuing from a first programming course or equivalent experience. It assumes experience with functions, files, arrays, vectors, records, testing, and basic recursion.
What Students Learn
Each structure is treated as a design decision: define the client-visible behavior, choose a representation, preserve its invariants, test through the public interface, and account for operation costs.
What the Book Includes
The book includes 12 chapters, numbered 13 through 24, eight technical and curricular appendices, guided examples, trace-before-code activities, chapter reviews, Programming Exercises, a staged container project, and a complete data structures project.
Free Sample
A curated PDF and EPUB sample is being prepared for this forthcoming book. It will include the complete-edition table of contents, the preface, Chapters 13 and 14, Appendix H, Sources and Further Reading, and the complete index.
Current Status
Own the Design is coming soon and is not yet published. All 12 chapters and all eight appendices are in place. The manuscript is awaiting review while images and prose are refined and the sample is prepared. Instructor resources are planned for later in the publication process. No additional chapters or appendices are planned. Use the notification form on this page to be notified when the book is published.
For Instructors
Chapter-aligned lecture slides and test banks are planned for verified instructors and will be developed as the book approaches publication. When available, these resources will be provided separately and updated alongside major revisions of the book. They are intended as adaptable starting points for course preparation, not as a hosted course or LMS integration. Verified faculty will receive access through a secure site. Visit the instructor support page for information. Faculty may use the Email the Author link on this Leanpub page to request instructor-resource access or a digital evaluation copy when considering the book for adoption. Requests should come from a faculty email address and include a link to an institutional department or faculty page that confirms the requester’s affiliation. These books and their instructor resources are independently produced and are not sponsored or endorsed by the author’s employer. Assessment material should not be shared with students.
Start with Computer Science I
Think Before Coding provides the Computer Science I (CS1) foundation and is available now.
Design the interface. Trace the ownership. Test the behavior. Explain the tradeoff. Own the design.
About the Author
Kevin Mess is a professor in Computing and Information Technology at the College of Southern Nevada. Since 2013, he has taught Computer Science I and Computer Science II. His courses guide students from their first programs through object-oriented design, data structures, and disciplined software development.
His teaching emphasizes habits that transfer beyond a single course: read the problem carefully, design before coding, trace program behavior, test ordinary and boundary cases, debug systematically, and explain technical decisions clearly. His subject areas include C++ programming, structured problem solving, classes, abstract data types, memory reasoning, linked data structures, and project-based programming.
Kevin is the author of the Programming by Design series, including Think Before Coding and Own the Design. The series provides a coherent path through Computer Science I and Computer Science II by treating C++ syntax as part of a larger process of analysis, design, implementation, testing, and revision. His books and related resources are independently produced and are not institutional publications.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.