CS 161: Introduction to Computer Science  (Spring 2020)

Instructor: David Chiu
Meeting Time: MWF 11:00-11:50 in TH 310 and Th 12:00-1:50 in TH 409
Office: Thompson Hall 390 B
Office Hours: Open door, or by appointment
Tutoring: Click here!
Canvas: canvas.pugetsound.edu

Syllabus

The course syllabus contains general information on course topics, grading procedures, and classroom policies.

Textbook

  • David Barnes and Michael Kolling. Objects First with Java: A Practical Introduction Using BlueJ.
    5th edition or higher. (Required)

Notes

Access to class note may require a username and password which are given in class.

Homework Assignments

Labs

Course Schedule (Tentative)


Week 1 (Reading: Chap 1)

Mon 01/20Wed 01/22Thu 01/23
Lab 1 due
Fri 01/24 Resources

MLK Day - No Classes


Our first algorithm


Lab 1


What is CS, anyway?



Week 2 (Reading: Chap 1)

Mon 01/27Wed 01/29Thu 01/30
Lab 2 due
Fri 01/31 Resources

Objects vs. Classes; the Circle class


Variables and data types, methods, and constructors


Lab 2


Saving algorithms; Method calls


Code: Circle

Week 3 (Reading: Chap 2)

Mon 02/03
Hwk 1 due
Wed 02/05Thu 02/06
Lab 3 due
Fri 02/07 Resources

Writing classes: TicketMachine. Printing vs returning


Writing effective comments, Accumulators (+=, -=), if-then-else


Lab 3


Random object, more practice with if-then-else, return


Code: TicketMachine

Week 4 (Reading: Chap 3)

Mon 02/10Wed 02/12Thu 02/13
Lab 4 due
Fri 02/14
Hwk 2 due
Resources

Finish: else-if statements; Start primitives: ints and integer overflow


Primitives: type-casting (narrowing, widening)


Lab 4


Lab 4 solution; boolean expressions



Week 5 (Reading: Finish Chap 3)

Mon 02/17Wed 02/19Thu 02/20
Lab 5 due
Fri 02/21 Resources

Classes as data types: references, object equivalence


Object composition: Abstraction and modularity


Lab 5


Class APIs: e.g., Strings


Code: Square Equality
Code: Organism
Code: Clock

Week 6 (Reading: Chap 4 (Loops))

Mon 02/24Wed 02/26
Hwk 3 due
Thu 02/27Fri 02/28 Resources

Loops


Review


Midterm Exam I


Review of Exam 1 Soln


Review Guide 1 (Sol)
Old Lab: Ventriloquist (soln)

Week 7 (Reading: Chap 4 (Loops))

Mon 03/02Wed 03/04Thu 03/05
Lab 6 due
Fri 03/06
Hwk 4 due
Resources

Writing loops


For-loops


Lab 6


Nested loops


Code: Die

Week 8 (Notes Provided: Arrays)

Mon 03/09Wed 03/11Thu 03/12
Lab 7 due
Fri 03/13 Resources

Arrays of primitives: Bank


Arrays of Objects: TurtleMob


Lab 7


Finish TurtleMob


Code: Bank
Code: TurtleMob
Code: 2Darray Examples

Spring Break!

Mon 03/16Wed 03/18Thu 03/19Fri 03/20 Resources














Week 9 (Reading: Chap 4 (ArrayList))

Mon 03/23
Hwk 5 due
Wed 03/25Thu 03/26Fri 03/27
Lab 8 due
Resources




Start ArrayLists


Lab 8


ArrayList (cont.)


ArrayList: Diary
ArrayList: ResizableTurtleMob
ArrayList: RobotGroup
Scanner: ChatBot

Week 10 (Notes Provided)

Mon 03/30Wed 04/01Thu 04/02
Lab 9 due
Fri 04/03
Hwk 6 due
Resources

ArrayList and Scanner: ChatBot


Finish ChatBot; Start HashMap


Lab 9


HashMap, for-each loop


HashMap: SmartBot

Week 11

Mon 04/06Wed 04/08Thu 04/09Fri 04/10 Resources

HashMap (cont.): Smarter ChatBot


Review


Midterm Exam II


File I/O


File I/O: TreeAnalyzer
File I/O: RobotArmy
Review Guide 2 (Soln)
Old Lab: ComboGuesser (Soln)

Week 12 (Notes Provided)

Mon 04/13Wed 04/15Thu 04/16Fri 04/17
Lab 10 Hwk 7 due
Resources

File I/O


Information hiding, static variables, static methods and main()


Lab 10


Information hiding (cont.)


Code: Student (static,enum)
Code: Thermometer

Week 13 (Notes Provided)

Mon 04/20Wed 04/22Thu 04/23Fri 04/24
Lab 11 Hwk 8 Proposal due
Resources

Static fields, static methods, main()


Start complexity analysis: Linear search


Lab 11


Complexity: Binary search


Code: SearchTester

Week 14 (Notes Provided)

Mon 04/27Wed 04/29Thu 04/30Fri 05/01
Lab 12 due
Resources

Complexity: Selection sort


Complexity: Bubble Sort, optimizations


Lab 12


Complexity: Shaker sort, list reversal


Code: SortTester

Week 15

Mon 05/04Wed 05/06
Hwk 8 due
Thu 05/07Fri 05/08 Resources

Start recursion


Review


Reading period


Reading period


Code: Recursion Examples

Finals Week

Mon 05/11Wed 05/13Thu 05/14Fri 05/15 Resources




Final Exam 12:00 - 2:00








Review Guide 3 (Soln)
Old Lab: ImgProc (Soln)

   Department of Mathematics and Computer Science
University of Puget Sound
1500 N. Warner St
Tacoma, WA 98416