COMP 14-091: Introduction to Programming

Summer Session I 2000

Old Well

Main | Syllabus | Schedule | Assignments | Grades | Resources

Line
 

Some advice on reading the book

Take a look at the "Chapter Objectives" section on the first page of each chapter. It will give you an idea of what you should learn in that chapter. While you are reading you should pay close attention to the "Key Concept" boxes. These generally contain very important things that you have to understand. Finally, make use of the Self-Review questions at the end of each chapter. Not all of them will apply (since we will skip parts of some chapters), but they include answers so they are a good way to check yourself.

The reading assignments also contain terms you should know and some exercises that you can do if you want to check your knowledge.
 

Reading Assignments

Other Assignments

May 23, 2000

1.1 - 1.5 - This chapter is basic information on computers, programming, and Java. This is information that just about everyone using a computer ought to know. This class focuses on programming so you won't be responsible for the details, but it's stuff you should know.

Terms to know: CPU, main memory (MM), I/O, Secondary memory, program, operating  systems (be able to name some examples),  application, peripheral, modem, memory location, memory address, byte (B, KB, MB, GB, TB), RAM, ROM, CD-ROM, control unit, ALU, registers, instruction register, program counter, comment, documentation, inline documentation, identifier, reserved word, white
space, compiler, interpreter, syntax, semantics, the three kinds of errors

Recommended exercises: 1.4, 1.5, 1.9, 1.13, 1.14, 1.15, 1.16, and 1.17

May 24, 2000

2.1 - 2.7 - This chapter contains the information that is very fundamental to programming. Without primitive data and objects, we couldn't write programs. Make sure you understand this.

fig 2.3: we will only be using int and double - you can ignore the rest

things you should know later, but don't have to thoroughly understand now: escape sequences (fig. 2.2), the precedence order of the operations (fig. 2.4), data conversion, Random class, Math class, (skip the Keyboard class altogether)

Terms to know: primitive data, object, data type, class, message, variable, boolean, expression, operator, operand

Recommended exercises: 2.2, 2.3, and 2.6

May 25, 2000

3.1-3.2, 3.4 - Just like the last chapter contained the fundamentals of how data is handled in Java, this chapter talks about the fundamentals of representing statements in Java. In this reading you should learn about boolean expressions, and the Java statements: if and if-else. We'll come back to the switch statement (3.3) and the additional operators (3.5) later in the session.

Terms to know: if, if-else, boolean expression, equality operators, relational operators

Recommended exercises: 3.4, 3.5, 3.6

May 31, 2000

3.6-3.9 - This reading assignment discusses the different looping statements used in Java.

Terms to know: while, do, for, sentinel value, infinite loop

Recommended exercises: 3.7, 3.8, 3.9, 3.10

June 1, 2000

3.3,3.5 + assignment for May 31 - Since I've had so many questions about the switch statement and the additional operators, we're just going to go ahead and talk about them now. I had been planning to wait until after the midterm exam.

Terms to know: switch, postfix form, prefix form

Recommended exercises: 3.3

June 2, 2000

4.1-4.2 - We are finally going to talk about classes in more detail. This chapter discusses how to write a class of your own. I highly recommend you read these two sections before class on Monday.

Terms to know: class, object, variable, method

Recommended exercises: none for this reading

June 5, 2000

4.3 - We are finally learning how to write our own methods! Now we'll be able to do lots of neat stuff.

Terms to know: return statement, formal parameters, actual parameters, scope, local data

Recommended exercises: none for this reading

June 6, 2000

4.4-4.6 - You've read the basics about classes and objects. These sections talk about some specific details: Object Relationships, Method Overloading and Method Decomposition

Terms to know: aggregate object, method overloading, signature

Recommended exercises: 4.1, 4.2, 4.3

June 12, 2000

5.1-5.2 - We talked very briefly about the fact that when you declare a variable with a class data type that it actually makes a reference and doesn't set up storage space for that object. Well, now we're going to dive deeper into that issue and see things like why you can't use the equality operator to test if two strings are the same. We're also going to talk more about the static modifier and when you can and can't use it. You can skip over the section on garbage collecting.

Terms to know: null reference, alias, use of == with references versus primitive data, pass by value vs. pass by reference, static/class variables, static/class methods

Recommended exercises: 5.2

June 13, 2000

6.1-6.2 - Welcome to the exciting world of arrays! No longer will your program be limited by a few wimpy variables! You have the power to make long lists of primitive data type variables or even lists of entire objects! Grasp the power before you and fulfill your destiny!

Terms to grok: array, index, subscript, initializer lists

Recommended exercises: 6.1, 6.2, 6.3, 6.5

June 14, 2000

6.3 - Now that you have mastered the incredible power that is arrays, you can explore one of the extremely useful ideas that people have come up with to exploit arrays. Sorting is what makes tha phone book and dictionary easy to use. I don't even want to think about what life would be like if they weren't in alphabetical order...yuck

Terms to know: sorting, selection sort, insertion sort

Recommended exercises: nada para ti

June 19, 2000

Appendix J (p. 577-596) - This part of the book contains a basic introduction to writing HTML documents. This material will not be on the final exam. We're just talking about it because it's something people are interested in.

June 20, 2000

1.6, 2.9-2.10, 3.10, 4.7-4.8 - The material covered in these sections is about graphics and applets. Once again, this stuff won't be on the final exam. Some people just might be interested in writing an applet to put on their web page (or for whatever other reason) so we're talking about it in class.

PBJ: May 23, 2000 (due May 24, 2000)

Write an algorithm for making a peanut butter and jelly sandwich (more detailed description is here).

P1: May 24, 2000 (due May 26, 2000)

This assignment doesn't involve any programming. The purpose is to get you used to the programming environment and the way you will hand in assignments. Take a look at the detailed description of P1.

P2: May 26, 2000 (due June 1, 2000)

This is your first assignment that actually requires programming. Good luck. Here is the detailed description of P2. Here is the solution.

P3: June 1, 2000 (due June 6, 2000)

Here we go again. This time you get to add looping to your programs. Like I said in class, this one requires nested loops. Here is the detailed description of P3. Here is the solution.

P4: June 6, 2000 (due June 13, 2000)

This assignments lets you start playing with adding your own classes. For this assignment, I have given you the framework for a class that represents a pair of dice. It is up to you to fill it in and write a program to use it. Go check out the detailed description of P4. Here is the solution.

P5: June 13, 2000 (due June 20, 2000)

This assignment lets you build a simulation of a gas station. It makes use of two classes in addition to the main class. They represent a gas pump and the gas station. I decided to give you the framework for all three .java files. I even wrote some useful methods for you! Go see the detailed description of P5. Here is the solution.

P6: June 16, 2000 (due June 23, 2000)

The final assignment! In this assignment you get to play around with arrays. Read numbers into an array, print them out, then do some calculations with them. Here's the detailed description so you can jump on P6 right away. Here is the solution.