cs171: Introduction to Computer Science
|
|||||||||||||||||||||||||
|
|
||||||||||||||||||||||
Announcements
- Here is a set of guidelines outlining the proper role of support for tutors and helpful classmates. Be sure you understand and follow these principles.
- We have tutors available for help with the class. Nate and Andy are available for "small help" with syntax and other minor issues. They are not there for larger issues -- come see the professor for more extensive help. They will be in the lab (or nearby) 7pm-9pm on Sunday, Tuesday, Wednesday, and Thursday. Be kind to them.
- Here are the CodeLab exercises and their due dates:
- Read Me First (test exercises): Due Wednesday, Jan 18.
- Chapter 1: Introduction: Due Friday, Jan 20.
- Chapter 2: User Interaction: Due Monday, Jan 23.
- Chapter 3: Arithmetic: Due Monday, Jan 27.
- Chapter 4: Conditionals: Due Wednesday, Feb 1.
- Chapter 5: Repetition (while loop): Due Wednesday, Feb 8.
- Chapter 5: Repetition (for loop): Due Monday, Feb 13.
- Chapter 5: Repetition (loop examples): Due Wednesday, Feb 15.
- Chapter 6: Strings: Due Monday, Feb 20.
- Chapter 7: Arrays: Due Monday, Feb 27.
- Chapter 7: Arrays: Due Wednesday, Mar 1.
- Chapter 7: Arrays: Due Friday, Mar 3.
- Chapter 8: Methods: Due Friday, March 24.
- Chapter 8: Methods: Due Tuesday, March 28.
- Chapter 8: Methods: Due Thursday, March 30.
- Dr. Java is available for free to install on your own computer.
- java JDK 1.5 is available for free to install
on your own computer. You will need this (not the J2RE) in order to run Dr. Java.
Click here for a pc
Click here for a mac
Schedule
| Week | Monday | Tuesday | Wednesday | Thursday | Friday |
| Week 1 (1/16) | Register for CodeLab | Read Chapter 1 | Read Chapter 2 (variables, IO, arithmetic). (CL:Read Me First) |
|
Read Chapter 3 (CL:Chap1) |
| Week 2 (1/23) | MLK No classes (CL:Chap2) |
Read Chapter 4 | |
P1 Due (CL:Chap3) |
|
| Week 3 (1/30) | work day | (CL:Chap4)
Read Chapter 5 |
|
||
| Week 4 (2/6) | P2 Due | Midterm 1 (CL:Chap5) |
|
||
| Week 5 (2/13) | (CL:Chap5) | Read Chapter 7 | (CL:Chap5) | |
P3 Due |
| Week 6 (2/20) | P4 Due
(CL:Chap6) |
|
P5 Due | ||
| Week 7 (2/27) | (CL:Chap7) |
(CL:Chap7) |
|
P7 Due
(CL:Chap7) |
|
| Week 8 (3/6) | P6 Due | |
Midterm 2 | ||
| (3/13) | Spring Break | Spring Break | Spring Break | |
Spring Break |
| Week 9 (3/20) | |
(CL:Chap8) | |||
| Week 10 (3/27) | P8 Due | (CL:Chap8) | (CL:Chap8) |
P9 Due | |
| Week 11 (4/3) | |||||
| Week 12 (4/10) | P10 Due | Midterm 3 | |||
| Week 13 (4/17) | P11 Due | ||||
| Week 14 (4/24) | P12 Due | ||||
| Week 15 (5/1) | Last day of class Project Due |
no class | no class | no class | |
| Week 16 (5/8) | Final Exam (9am-11am) |
Programming Assignments
| Program | Due Date | Answer |
| Java API | ||
| Program 1 | Jan 27 | Temperature.java |
| Program 2 | Feb 6 | GPACalculator.java |
| Program 3 | Feb 17 | Guesser.java |
| Program 4 | Feb 20 | NYC.java |
| Program 5 | Feb 24 | Palindrome.java |
| Program 7 | Mar 3 | ExamStats.java |
| Program 6 | Mar 6 | Period.javaHints |
| Program 8 | Mar 27 | LoanCalculator.java |
| Program 9 | Mar 31 | Cryptogram.java
Cryptogram.class |
| Program 10 | April 10 | Program10.java
TimeStamp.html (API) TimeStamp.java |
| Program 11 | April 18 | Program11.java |
| Program 12 | April 18 | Matt.jpg (original) MattRotated.jpg MattPosterized.jpg (with 10 colors) Picture.java |
| Project: Mosaic | May 1 | MattMosaic32.jpg MattMosaic64.jpg BushMosaic.jpg |
| Project: Steganography | May 1 | Secret.bmp |
Examples and Downloads
- syllabus.
- Advice for how to succeed in this course.
- HelloWorld.java: our first java program.
- Notes from our rectangle/circle area programs (variables, IO, arithmetic).
- RectangleArea1.java
- RectangleArea2.java
- CircleArea1.java
- CircleArea2.java
- MarathonTime.java
- PrintSmaller.java
- MonthDays.java illustrates nested ifs and switch
- PrintAverage1.java illustrates need for loops
- PrintAverage2.java illustrates basic while loop
- PrintAverage3.java fancier version that reads u until a -1 is entered as a sentinnel value.
- Loop Gymnastics.
- Java API
- String Gymnastics.
- VowelCounter.java illustrates looping over strings.
- VowelExtractor.java illustrates looping over strings.
- StringExample.java illustrates proper ways to compare strings.
- ExamScores.java illustrates basic array operations.
- SubStringSearch.java illustrates array operations.
- SubStringSearch2.java illustrates array operations.
- DesignDebug.pdf about designing and debugging your programs.
- ArrayMerge.java debugging exercise with merging two arrays.
- ShowArgs.java reveal the secret of command-line arguments.
- Calc.java a simple command-line calculator.
- Calc1.java a simple command-line calculator with some error checking.
- Relay.java introduction to 2D arrays.
- runners.txt data for the above relay program.
- ConnectFour.java a game with 2D arrays.
- PrimeTest.java demonstrates methods by testing for prime numbers.
- ParameterTest.java illustrates pass-by-value and pass-by-reference.
- RecursionExamples.java illustrates super sum with recursion.
- AllPermutations.java illustrates recursion by printing all permutations.
- GradeBook.java is our first class design.
- GradeTester.java tests the GradeBook.java class.
- Tutorial on how to write javadoc comments.
- Weight.java a class design to illustrate calling objects and parameters of the class type.
- WeightTester.java test the Weight.java class.
- Searching.java includes sequential search and binary search.
- BubbleSortProgram.java uses bubble sort.
- SelectionSortProgram.java uses selection sort.
- SortProgram.java program for a sorting routine.
- PictureMethods.java three methods you can add to the Picture.java file (bound, changeColor, and halve).