COMP 170 Scala
1.0
Index
Site
1. Context
1.1. Motivation for This Book
1.2. Resources Online
1.3. Downloading Text, Source Code, and Videos
1.4. Computer Science, Broadly
1.5. Chapter Review Questions
2. C# Data and Operations
2.1. A Sample Scala Program
2.2. Lab: Editing, Compiling, and Running with Xamarin Studio
2.3. Arithmetic
2.4. Variables and Assignment
2.5. Syntax Template Typography
2.6. Strings, Part I
2.7. Writing to the Console
2.8. C# Program Structure
2.9. Combining Input and Output
2.10. String Special Cases
2.11. Substitutions in Console.WriteLine
2.12. Value Types and Conversions
2.13. Learning to Solve Problems
2.14. Lab: Division Sentences
2.15. Chapter Review Questions
3. Defining Functions of your Own
3.1. A First Function Definition
3.2. Multiple Function Definitions
3.3. Function Parameters
3.4. Multiple Function Parameters
3.5. Returned Function Values
3.6. Two Roles: Writer and Consumer of Functions
3.7. Local Scope
3.8. Static Variables
3.9. Not using Return Values
3.10. Library Classes
3.11. Static Function Summary
3.12. Chapter Review Questions
4. Basic String Operations
4.1. String Indexing
4.2. Some Instance Methods and the Length Property
4.3. A Creative Problem Solution
4.4. Lab: String Operations
4.5. Chapter Review Questions
5. Decisions
5.1. Conditions I
5.2. Simple
if
Statements
5.3.
if
-
else
Statements
5.4. More Conditional Expressions
5.5. Multiple Tests and
if
-
else
Statements
5.6. If-statement Pitfalls
5.7. Compound Boolean Expressions
5.8. Nested
if
Statements
5.9. Chapter Review Questions
6. While Loops
6.1. While-Statements
6.2. While-Statements with Sequences
6.3. Interactive
while
Loops
6.4. Short-Circuiting && and ||
6.5. While Examples
6.6. More String Methods
6.7. User Input: UI
6.8. Greatest Common Divisor
6.9. Do-While Loops
6.10. Number Guessing Game Lab
6.11. Chapter Review Questions
7. Foreach Loops
7.1.
foreach
Syntax
7.2.
foreach
Examples
7.3. Chapter Review Questions
8. For Loops
8.1. For-Statement Syntax
8.2. Examples With
for
Statements
8.3. Lab: Loops
8.4. Chapter Review Questions
9. Files, Paths, and Directories
9.1. Files As Streams
9.2. Writing Files
9.3. Reading Files
9.4. Path Strings
9.5. Directory Class
9.6. File Class
9.7. Command Line Execution
9.8. FIO Helper Class
9.9. Chapter Review Questions
10. Arrays
10.1. One Dimensional Arrays
10.2. Musical Scales and Arrays
10.3. Linear Searching
10.4. Sorting Algorithms
10.5. Binary Searching
10.6. Lab: Arrays
10.7. Lab: Performance
10.8. Multi-dimensional Arrays
10.9. Chapter Review Questions
11. Lists
11.1. List Syntax
11.2. .Net Library (API)
11.3. Chapter Review Questions
12. Dictionaries
12.1. Dictionary Syntax
12.2. Dictionary Efficiency
12.3. Dictionary Examples
12.4. Lab: File Data and Collections
12.5. Chapter Review Questions
13. Classes and Object-Oriented Programming
13.1. A First Example of Class Instances: Contact
13.2. Class Instance Examples
13.3. The Rational Class
13.4. Planning A Class Structure
13.5. Classes And Structs
13.6. Defining Operators (Optional)
13.7. Chapter Review Questions
14. Testing
14.1. Assertions
14.2. Attributes
14.3. Testing the Constructor
14.4. Testing Rational Comparisons
14.5. Testing Rational Arithmetic
14.6. Testing Rational Conversions (to other types)
14.7. Testing the Parsing Feature
14.8. Running the NUnit Tests
15. Interfaces
15.1. Rationals Revisited
15.2. csproject Revisited
15.3. Chapter Review Questions
16. Recursion
17. Data Structures
18. Appendix
18.1. Development Tools
18.2. Xamarin Studio
18.3. Command Line Introduction
18.4. Precedence of Operators
18.5. Homework: Grade Calculation
18.6. Homework: Grade Calculation from Individual Scores
18.7. Homework: Grade File
18.8. Homework: Book List
18.9. Group Project
18.10. Lab: Version Control
18.11. Mercurial and Teamwork
18.12. Acknowledgments
Page
18. Appendix
Source
18. Appendix
ΒΆ
18.1. Development Tools
18.1.1. About Software Development Kits (SDKs)
18.1.2. Editing and Building Tools
18.1.3. About Integrated Development Environments (IDE)
18.1.4. Our Approach
18.1.5. Installing Mono and Xamarin Studios
18.1.6. OS X
18.1.6.1. Xamarin Studio Installation - OSX
18.1.7. Windows
18.1.7.1. Mono Command Prompt
18.1.7.2. Xamarin Studio Installation - Windows
18.1.8. Linux
18.2. Xamarin Studio
18.3. Command Line Introduction
18.3.1. Navigating Directories
18.3.2. Common Commands
18.3.3. Scripts
18.3.4. Copy and Paste
18.3.5. Command Line Shortcuts
18.4. Precedence of Operators
18.5. Homework: Grade Calculation
18.5.1. Program Summary
18.5.2. Details
18.5.3. Grading Rubric
18.5.4. Logs and Partners
18.6. Homework: Grade Calculation from Individual Scores
18.6.1. Functional Requirements
18.6.2. Style Requirements
18.6.3. Grading Rubric
18.6.4. Logs and Partners
18.7. Homework: Grade File
18.7.1. Brief Problem Statement
18.7.2. Using C#
18.7.3. Requirements
18.7.4. Hints
18.7.5. Grading Rubric (25 points)
18.8. Homework: Book List
18.8.1. Book class
18.8.2. BookList class
18.8.3. TestBookList class
18.8.4. Grading Rubric
18.8.5. Extra Credit
18.9. Group Project
18.9.1. Objectives
18.9.2. Overview
18.9.3. Your Team
18.9.4. Roles
18.9.5. The process
18.9.6. Splitting Up The Coding
18.9.7. Weekly reports
18.9.8. Intermediate deliverables
18.9.9. Final Deliverables
18.10. Lab: Version Control
18.10.1. Goals
18.10.1.1. Before We Proceed
18.10.2. Steps
18.10.2.1. Create Bitbucket.org account
18.10.2.2. Create repository at Bitbucket
18.10.2.3. Set up your Mercurial commit username
18.10.2.4. Clone a repository from Bitbucket
18.10.2.5. Add an .hgignore and Hello World file to your project
18.10.2.6. Create an initial structure for your project
18.10.2.7. Create and Test Content
18.10.2.8. Verify that your stuff really made it to bitbucket.org
18.10.2.9. Working between lab and home (or home and lab)
18.10.2.10. Getting our examples
18.11. Mercurial and Teamwork
18.11.1. Planning and Communication
18.11.2. Typical Scenario
18.11.3. Conflict Avoidance
18.11.4. E-mail Notifications
18.11.5. Communication is Key to Success
18.12. Acknowledgments