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 |
|
In case you are wait
listed for the lecture or the recitation, please come to class and recitation
for the first two weeks if there is room, and look at the material online if
there is not. In either case, fill out a sheet at the start of lectures on
the first day, which will be distributed at the start of class. Usually about
20% of the class drops within the first two weeks - partly because the first
assignments checks if you have the pre-requisite. Usually the number of
people who are willing to take the risk of not getting enrolled is less than
this number, so anyone who waits usually gets in, though of course there is
no guarantee. So if you really need the course or want to take it, you should
wait. If you are transfer
student who did not get a chance to enroll early and cannot afford to skip
401 this semester, please send mail to Jodie Turnbull at: turnbull@cs.unc.edu. You can also post at: https://piazza.com/unc/fall2013/comp401 to share discussion of this issue with others. Please do not send
mail to me, as I cannot add you directly. |
|
Prasun Dewan
(Lectures) |
Office: FB 150 Phone: 919-962-1823 Email: help401@cs.unc.edu, dewan@cs.unc.edu Office Hours: TR
3:30-4:30pm |
|
????? |
Office: Phone: 919 ?????? Email: help401@cs.unc.edu, sajal@cs.unc.edu Office Hours: |
|
?????? |
Office: Phone: 919 ????? Email: help401@cs.unc.edu, yumeng@cs.unc.edu Office Hours: MW 2-3pm |
|
Office: SN 008 Phone: Email: help401@cs.unc.edu, Office Hours: |
|
|
|
Office: SN 008 Phone: Email: help401@cs.unc.edu, Office Hours: |
|
We will be using Piazza for class
discussion and getting help. The system is highly catered to getting you help
fast and efficiently from classmates, the TA, and myself.
Rather than emailing questions to the teaching staff, I encourage you to post
your questions on Piazza. If you do not get a response within a day or two on
Piazza, please send mail to help401@cs.unc.edu. But try Piazza first. Do not
send mail to an individual instructor, as that can overwhelm him - such mail
will be ignored. Before posing a question, please
check if this question has been asked before. This will reduce post clutter
and reduce our burden. Repeat questions will be ignored by the instructors. Piazza allows anyone to respond. So
if you see a question that you think you can respond to, please do so, as
that will reduce our burden and help you "teach" your fellow
students. This will be a form of class
participation that will be noted when I allocate my fudge points! Hope it works well If you have any problems or feedback
for the developers, email team@piazza.com. Find our class page at:
https://piazza.com/unc/fall2013/comp401 |
|
Room: MY G202 |
TR 11-12:15pm |
|
ObjectEditor Version 3 (used in comp110) |
|
|
ObjectEditor Version 21 (used last year) |
|
|
ObjectEditor Version 22 (untested in class, use it unless
it fails) |
|
|
|
|
|
|
|
|
Section
601: 11-11:50 ( SN 14) Section
602: 12-12:50 (SN 14) |
Friday 11am-12:15pm NOTE: Bring your laptops every Friday. You will
use them for programming exercises. |
|
Recitation
material: Recitations |
|
|
Audience |
Unit |
Recorded PPTX Slides |
PDF Slides |
Chapters (Not always current with PPT) |
Videos |
Assignments (Please scroll to see the first assignment) |
Source Code of Examples (Java Package) |
|
401 |
Course
Information (8/22) |
|
|
||||
|
110 and 401 |
Eclipse
Install and Basic Use (Look on your own) |
|
|
|
|||
|
110 and 401 |
ObjectEditor Install (Look on your own) |
|
|
|
|||
|
401 |
Specifying
Main Args in Eclipse (Look on your own) |
|
|
|
|||
|
401 |
Debugging
in Eclipse (Look on your own) |
|
|
|
|||
|
401 |
Conventional
programming in Java for those who know conventional programming (Look on your
own) |
|
|
||||
|
401 |
Scanning
(8/27) |
||||||
|
110 (401 Prerequisite) |
Theater
Model of the Computer |
|
|
|
|||
|
110 and 401 |
Object-first Introduction to Programming (8/27, 8/29) |
|
|||||
|
110 and 401 (look on you own) |
Packages |
|
|
|
|||
|
110 (401 Prerequisite) |
Functions |
|
|
||||
|
110 and 401 |
State and Properties (9/5, 9/10 ) |
||||||
|
110 and 401 |
Interfaces (9/10, 9/12) |
|
|||||
|
110 and 401 |
Least
Privilege (Look on your own) |
|
|
||||
|
110 |
Math
Types (401 Prerequisite) |
|
|
||||
|
110 and 401 |
Documentation:
Comments |
|
|
||||
|
110 and 401 |
Documentation:
Annotations Meta Circularity |
|
|
|
|||
|
110 and 401 |
Graphics (9/12, 9/17) |
|
|||||
|
110 and 401 |
Composite: Objects and Shapes (9/17,
9/19) |
|
|||||
|
110 and 401 |
Composite:
Annotations |
|
|
|
|||
|
110 and 401 |
Composite:
Tree, DAGS & Graphs of Objects and Windows (9/19, 9/24) |
|
|
|
|||
|
110 and 401 |
Patterns,
Interfaces and ObjectEditor (9/24) |
|
|
|
|
||
|
110 (401 Prerequisite) |
Static
State |
|
|||||
|
110 (401 Prerequisite) |
Main
and Console Input |
|
|
||||
|
110 (401 Prerequisite) |
Types:
Char, String, |
|
|
|
|||
|
110 (401 Prerequisite) |
Types:
Enums |
|
|
|
|||
|
110 (401 Prerequisite) |
Conditionals
|
|
|
||||
|
110 (401 Prerequisite) |
Loops |
|
|
||||
|
110 (401 Prerequisite) |
Conditionals:
Advanced |
|
|
||||
|
110 (401 Prerequisite) |
Loops:
Advanced |
|
|
||||
|
110 (401 Prerequiste) |
Animation:
Loops |
|
|||||
|
110 |
Files |
|
|
|
|
||
|
110 (401 Prerequisite) |
Arrays |
|
|
||||
|
110 (401 Prerequisite) |
Arrays: Collection Implementation |
|
|||||
|
401 (maybe) |
Iterators and Scanning |
|
|||||
|
401 |
Inheritance
(9/24, 9/26, 10/1) |
|
|||||
|
401 |
Inheritance:
Type Checking (10/1, 10/3) |
|
|
||||
|
110 and 401 |
Arrays:
Collection Kinds (10/3) |
|
|||||
|
401 |
Inheritance: Virtual, Abstract Factory Methods |
|
lectures.inheritance.virtual_abstract_factory_methods
Package |
||||
|
401 |
Factories
|
|
|
|
|||
|
110 and 401 |
Inheritance: Multiple |
|
|||||
|
110 (maybe) and 401 |
MVC (10/8) |
|
lectures.mvc.monolithic Package |
||||
|
401 |
MVC:
Properties and Collections (10/10) |
|
|
||||
|
401 |
MVC
and Toolkits (10/12, 10/17) |
|
|||||
|
401 |
MVC
and Graphics/Window Systems (10/17, 10/22, 10/24) |
|
|||||
|
110 and 401 |
Documentation:
Assertions (10/24, 10/29) |
|
|
||||
|
401 (maybe) |
Reflection and Action Objects |
|
|||||
|
401 |
Animation:
MVC (10/29) |
|
|||||
|
401 |
Animation: Threads and Command Objects (10/29, 10/31) |
||||||
|
401 |
Inheritance: Abstract Classes (10/31, 11/5) |
|
|||||
|
401 |
Parsing and Grammars (11/5) |
|
|||||
|
401 |
Animation and Threads: Synchronized Methods (11/7) |
|
|||||
|
401 |
Animation and Threads: User-Interface Thread (11/7, 11/12) |
|
|||||
|
401 |
Animation and Threads: Wait and Notify (11/12, 11/14) |
|
|||||
|
401 |
Composite
Design Pattern (11/14, 11/19) |
|
|
|
|||
|
110 & maybe 401 |
Recursion
(11/19) |
|
|
||||
|
401 |
Composite: Visitors (11/26) |
|
|||||
|
401 |
Generics, Adapters, Basic Delegation (11/26, 12/3, 12/5) |
|
|||||
|
401 |
Conclusion
(12/5) |
|
|
|
|
||
|
401 |
Exceptions |
|
|
||||
|
401 (maybe) |
Undoable Command Objects |
|
|
||||
|
401 |
Generics: Advanced |
|
|||||
|
401 (maybe) |
Equals,
Polymorphism vs. Overloading |
|
|
||||
|
401 (maybe) |
Deep
and Shallow Copy |
|
|
||||
|
401 (maybe) |
Inheritance
vs. Delegation |
|
|
||||
|
401 (maybe) |
Inheritance
vs. Delegation Inheritance
vs. Delegation: Abstract Methods: Shared Variables Inheritance
vs. Delegation: Abstract Methods: MVC Inheritance
vs. Delegation: Abstract Methods: Wrong Inheritance |
|
|
lectures.inheritancevsdelegation Package lectures.inheritance.inheritancevsdelegation.abstract_methods
Package lectures.inheritance.inheritancevsdelegation.mvc Package lectures.inheritance.inheritancevsdelegation.wrong_is_a
Package |
|||
|
401 (maybe) |
Initialization and Inheritance |
|
|
|
|||
|
401 (maybe) |
Assertions:
Advanced |
|
|||||
|
|
Midterm 1 Grade Distribution (Oct 22) |
|
|
|
|||
|
Midterm
2 Grade Distribution (Dec 3) |
|
|
|
|
|
|
|
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 |
|