COMP110-003, Introduction to Programming

Spring 2013

Basics

  • Instructor: Haohan Li
  • Meeting Place: SN011, Sitterson Hall
  • Meeting Time: Tuesday and Thursday, 11:00am - 12:15pm
  • E-mail: lihaohan at cs.unc.edu
  • Office: FB132, Brooks Building
  • Office Hour: Wednesday, 12:30pm - 2:30pm
  • Syllabus: here

Announcements

  • The final exam will be on 12:00PM, Saturday, May 4. Be prepared!
  • The grades of midterm exam are online.
  • The deadline of Lab 5 is extended to Sunday, March 24.
  • The deadline of Program 3 is extended to Sunday, March 10.
  • The office hour is changed to Wednesday, 12:30pm - 2:30pm.

Tentative Schedule

Date Lecture Topics Readings Assignments
Jan. 10, Thu Lecture 1: Introduction,
Lecture 2: Computer Basics
Chapter 1.1 & 1.2 Homework 0
Jan. 13, Sun Homework 0 DUE
Jan. 15, Tue Lecture 3: First Program Chapter 1.3, 2.1 & 2.2
Install Java and Eclipse
FirstProgram.java
Honor Pledge
Jan. 17, Thu Lab Time Creating Jar file
VendingMaching.java
TotalCost.java
Lab 1
Jan. 22, Tue Lecture 4: Primitive Types,
Strings and Console I/O
Chapter 2.3-2.5
Jan22.java
Order of Operations
StringsAndChars.java
TypeCasting.java
Honor Pledge Due
Program 1
Jan. 24, Thr Lecture 5: Java GUI
Lab Time
Chapter 1.4 & 3.1
Chapters 1 and 2 Review Worksheet
StringFun.java
Lab 1 Due
Lab 2
Jan. 29, Tue Lecture 6: Branching Statements Chapter 3.2 & 3.3
Chapters 1 and 2 Review
Worksheet Solutions

DecFormat.java
Jan. 31, Thr Lab Time
(with additional notes)
Chapter 3.4
Smiley.java
Program 1 Due
Lab 3
Program 2
Program 2 Tips
Feb. 5, Tue Lecture 7: Switch Statement
and While Statement
Chapter 4.l & 4.2
Feb. 7, Thr Lab Time
Feb. 10, Sun Lab 3 Due
Feb. 12, Tue Lecture 8: For Statement
and More Loops
input.java
Feb. 14, Thr Lab Time Strings and Loops
Review Worksheet
Lab 4
Feb. 17, Sun Program 2 Due
Feb. 19, Tue Lecture 9: Classes Chapter 5.1
Student.java
Program 3
Feb. 21, Thr Lecture 10: Review Strings and Loops
Lab Time
Strings and Loops Review
Worksheet Solutions

StringTest.java
Feb. 26, Tue Lecture 11: More Classes and
Information Encapsulation
Chapter 5.2
Feb. 28, Thr Lecture 12: Objects and References
Lab Time
Chapter 5.3
SmileyClass.java
SmileyMain.java
Lab 5
Lab 4 Due
Mar. 5, Tue Lecture 13: Midterm Review Sample Midterm
Sample Midterm Solution
Lab 2 Due
Mar. 7, Thr Midterm Exam
Mar. 10, Sun Program 3 Due
Mar. 19, Tue Lecture 14: Midterm Solutions Midterm Exam Solutions
Mar. 21, Tue Lecture 14 Cont'd: Midterm Solutions
Lab Time
Mar. 24, Sun Lab 5 Due
Mar. 26, Tue Lecture 15: Arrays Chapter 7.1 Program 4
Mar. 28, Thr Lecture 16: In-Class Exercise:
Selection Sort
SelectionSort.java
InsertionSort.java
Apr. 2, Tue Lecture 17: Miscellaneous and More Arrays Chapter 7.2 - 7.5
Apr. 4, Thr Lecture 18: Multidimensional Arrays
Lab Time
Apr. 9, Tue Lecture 19: More Methods:
Constructors, Overloading and Static
Chapter 6.1 - 6.4
Pet.java
Apr. 11, Thr Lab Time Program 4 Early Code Check Due
Apr. 16, Tue Lecture 20: Inheritance and Polymorphism Chapter 8.1 - 8.3
Apr. 18, Thr Lecture 20 Cont'd: Inheritance and Polymorphism Lab 5 Solution:
SmileyMain.java
SmileyClass.java
Lab 6
Lab 7
Apr. 23, Tue Lecture 21: Final Exam Review Array Review Worksheet
Array Review Solutions
Array/Inheritance Review
Array/Inheritance Solutions
Apr. 25, Thr Lecture 21: Final Exam Review
Sample Question: Person.java
Sample Question Solution: PersonSolution.java
Example Exams
From the Past

(Note 1: These exams may cover more material than we did. Do not worry about topics that
we did not cover.
Note 2: No "standard" solution available. Send me emails if you need the answer to a question.)
Exam 0
Answer to Sec3 of Exam 0
Exam 1
Exam 2
Answer to Q11 of Exam 2
Apr. 30, Tue Program 4 Due
May. 4, Sat Final Exam
12:00PM - 3:00PM

Helpful Resources

Locations of visitors to this page