Comp 401: Foundations of Programming
This course is
intended for people who have learned to program. Its goal is to teach you how
to program well. The common programming strategy of beginners is to write the
first solution they can think of without carefully identifying and weighing
different alternatives. For all but the simplest problems, this approach of
writing “quick and dirty” programs will take you to the debugging stage very
quickly, but will make debugging slow. For large, complex programs, you need
to identify multiple alternative solutions to the problem, choose an
alternative that most directly solves the problem, and think carefully what
your solution does, and how it works. The claim is that, although “quick and
dirty’ programming may produce a program faster, the concepts we teach will
help you produce a correct program faster. Moreover, they will lead to
programs that are easy to change and reuse. We assume you have
learned the following basic programming concepts: primitive types (integers,
real numbers, Booleans), variables, constants, assignments, comments,
expressions, arrays, loops, arrays, and procedures/functions/methods. These
concepts are taught in most if not all introductory programming courses
regardless of whether they teach conventional or object-oriented programming.
This course will teach you the next-level programming concepts. These include
objects, classes, interfaces, packages, inheritance, delegation, design
patterns, exceptions, assertions, pointers, and formal correctness. These
concepts will not help you solve new problems; rather, they will help you
solve problems in new ways. The skills that will enable you to use these
concepts will form a large part of the challenge you face in this course.
After this course, you will have a much deeper understanding of the
programming and learn some of the ideas that can make programming a science.
We will be using Java as a vehicle for learning these concepts. |
Fall 2007 Comp 110 (Using Object Editor) Offering
by Sasa Junuzovic
|
Fall 2011 Comp 110 (with ObjectEditor and
Eclipse Helper) Offering by Jason Carter |
Prasun Dewan (Lectures) |
Office: FB 150 Phone: 919-962-1823 Email: dewan@cs.unc.edu Office Hours: MW
3:30-4:45 |
Ben Newton |
Office: SN 043 Phone: Email:
bn@cs.unc.edu Office Hours: W 2-
2:30, F 12:30-2 |
Wade Gobel |
Office: SN 043 Phone: Email: wgobel@cs.unc.edu Office Hours: Tuesday 2-3, Thursday 3-4 |
William Hipschman |
Office: SN 043 Email:
whipsch2@email.unc.edu Office Hours: Thu
10-12 |
Jose Labra |
Office: SN 043 Email: Jose jlabrae@live.unc.edu Office Hours: W 1-2, F 3-4 |
Room: Gardner 105 |
Time: MW 11-12:15pm |
|
Unit ( Start Date) |
Recorded Slides |
Chapters |
Assignments |
1 |
Intro and Conventional Programming in Java (8/24, 8/29) |
PowerPoint 2007 |
|
|
2 |
Objects (8/29, 8/31) |
PowerPoint 2007 |
||
4 |
State (8/31, 9/7, 9/12 ) |
PowerPoint 2007 |
||
5 |
Interfaces (9/12, 9/14, ) |
PowerPoint 2007 |
||
7 |
Graphics (9/14, 9/19, 9/21) |
PowerPoint 2007 |
||
14 |
Variable-Sized Collections (Sep 26, 28) |
PowerPoint 2007 |
||
17 |
Inheritance (Oct 3, 5, 10, 17 ) |
PowerPoint 2007 |
||
Midterm 1 Grade Distribution (Oct 26) |
PowerPoint 2007 |
|||
8 |
Static (Oct 24) |
PowerPoint 2007 |
|
|
21 |
Grammars and More Inheritance (Oct 24, 26, 31, Nov 2) Original slides have been divided into: Abstract Classes, Grammars, Recursive Descent Dynamic Dispatch and Abstract Methods Initialization and Inheritance |
PowerPoint 2007 |
||
23 |
Generics and Adapters (Nov 2, 9) |
PowerPoint 2007 |
||
15 |
MVC (Nov 9, 16 ) |
PowerPoint 2007 |
||
24 |
Command Objects (Nov 16, 22, 28 ) |
PowerPoint 2007 |
||
18 |
Iterators (Nov 28, Dec 5) |
PowerPoint 2007 |
||
19 |
Exceptions (Dec 5, 7) |
PowerPoint 2007 |
|
|
20 |
Assertions(Dec 7) |
PowerPoint 2007 |
||
Midterm 2 Grade Distribution
(Dec 5) |
PowerPoint 2007 |
|
Gardner 105 |
Friday 11am-12:15pm NOTE: Bring your laptops every Friday. You will
use them for programming exercises. |
Recitation
material: Recitations |
ObjectEditor Version 3 |
|
ObjectEditor Version 17 |
|
ObjectEditor Version 18 |
|
ObjectEditor Version 19 |
|
ObjectEditor Version 20 |
|
|
|
||
1 |
Theater Analogy |
|
3 |
Functions |
|
6 |
Types |
|
10 |
Main and Console |
|
11 |
More Types |
|
12 |
Conditionals |
|
13 |
Loops |
|
25 |
Recursion |
Talk |
||
|
||
The
design patterns taught in Comp 401 |
Prasun Dewan, Teaching Inter-Object
Design Patterns to Freshmen. Proceedings of ACM SIGCSE. 2005 |
|
The
use of ObjectEditor in Comp 110 and 401 |
||
How
ObjectEditor is different from other generators of
user-interfaces |
||
How
ObjectEditor can be customized |
|
|
ObjectEditor and Mobile Device User Interfaces |
|