Announcements, Homework, Lecture Outlines most recent first

Mon 8-Dec 

New Added after class   ConnectBoardGUI.java
This Wednesday's lecture will be in 930 GS lab for those who have not completed ConnectBoard (attendance will not be taken, there will be no in-class.
You are expected to go to lab this week, even f you are done.  
Show the Console based game to your Section leader
If you have your final version submitted to WebCat, you may leave lab early
Still send an email to your grader with only one file attached (or copy into your email
Make sure moth names are on the console based version of ConnectBoard

Homework

If necessary, work on ConnectBoard

Lecture

Questions on ConnectBoard Project?
Pick up quiz (70.3 average, 75 median, 100 Max, 20 Min), grades (42 As, 30Bs, 12 Cs, 18Ds, 24Es) and a Clementine from your section leader 
Here is the heading to locate your grades
First
Name
Last
Name
Grade
Est.
Max
Test
Mid
Test
Low
Test
Final
Proj
Proj
Ave
InClass
HW
Lab
Aver.
Quiz 
as %
Jane Doe 89.6 91 89 68 96.4 96.4 93.3 94.4 75

 


 

 

Fri 5-Dec 

Next Wednesday's lecture will be in 930 GS lab for those who have not completed ConnectBoard (attendance will not be taken, there will be no in-class.
Next Monday (please attend, as this will be our final lecture:  
We will have all of your grades (except the final project)
We will have a special seasonal treat for all :-)
Please wait until then to do online evals--when the course is almost over

Homework

If necessary, work on ConnectBoard

Lecture

Section Leader Reviews
Question on Practice quiz or answers?
30 minute Quiz 
Is worth either 5% of your final grade
Has 3 questions on two sides

 

Wed 3-Dec 

Announcements

Quiz Friday: 2D Arrays

Homework

Take this practice quiz (handout at end of class) and compare your answers to these answers
New Added after class Answers will be posted here
Bonus: answer to in-class makeCheckerboard.

 Lecture

More 2D arrays
Image  transpose (use the same Matrix algorithm to rotate and image)
3D arrays  (uses nested loops and [][][])
Picture a 3D array 
Consider colors with RGB in a JColorChooser
Create our own image with a 3D array where subscript 3 represents R G B
Get the negative of a color
Write the code to get the negative of an image
Friday's Quiz Content
Do something with a 2D array (like today's in-class)
Add a method our  Matrix class  (like Matrix add(Matrix) or Matrix transpose())
In class:

 

 

Mon 1-Dec 

Announcements

The first late day on EPackMule goes to tonight Monday 1-Dec @ 10:00 pm (the 4 day Thanksgiving weekend does not apply to late days)  
Go to section with your partner this week (chosen at the end of class today), even if this is not your usual section leader.
The final project is to be completed in pairs unless you get Rick's permission or have not signed up for a partner by Wednesday 3-Dec @ 3:52 pm (end of class).
Take test 3 to our next lab, we need to check one question for everyone
No grade will get worse, some will get better

Homework

Before lab, read All I Really Need to Know about Pair Programming I Learned In Kindergarten 
Begin final project with your pair programming partner in lab tomorrow

 Lecture

More 2D arrays
Matrix transpose 
Image transpose horizontal for vertical (make the pixel at (x,y) be at (y,x))
Present final project: ConnectBoard (a more general version of ConnectFour)
Consider Pair Programming
Partner can be from any section.
You both must go to the same section, attendance will be taken and count as your grade
Always work on the cod together, switch driver and navigator roles frequently (every 30 minutes or whenever the feeling emerges).  
Do not write the entire system yourself (unless you have permission)!
Have the correct section leader get a copy of both names on  your pair programming team
Pick partners You may work with any C Sc 127A student registered for Fall 2008 

 

Wed 26-Nov 

Announcements

New Added after class: The first late day on EPackMule has been extended to Monday 1-Dec @ 10:00 pm at which time a late day is the usual 24 hour period.  
Enjoy your break.
Wednesday's lecture will be held in 930 Gould Simpson for those of you who have not finished this project.  

Homework

None

 Lecture

If necessary, meet in 930 Gould Simpson to finish EPackMule
Instructions To get a program to run without Eclipse 

 


Mon 24-Nov 

Announcements

Remember syllabus: lowest test = 11%, highest = 19%  (projects, labs, in-class/HW = 44%)
Test results  Test 1 Test 2 Test 3   Overall
Average 79.9 73.0 64.7    73.1
Median 85.0 79.0 69.0    79.0
Max 100 100 102
Min 38 14 7
Count 150 142 128
EPackMule due Wednesday 3:50 pm
Wednesday's lecture will be held in 930 Gould Simpson for those of you who have not finished this project.  
If you are in the lab to finish, make sure you have all of your code on you H: drive (or an archive file mailed to you, or a thumb drive, or ... )

Homework

Read Chapter 11: 2D Arrays (last chapter in the book)
Also read the project spec: Lights Out
Finish EPAckMule 

Lecture

11-2DArrays.ppt
Code demo: class Matrix
constructor(int[][]), int getNumRows(), int getNumCols(), int get(int row, int col), Matrix add(Matrix other)
In class: add another method to Matrix
See your section leader for your test

 

Fri 21-Nov 

 

Mon 24-Nov 

 

Announcements

Wednesday's lecture will be held in 930 Gould Simpson for those of you who have not finished this project.  

Homework

None

 Lecture

If necessary, meet in 930 Gould Simpson to finish EPackMule
Instructions To get a program to run without Eclipse 

 

 

Fri 21-Nov 

Test 3

Wed 19-Nov 

Announcements

NEW Added after class at 5:55 pm Practice Test Answers
Test 3: Friday 21-Nov
Test Review Session with Alex and Ari: 6:00-7:30pm Thursday, 20-Nov in 701 Gould Simpson

Homework

Complete all JavaBats on http://www.javabat.com/java/Array2
Complete the practice test 

Lecture

Questions on Project?
What is still unclear and/or what we need more examples of

 

Mon 17-Nov 

Announcements

WeeklyEmployee Project deadline extended until Monday night @ 10:00 pm.
EPackMule not due until 26-Nov 3:50 pm, but get as much done as you can this week
WebCatted at 2:36 today below WeeklyEmployeeCollection
WebCat correctness and code coverage will be 70/100 pts this time

Homework

Complete WeeklyEmployeeCollection by 10:00pm tonight 
Work on EPackMule to get all methods working and at least one sort

Lecture

Sorting 
One the first and perhaps the worst sorting algorithm: Bubble Sort
Draw pictures for sorting { 7, 3, 2, 9, 1} and write an algorithm
Consider an algorithm animation
Selection sort 
Live person demo--we need five volunteers to be a String[ ]
Write an algorithm
Consider an algorithm animation
Insertion sort (one of the better n2 sorting algorithms)
Look at an insertion sort animation and you write the algorithm in teams of 2

 

Fri 14-Nov 

Announcements   

Repeated from Wednesday: There are two changes to the current project
Deadline extended to Friday !@ 10:00 pm
You must add this method and assertions for it 
ensure get(-1) returns null at least once for 100% code coverage

// Return a reference to the WeeklyEmployee AT THE GIVEN INDEX if index is in

// range, or return null if index < 0 or index >= size

public WeeklyEmployee get(int index) {

  if (index < 0 || index >= size())

    return null;

  else

   return employee[index];

}

Homework

Work on WeeklyEmployeeCollection, due tonight by 10:00pm

Lecture

Show  Sequential Search
Demo Binary Search  (let's have a little break, maybe a little fun)
Alex introduces the next project: EPackMule

 

Wed 12-Nov 

Announcements   

New Added after class: Two changes to the current project
Deadline extended to Friday !@ 10:00 pm
You must add this method and tests for it (ensure get(-1) returns null at least once)

// Return a reference to the WeeklyEmployee AT THE GIVEN INDEX if index is in

// range, or return null if index < 0 or index >= size

public WeeklyEmployee get(int index) {

  if (index < 0 || index >= size())

    return null;

  else

   return employee[index];

}

Homework

Work on WeeklyEmployeeCollection

Lecture

Questions on current project?
1) Show compareTo with getID in context of BankAccountCollection
In class: removeAll

 

Mon 10-Nov 

Announcements   

New Added after class: toString for an empty WeeklyEmployeeCollection should return "[]".  Use this test method to make sure your toString works (this test method assumes insertInOrder also works)

@Test

public void FailedToStringWhenCollectionIsEmptyHasOneThenTwoThenThreeInsertedInOrder() {

  WeeklyEmployeeCollection list = new WeeklyEmployeeCollection(10, 5);

  assertEquals("[]", list.toString());

  list.insertInOrder(new WeeklyEmployee("Tom", 10.00, 0, "S"));

  assertEquals("[Tom]", list.toString());

  list.insertInOrder(new WeeklyEmployee("Robert", 10.00, 0, "S"));

  assertEquals("[Robert, Tom]", list.toString());

  list.insertInOrder(new WeeklyEmployee("Erin", 10.00, 0, "S"));

  assertEquals("[Erin, Robert, Tom]", list.toString());

}

There is no section this week 
And no classes in the University for Tuesday 11-Nov Veteran's day 
Section leaders will still be in the 228 GS at the usual times
If necessary, you could get 100% code coverage, you could improve your WeeklyEmployeeTest or use Rick's
WeeklyEmployeeGRADINGTest.java

Homework

Work on WeeklyEmployeeCollection
For Wednesday, Read Chapter 10: Searching and Sorting

Lecture

Questions on current project?
One more collection class: String127A
A collection of characters
Allows for a mutable String type
For example, makeUpperCase modifies all lower case letters in this String127A
String toUpperCase creates and returns a new string rather than modifying

Begins like this (get the unit test beginning also String127A.java)

public class String127A {

  private int n;

  private char[] theChars;

 

  // Precondition: initialString.length() <= 128

  public String127A(String initialString) {

    theChars = new char[128];

    n = initialString.length();

    for (int i = 0; i < n; i++)

      theChars[i] = initialString.charAt(i);

  }

 

  public int length() {

    return n;

  }

 

  // Precondition: index is in range of 0..size() - 1

  public char charAt(int index) {

     return theChars[index];

  }

 

Methods to be implemented:
constructor that takes a String argument and converts that string to an array of char
int length()
String toString()
char charAt(int index)
makeUpperCase()
compareTo(String127A other)
In class: add substring(int beginIndexInclusive, int endIndexExclusive)

 

Fri 7-Nov 

Announcements   

You can complete IntSet you began in lab by Sunday night, see Lab 10 
There will be no section next week Tuesday and no section Wednesday due to Veteran's day 
Section leaders will be in the 228 GS at the usual times on Tuesday even though there are no classes on Tuesday.

Homework

Work on  WeeklyEmployeeCollection

Lecture

Begin a collection class for a type we designed: BankAccountCollection
BankAccountCollection(int initialSize, int growthSize)
addAtEnd(BankAccount account) 
get(index)
Introduce the next project: WeeklyEmployeeCollection and consder these two methods:
insertInOrder(WeeklyEmployee employee)
removeEmployeeByName(String name)

 

Wed 5-Nov 

Announcements   

NEW Added after class:  You can complete IntSet by Sunday night, see Lab 10 
If you are missing a skateboard, see Rick

Homework

Finish ArrayFun

Lecture

A Collection Class: StringBag
add a toString to show elements between [] and separated by ", "
add  private void growArrayBy(int) to allow adds up to memory capacity
Inclass: doubleUp()

 

 

 

Mon 3-Nov 

Announcements   

repeating: Unless you are 100% you did not receive a 3 for lab this week (you didn't get get 3 gold stars in Array1 and 2 gold stars in Array2)m do the following): 
Log in to JavaBat and complete any remaining problems from any Internet connected computer. 
Add your section leader's email address as the teacher under prefs, see 
Teacher Share -- enter the email address of the teacher account (your SL email
This will make your done page and solution code visible to your SL

Homework

Work on Project 7: ArrayFun

Lecture

A Collection Class: StringBag
Implement add(String), occurencesOf(String), and remove(String)
If time permits, write private void growArrayBy(int) to allow adds up to memory capacity

 

 

Fri 31-Oct

Announcements   

Use Of, not O in public int numberOfVowels(char[] array)
Unless you are 100% you did not receive a 3 for lab this week (you didn't get get 3 gold stars in Array1 and 2 gold stars in Array2)m do the following: 
Log in to JavaBat and complete any remaining problems from any Internet connected computer. 
Add your section leader's email address as the teacher under prefs, see 
Teacher Share -- enter the email address of the teacher account (your SL email
This will make your done page and solution code visible to your SL

Homework

Work on Project 7: ArrayFun  (finish the first 5 at least before Monday's lecture)
Do NOT wait until next week!
Read Chapter 9: "A Collection Class", pages 141..152
Answer all self-checks (answers at end of chapter)
StringBag has an array instance variable and a separate integer n to keep track of the number of meaningful elements (the array is usually not filled like it is for Project 7)

Lecture

Code demo (very Project 7 relevant for those who attend lecture today)
Partition an array of strings so all elements < "M" are at the beginning of a String[]
By using an extra array  :-(
Not using an extra array  :-)
In class shiftLeft

 

Mon 27-Oct

Announcements

Test stats so far: 
Test 1 Test 2
Count 150 139
Average 79.9 72.8
Median 85.0 79.0
Max 100(2) 100(4)
Min 38 14

Homework

Before next Lecture, read Chapter 8: Arrays
Answer all self-checks as you are reading and check with answers at end of chapter before proceeding.

Lecture

08-Arrays.ppt
Declare, initializer, the length variable, subscripts, arrays as arguments, arrays as return types, three sample problems
Complete one JavaBat method from http://www.javabat.com/java/Array1 
Choose 1 from the 4th or 5th row