CMPS 12A: Introduction to Programming
Winter 2006

Prof. Scott A. Brandt

Computer Science Department
University of California, Santa Cruz


NEWS:

 

3/25/06 - I have finished the grading for the quarter. You may pick up your final exams during my office hours next quarter (times/days TBD).

Course grading:
Course grades were calculated as documented in the class web page: Programming assignments (20%), Midterms (40%). Final (40%).

Although they were required, a number of students didn't submit one or both of the ungraded programming assignments. To reward those that did, I added a 3% bonus per submitted ungraded assignment to the homework average of each student that submitted them.

The course grades were calculated on a 90/80/70 scale, with plusses and minuses given for grades in the upper and lower ranges of each grade.

 
Course GradeNumber
A+9
A15
A-5
B+6
B13
B-3
C+9
C9
D8
F14

Lab grading:
Lab grades were based on attendance—the percentage of labs attended—and performance—the percentage score on the in-lab quizzes and evaluations.

The lab grades were computed on a 90/80/70 scale by adding (attendance + performance/10). In other words, as promised, the lab grade was primarily based on attendance but I gave a bonus to those people who demonstrated that they learned the material while they were there.

 
Lab GradeNumber
A55
B17
C0
D10
F9


3/16/06 - Now that the quarter is winding down I want to tell you how great it has been teaching this class this quarter. The amount of class participation and the amount of improvement I have seen from everyone has made teaching this class a genuine pleasure. Good luck on the final exam—Scott

3/16/06 - Assignment #6

This assignment is optional. If your grade on this assignment is higher than your average on the other assignments, I will count it. If not (including if you don't do it), I will not count it.

The assignment: Rewrite Life1D to be object-oriented. Create and use at least three classes: One for Cells, one for a Row of cells, and one for the Rules. You may use my version of Life1D (link below) as the basis for your object-oriented program.

The assignment is due any time before the final exam.

3/14/06 - My code for Life1D.java is available here.

3/14/06 - Matt's practice final is available here.

3/2/06 - Grade adjustment on Midterm 2—as we discussed in class, I am adjusting the grading on midterm 2 as follows: I am dropping the lowest scoring question from each person's exam and dividing the result by .9 (i.e. grading out of 90 possible points instead of 100). If you left class early, taking your exam with you, I can't adjust your grade unless you give it to me (after I return from my travels).

Prof. Helmbold will return the exams in my possession. You will notice that I haven't written a new grade on your exam. I have, however, written them in my grade list. To calculate your new grade, drop your lowest score (not including the extra credit), sum up the remaining scores (including the extra credit) and divide the total by .9.

3/2/06 - I will be out of town next week attending a workshop and meeting related to my research. Professor David Helmbold will teach class on Tuesday and Professor Ira Pohl (co-author of our book) will teach on Thursday. I will have limited email access while I am away so any questions beyond what is covered in the book will probably have to wait until I return.

3/1/06 - I have finished grading Midterm 2. The answer key is available here.

2/21/06 - Matt, our tireless MSI learning assistant, has created a review for Midterm 2. Here it is.

2/19/06 - In reference to our discussion of the efficiency of different sorting algorithms the other day, here is a nice discussion of sort efficiency. (thanks to Michael Beckman for the reference). Note the difference between the O(nlogn) algorithms and the O(n^2) algorithms. It takes < 1 second for the O(nlogn) algorithms to sort 100,000 items, while it takes almost 15 minutes—about 2500 times longer—for the O(n^2) algorithms.

2/17/06 - Assignment 5 is posted. It is due in two weeks, on Thursday, March 2. It is a graded assignment. I suggest you start it now.

For your convenience, I coded up a solution so you could see how it works. My version is available here: Life1D.class. Note that this is the .class file, not the .java file. You can execute this file using "java Life1D".

You may find it easier to read in the rules as 8 digits separated by spaces instead of one string of digits with no spaces, as I did.

I strongly recommend that you start this assignment soon. It is a little more challenging than the previous ones.

2/17/06 - The second midterm will be Tuesday, February 28.

2/17/06 - For your reference, solutions to Homeworks 1 through 4 are available here:

  • Homework 1
  • Homework 2
  • Homework 3
  • Homework 4

    2/9/06 - Here is the answer key for midterm 1.

    2/9/06 - The midterms are graded. I will give them back in class later today and we will go through the answers (and grading) in detail.

    2/9/06 - For those of you who were not in class on Tuesday. Assignment 4 is posted and is due a week from last Tuesday.

    1/24/06 - A few people asked me to post the examples I have been creating in class. A bunch of examples are available here.

    Here are a few specific ones we have created in class:

  • HelloWorld.java
  • IfElse.java
  • Fibonacci.java
  • SortInput.java
  • Switches.java
  • Switches2.java

    I also created one to illustrate reading a character from the input: ReadChars.java

    1/24/06 - The first midterm will be on Tuesday, January 31

    1/13/06 - Here is a sample program using the Scanner class to get input from the user: TestInput.java. I just installed Java 1.5 and tested it, and it works as expected.

    If you want to install Java on your own machine, click here and then click on the link that says "Download JDK 5.0 Update 6" partway down the page. That will take you to another page witih a bunch of different packages for different machines.

    If somebody reminds me on Tuesday, we can talk about using the Scanner class a bit more, and I will show you how to use Java Documentation.

    Ongoing - I am in the process of updating these web pages. They currently contain information from a previous quarter. I'll let you know when everything is current. In the mean time, feel free to browse around, as relatively little will change.

    First day of class - We are using a different edition of the book this quarter: the almost-released second edition. Prof. McDowell, who coauthored the book with Prof. Pohl, has generously made a pre-publication copy for the book available to us in in PDF form.

    You can download the chapters here (The username and password will be made available on the first day of class).

    Alternatively, you can purchase a printed copy of the new edition at the Slug Books Co-op.


  • Time: TTh 12:00-1:45
    Location: Kresge 327
    Instructor: Prof. Scott A. Brandt (sbrandt@cs.ucsc.edu)
    Office/Office Hours: E2-347B, Tuesdays and Thursdays 4-5
    TAs: Marinna Lee (mclee@cs.ucsc.edu), Yeon Gwack (ygg@cs.ucsc.edu)
    TA Office/Office Hours: TBD
    Lab Hours: BE 105: Mondays 9:30-11:30, Crown 201: Thursdays 2-4, Fridays 12-2
    MSI Learning Assistant Matt Low (mlow@ucsc.edu)
    MSI Schedule: TBD
    Prerequisites: Eligibility to enroll in Mathematics 19A (Mathematics 2B or 3 or 40 or higher on mathematics placement exam) or Mathematics 19A or 11A or Economics 11A or Applied Mathematics and Statistics 11A.Concurrent enrollment in course 12L required.
    Required Text: Java by Dissection, 2nd Edition, by Pohl and McDowell
    Optional Text: Any other Java book
    Course Web Page: http://www.cs.ucsc.edu/~sbrandt/12A
    Class Newsgroup: ucsc.class.cmp12a

    Course Notes

    This page contains the lecture notes for the course. I will put them up as soon as possible, but I may not always be able to do so before the corresponding class period.

    General Lab Information

    This section contains general information about things you will need to know how to do in order to do well in this class (and future classes as well). It includes information on using Unix, creating a program, and submitting homework assignments. If you need additional background information, you should definitely check out the resources CATS (Communications and Technology Services) provides. They are located downstairs in the Communications building. If you don't yet have a CATS account, click here to register.

    TAs and Tutors

    This section contains information about the lab times and when the TAs and tutors are available.

    Lecture Supplements

    This section contains additional information from the instructor to supplement the lectures. Materials will be added here as they become necessary.

    FAQ (Frequently Asked Questions): See if your question is here!

    This section contains some questions pertaining to programming which students frequently ask.

    Required Text:

    Java by Dissection, 2nd Edition by Pohl and McDowell.

    Prof. McDowell, who coauthored the book with Prof. Pohl, has generously made a pre-publication copy for the book available to us in in PDF form. You can download the chapters here (The username and password will be made available on the first day of class). Alternatively, you can purchase a printed copy of the new edition at the Slug Books Co-op.

    Evaluation:

    • 8 Homework/programming assignments (20%).
    • 2 Midterms (40%).
    • Final (40%).
    A minimum of 50% on all three aspects of the grade is necessary but not sufficient to pass this class. This means, if you receive less than 50% on any one of the three parts (hw, quizzes, final), you will not pass, however, just because you score at least 50% on each part does not imply that you will pass. For example, someone that scored 51% on each of the three parts would almost certainly, NOT pass. The policy is intended primarily to prevent students from "blowing off" the homework because it only counts 20% of the grade. You cannot pass this class if you do not do the homework, and you are unlikely to do well on the exams if you don't do well on the homeworks.

    Ungraded practice assignments: In addition to the four graded programming assignments, there will be four, ungraded programming assignments. For these assignments you are free to consult freely with any of your classmates. The experience gained in completing these assignments will help you with the graded assignments and the exams, which must be solely your own work.

    Academic Dishonesty: Any confirmed academic dishonesty including but not limited to copying programs or cheating on exams, will constitute a failure of the computer ethics portion of this class and may result in a no-pass or failing grade. You are encouraged to read the campus policies regarding academic integrity.

    Facilities: This quarter you will using the Unix operating system for your programming assignments. You will use submit for turning in homework.

    Homework: Turn in homework by using the submit procedures. It will not allow late work. Late work will not be accepted or graded. The program should be submitted in whatever form it is in - it is possible to receive some partial credit for a program that is not working. Homework is graded in terms of it being done in a good style, being correct, being concise, being readable, and being efficient.

    Audience: This course is for CS, CE and ISM majors and prospective majors. These are disciplines which emphasizes mathematics and problem solving. There are computer literacy and computer programming courses that are offered for the non-major. If you are shaky in your preparation you should consider taking CMPS010, which is highly recommended for all CS majors.

    Syllabus

    Date Topic Reading
    January 5, 10 Class Overview, Introduction Chapter 1
    January 12, 17 Program Fundamentals Chapter 2
    January 19, 24 Statements and Control Flow Sections 3.1-3.4
    January 26, 31 Statements and Control Flow (cont) Chapter 3.5-3.10
    February 2, 7 Functional Abstraction Chapter 4
    February 9 Functional Abstraction Chapter 4 (read it again)
    February 14, 16 Arrays Chapter 5
    February 21, 23 Arrays (cont), Data Abstraction Chapter 5, Sections 6.1-6.8
    February 28, March 2 Data Abstraction (cont) Chapter 6
    March 7, 9 Data Abstraction Chapter 6
    March 14, 16 Slack/Review?

    Telephone: (831) 459-5042 / FAX: (831) 459-4829 / sbrandt@cs.ucsc.edu