CS 102A Introduction to Computer Programming

Spring 2022 -- Fengwei Zhang

  • Class Time: Monday 10:20PM - 12:10PM
  • Class Location: Room 101, Lychee Hill #2
  • Office Address: Innovation Park, Building 10, Room 501
  • Office hour: Monday 04:00pm - 05:30pm
  • Homepage: http://cse.sustech.edu.cn/faculty/~zhangfw
  • 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/14 Introduction to Computers and Java
  • Course Overview
  • Lecture Videos are posted on the Blackboard [Link]
    Scan and join the Lecture QQ group (Lab QQ groups are different) for this course. 下面是理论班QQ群,实验班有另外的QQ群
    qq-group
[CourseOverview]
[Slides]
[Lab1]
Week 2, 02/21 Introduction to Java Applications, Data Types
  • First Glance of Java Programs
  • Java’s Primitive Types
  • Arithmetic Computation
  • Evaluation Order & Decision-making Statements
[Slides]
[Lab2]
Week 3, 02/28 Control Statements I (including structured programming)
  • Control Statment Introduction
  • If Else Selection Statement
  • While Statement
  • Counter-Controlled and Sentinel-Controlled Repetition
  • Type Cast and Scope
  • Operators
[Slides]
[Lab3]
Week 4, 03/07 Control Statements II (including structured programming)
  • For Statement
  • Do While Switch Break Continue Statements
  • Logical Operators
  • Structured Programming
[Slides]
[Lab4]
Week 5, 03/14 Array
  • Array Declaration and Creation
  • Array Initialization Rolling Dice Example
  • Enhanced For Statement
  • Two and Multi Dimensional Arrays
[Slides]
[Lab5]
Week 6, 03/21 Procedural programming (static methods, APIs)
  • Why Use Methods
  • Program Modules and Static Methods
  • Details of Methods
  • Method-call Stack and Argument Passing
  • Method Overloading and Command-line Args
[Slides]
[Lab6]
Week 7, 03/28 Introduction to OO (Classes, Objects, Methods)
  • Introduction to Object-Oriented via Car Story
  • Class and Method Declaration
  • Object Creation & Method Calling & Instance Variables & Getter and Setter
  • Constructors
  • Case Study Ⅰ Pet Show
  • Case Study Ⅱ Account Balances
[Slides]
[Lab6]
Week 7, 04/2 Strings and Wrapper Classes
  • String Class
  • String Methods
  • StringBuilder and Wrapper Classes
[Slides]
[Lab8]
Week 8, 04/04 No Class
  • No Class Due to Qingming Holiday (清明节)
Week 9, 04/11 Classes, Objects and Methods: A Deeper Look
  • Designing Classes & Controlling Access to Class Members
  • Data Hiding and This Reference
  • Overloaded Constructors & Setter Getter Methods
  • Composition
  • Static Variables and Methods
  • final Instance Variables and Garbage and PackagesCollection
  • Java Heap Stack Memory
[Slides-part1]
[Slides-part2]
[Slides-Self-Study]
[Lab9]
Week 10, 04/18 Object-Oriented Programming: Inheritance
  • Inheritance Introduction
  • Superclass and Subclass
  • A Payroll Application & Overriding
  • Subclass Constructor & Accessing Fields of Superclass
  • Super Keyword and Inheritance Summary
[Slides]
[Lab10]
Week 11, 04/25 Object-Oriented Programming: Polymorphism
  • Polymorphism in OOP
  • Polymorphic Behavior
  • Abstract Classes
  • 1 Case Study A Payroll System Using Polymorphism
  • 2 Case Study A Payroll System Using Polymorphism
  • final Methods and Static Binding and Java Interface
[Slides]
[Lab11]
Week 12, 05/02 No Class
  • No Class Due to Labor Day Holiday (劳动节)
Week 13, 05/09 Interface and GUI Programming
  • Interface Example - Developing a Payable Hierarchy
  • GUI Programming (brief overview)
[Slides]
[Lab13]
Week 14, 05/16 Generic Classes and Methods,Generic Collections (ArrayList)
  • Motivation of generic methods
  • Declaring and using generic methods
  • Bounded Type Parameter and ArrayList
  • Generic classes
  • The “hardest” question about generics
  • Generic Collections
[Slides]
[Lab14]
Week 15, 05/23 Exception Handling: A Deeper Look
  • What exceptions are & How exception handling works
  • Exception class hierarchy & Checked unchecked exceptions
  • Stack traces and chained exceptions
[Slides]
[Lab15]
Week 16, 05/30 Course Review & Project Demo
  • Review and Demo
  • Invited Lunch/Dinner if your final score is 96% or more
[Slides]

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