CS 102A Introduction to Computer Programming

Spring 2020 -- Fengwei Zhang

  • Instructor: Fengwei Zhang
  • Class Time: Monday 04:20PM - 06:10PM
  • Class Location: Room 102, Lychee Hill #1
  • Office Address: Innovation Park, Building 10, Room 501
  • Office hour: Monday 06:10pm - 06:50pm or 08:50pm - 09:50pm
  • Homepage: https://fengweiz.github.io
  • Email: zhangfw (at) sustech (dot) edu (dot) cn

Course Description

The course aims to cultivate students who have no programming experience before their university study. In this course, we will introduce the fundamentals of object-oriented programming language and programming techniques. The students will be familiar with the popular programming language Java and be able to construct programs for solving general problems.

Course Objectives

Upon successful completion of this class, the student will gain experience in:

Prerequisites

N/A.

Recommended Book

Java: How to Program (8th Edition), P. Deitel, H. Deitel (Java大学教程第八版,2012年出版,图书馆有借)
Book

Lab Sessions

Grading Policy

The grades for the course will be based upon the tables given below

Academic Dishonesty

Please read and fill the Undergraduate Students Assignment Delcaration Form in Chinese and English.

Student Disabilities Services

If you have a documented disability that requires accommodations, you will need to register with the University for coordination of your academic accommodations, or let me know.

Class Schedule

Date Topic Assignments & Announcements (tentative) Slides & Labs
Week 1, 02/10 Introduction to Computers and Java Due to the coronavirus issue, we will be using online teaching/videos in the first few weeks.
  • Course Overview Video 1 [Link]
  • Course Overview Video 2 [Link]
  • Chapter 1 Slides with Voice Recording [Link]
  • Lab 1 Tutorial Video [Link]
See more videos with higher resolution at Blackboard [Link]
Scan and join the Lecture QQ group (Lab QQ groups are different) for this course qq-group
  • Undergraduate Student Assignment Delcaration Forms (editable version) are posted on Blackboard. Sign and submit on Blackboard [Link]
[CourseOverview]
[Slides]
[Lab1]
Week 2, 02/17 Introduction to Java Applications, Data Types
  • The following lecture videos are posted on Blackboard [Link]
    • First Glance of Java Programs 1 Video
    • First Glance of Java Programs 2 Video
    • Java’s Primitive Types Video
    • Arithmetic Computation Video
    • Evaluation Order & Decision-making Statements Video
    [Slides]
    [Lab2]
    Week 3, 02/24 Control Statements I (including structured programming) Assignment 1 was out on Blackboard [Assignment1]
    Please submit the assignment via Online Judge (OJ) [OJ Site]

  • The following lecture videos are posted on Blackboard [Link]
    • Control Statment Introduction Video
    • If Else Selection Statement Video
    • While Statement Video
    • Counter-Controlled and Sentinel-Controlled Repetition Video
    • Type Cast and Scope Video
    • Operators Video
    [Slides]
    [Lab3]
    Week 4, 03/02 Control Statements II (including structured programming)
  • The following lecture videos are posted on Blackboard [Link]
    • For Statement Video
    • Do While Switch Break Continue Statements Video
    • Logical Operators Video
    • Structured Programming Video
    [Slides]
    [Lab4]
    Week 5, 03/09 Array Assignment 2 was out on Blackboard [Assignment2]
    Please submit the assignment via Online Judge (OJ) [OJ Site]

  • The following lecture videos are posted on Blackboard [Link]
    • Array Declaration and Creation Video
    • Array Initialization Rolling Dice Example Video
    • Enhanced For Statement Video
    • Two and Multi Dimensional Arrays Video
    Instead of QQ screen sharing, we will use zoom to meet during the class time [Link]

    [Slides]
    [Lab5]
    Week 6, 03/16 Procedural programming (static methods, APIs)
  • The following lecture videos are posted on Blackboard [Link]
    • Why Use Methods Video
    • Program Modules and Static Methods Video
    • Details of Methods Video
    • Method-call Stack and Argument Passing Video
    • Method Overloading and Command-line Args Video
    [Slides]
    [Lab6]
    Week 7, 03/23 Introduction to OO (Classes, Objects, Methods) Assignment 3 was out [Assignment3] [OJ Site]

  • The following lecture videos are posted on Blackboard [Link]
    • Introduction to Object-Oriented via Car Story Video
    • Class and Method Declaration Video
    • Object Creation & Method Calling & Instance Variables & Getter and Setter Video
    • Constructors Video
    • Case Study Ⅰ Pet Show Video
    • Case Study Ⅱ Account Balances Video
    [Slides]
    [Lab7]
    Week 8, 03/30 Strings and Wrapper Classes Course Project was out [Project Description] [Demo] [Tips] [Project Teams]

  • The following lecture videos are posted on Blackboard [Link]
    • String Class Video
    • String Methods 1 Video
    • String Methods 2 Video
    • String Methods 3 trim toCharArray split valueOf Video
    • StringBuilder and Wrapper Classes Video
    [Slides]
    [Lab8]
    Week 9, 04/06 Classes, Objects and Methods: A Deeper Look We don't have zoom meetings this week due to the Qingming Festival.

  • The following lecture videos are posted on Blackboard [Link]
    • Designing Classes & Controlling Access to Class Members Video
    • Data Hiding and This Reference Video
    • Overloaded Constructors & Setter Getter Methods Video
    • Composition Video
    • Static Variables and Methods Video
    • final Instance Variables and Garbage and PackagesCollection Video
    • Java Heap Stack Memory Video
    Assignment 4 was out [Assignment4] [Test Demo] [How To Use JUnit] [OJ Site]
    [Slides-part1]
    [Slides-part2]
    [Slides-Self-Study]
    [Lab9]
    Week 10, 04/13 Object-Oriented Programming: Inheritance
  • The following lecture videos are posted on Blackboard [Link]
    • Inheritance Introduction Video
    • Superclass and Subclass Video
    • A Payroll Application & Overriding Video
    • Subclass Constructor & Accessing Fields of Superclass Video
    • Super Keyword and Inheritance Summary Video
    [Slides]
    [Lab10]
    Week 11, 04/20 Object-Oriented Programming: Polymorphism
  • The following lecture videos are posted on Blackboard [Link]
    • Polymorphism in OOP Video
    • Polymorphic Behavior Video
    • Abstract Classes Video
    • 1 Case Study A Payroll System Using Polymorphism Video
    • 2 Case Study A Payroll System Using Polymorphism Video
    • final Methods and Static Binding and Java Interface Video
    • Interface Example - Developing a Payable Hierarchy Video
    [Slides]
    [Lab11]
    Week 12, 04/27 GUI Programming (brief overview)
  • The following lecture videos are posted on Blackboard [Link]
    • GUI Introduction Video
    • Swing Classes Video
    • Event Handling Video
    • Layout Management Video
    Assignment 5 was out [Assignment5] [JUnit Sample Code] [OJ Site]
    [Slides]
    [Lab12]
    Week X, 05/04 International Labor Day!
    • Holiday -- International Labor Day!
    Week 13, 05/09 Generic Classes and Methods This is a make-up class due to International Labor Holiday.
    5月9日(星期六)上单周周一的课程
    05/09 (Saturday)

    [Slides]
    [Lab13]
    Week 14, 05/11 Generic Collections (ArrayList)
  • The following lecture videos are posted on Blackboard [Link]
    • Motivation of generic methods Video
    • Declaring and using generic methods Video
    • Bounded Type Parameter and ArrayList Video
    • Generic classes Video
    • The “hardest” question about generics Video
    • Generic Collections Video
    Assignment 6 was out [Assignment6]
    [Lab14]
    Week 15, 05/18 Exception Handling: A Deeper Look
  • The following lecture videos are posted on Blackboard [Link]
    • What exceptions are & How exception handling works Video
    • Exception class hierarchy & Checked unchecked exceptions Video
    • Stack traces and chained exceptions Video
    [Slides]
    Week 16, 05/25 Course Project Exam

    Acknowledgement: This course includes material from Dr. Yepang Liu and Dr. James Yu at SUSTech