Praise for the first edition:
"The well-written, comprehensive book...[is] aiming to become a de facto reference for the language and its features and capabilities. The pace is appropriate for beginners; programming concepts are introduced progressively through a range of examples and then used as tools for building applications in various domains, including sophisticated data structures and algorithms...Highly recommended. Students of all levels, faculty, and professionals/practitioners.� -D. Papamichail, University of Miami in CHOICE Magazine
Mark Lewis'� Introduction to the Art of Programming Using Scala� was the first textbook to use Scala for introductory CS courses. Fully revised and expanded, the new edition of this popular text has been divided into two books. Introduction to Programming and Problem-Solving Using Scala is designed to be used in first semester college classrooms to teach students beginning programming with Scala. The book focuses on the key topics students need to know in an introductory course, while also highlighting the features that make Scala a great programming language to learn.
The book is filled with end-of-chapter projects and exercises, and the authors have also posted a number of different supplements on the book website. Video lectures for each chapter in the book are also available on YouTube. The videos show construction of code from the ground up and this type of "live coding" is invaluable for learning to program, as it allows students into the mind of a more experienced programmer, where they can see the thought processes associated with the development of the code.
About the Authors
Mark Lewis is a Professor at Trinity University. He teaches a number of different courses, spanning from first semester introductory courses to advanced seminars. His research interests included simulations and modeling, programming languages, and numerical modeling of rings around planets with nearby moons.�
Lisa Lacher is an Assistant Professor at the University of Houston, Clear Lake with over 25 years of professional software development experience. She teaches a number of different courses spanning from first semester introductory courses to graduate level courses. Her research interests include Computer Science Education, Agile Software Development, Human Computer Interaction and Usability Engineering, as well as Measurement and Empirical Software Engineering.
Basics of Computers, Computing, and ProgrammingHistory HardwareCentral Processing UnitMemoryInput/Output DevicesSoftwareNature of ProgrammingProgramming ParadigmsImperative ProgrammingFunctional ProgrammingObject-Oriented ProgrammingLogic ProgrammingNature of ScalaEnd of Chapter MaterialSummary of ConceptsExercisesProjects Scala BasicsScala ToolsExpressions, Types, and Basic Math Objects and Methods Other Basic TypesBack to the Numbers Binary Arithmetic Negative Numbers in Binary Other Integer TypesOctal and Hexadecimal Non-Integer Numbers The math Object Naming Values and Variables Patterns in Declarations Using Variables Details of Char and String Escape Characters Raw StringsString Interpolation String Methods Immutability of Strings Sequential Execution Comments A Tip for Learning to ProgramEnd of Chapter Material Problem Solving Approach Summary of Concepts Self-Directed Study Exercises ConditionalsMotivating Example The if Expression Comparisons Boolean Logic Precedence Nesting ifs Bit-Wise Arithmetic End of Chapter Material Problem Solving Approach Summary of Concepts Self-Directed Study Exercises Projects Functions Motivating ExampleFunction Refresher Making and Using Functions Problem Decomposition Function Literals/Lambda Expressions/Closure Side Effects Thinking about Function Execution type Declarations Putting It Together End of Chapter Material Problem Solving Approach Summary of Concepts Self-Directed Study Exercises Projects Recursion for Iteration Basics of Recursion Writing Recursive Functions User Input Abstraction Matching Bad Input, Exceptions, and the try/catch Expression Putting It Together Looking Ahead End of Chapter MaterialProblem Solving Approach Summary of Concepts Self-Directed Study Exercises Projects Arrays and Lists in Scala Making Arrays Using Arrays Lists Bigger Arrays and Lists with Fill and Tabulate Standard MethodsBasic Methods Higher-Order Methods reduce and fold Combinatorial/Iterator Methods Complete Grades Script/Software Development Playing with Data Reading the Data Finding Maximum Values End of Chapter Material Problem Solving Approach Summary of Concepts Self-Directed Study Exercises Projects Type Basics and Argument Passing Scala APIThe Option Type Parametric Functions Subtyping Variable Length Argument Lists Mutability and Aliasing Basic Argument Passing Currying Pass-By-Name Multidimensional Arrays Classifying Bugs End of Chapter Material Problem Solving ApproachSummary of Concepts Self-Directed StudyExercises Projects Loops while Loopdo-while Loop for Loop Range Type yield if Guards Multiple Generators Patterns in for LoopsVariable Declarations Multidimensional Sequences and for Loops Testing Putting It TogetherEnd of Chapter Material Problem Solving Approach Summary of Concepts Self-Directed Study Exercises Projects Text Files I/O Redirection Packages and import Statements Reading from Files Iterators String split Method Reading from Other Things Other Options (Java Based)Writing to File Appending to File Use Case: Simple Encryption Command Line Arguments Mapping a File Character Offset Alphabet Flip Key WordPutting It Together Primes and Real Cryptography End of Chapter Material Summary of Concepts Self-Directed Study Exercises Projects Case ClassesUser Defined Types case classes Making Objects Accessing Members Named and Default Arguments (Advanced) The copy Method case class Patterns Mutable classes Putting It TogetherEnd of Chapter Material Summary of Concepts Self-Directed Study Exercises Projects GUIs GUI Libraries and History First Steps Stages and Scenes Events and Handlers Controls Text ControlsButton-like Controls Selection Controls PickersTableViewTreeViewMenus and FileChooser Other StuffObservables, Properties, and Bindings Numeric Properties and BindingsConditional Bindings Layout and Panes scalafx.scene.layout Panes scalafx.scene.control Panes Putting It TogetherEnd of Chapter Material Summary of Concepts Self-Directed Study Exercises Projects Graphics and Advanced ScalaFXShapes Path Elements Paint and Stroke Basic Keyboard, Mouse, and Touch InputImages Writing Images to File Transformations Animation Transitions Timelines AnimationTimer Canvas Settings Basic Fills and Strokes Building a Path Image Operations on CanvasA Canvas Based GameEffects Charts Media Web 3D Graphics Putting It Together End of Chapter Material Summary of Concepts Exercises Projects Sorting and SearchingBasic Comparison Sorts Bubble Sort Selection Sort (Min/Max Sort) Insertion Sort Testing and Verifying Sorts Sort VisualizationOrder Analysis Shell Sort (Diminishing Gap Sort) Searching Sequential Search (Linear Search) Binary SearchSorting/Searching with case classes Sorting Lists Performance and Timing Putting It Together End of Chapter Material Summary of Concepts Exercises Projects XML Description of XML Tags Elements Attributes Content Special Characters Comments Overall Format Comparison to Flat File Flexibility in XML XML in Scala Loading XMLParsing XML Building XML Writing XML to File XML Patterns Putting It Together End of Chapter Material Summary of Concepts Self-Directed Study Exercises Projects RecursionMemory Layout Power of Recursion Fibonacci Numbers Towers of Hanoi Permutations MazesSorts Divide and Conquer Sorts Merge Sort Quicksort Putting It Together End of Chapter Material Summary of Concepts Exercises Projects Object-OrientationBasics of Object-Orientation Analysis and Design of a Bank Analysis and Design of Pac-Man (TM) Implementing OO in Scala Methods and Members Parameters as Members VisibilitySpecial Methods Property Assignment Methods The apply Method this Keyword object Declarations Applications Introduction to Companion Objects Revisiting the API Implementing the Bank Example Implementing the Pac-Man (TM) Example End of Chapter Material Summary of Concepts Exercises Projects Wrapping Up What You Have Learned IDEs (Eclipse) Next Steps End of Chapter Material Exercises Appendix A Getting to Know the Tools Unix/Linux (includes Mac OS X) Command Line Files and Directories Aside Helpful Tips Permissions Compression/Archiving Remote Other CommandsRedirection Text Editors (vi/vim)Windows Command Line Files and Directories Text Editors Edit Notepad Others Other Commands End of Appendix Material Summary of Concepts Exercises B Glossary Bibliography