CSCI 230 fall 2012

Computer Science Department Guide

Teaching Assistant: Lee Blackwell

Syllabus

Course Description with Outcomes

Textbook Student Resources

Schedule:

Date in 2012
Topic Readings due Homework and Programming Assignments due
T 21 Aug
Overview and Java Review Chapter 1

You may collaborate in pairs if you wish, but in that case you must document the collaboration and each student must submit individually per below.

If you find code solutions by others, you must acknowledge them and you must provide your own version.

You will drop homework (HW*) and programming assignments (P*) into your "Assignments" folder on Google Drive that I shared with you as often as you like until the due date and time.

R 23 Aug Overview and Java Review Chapter 1

Knowledge Exercises 1.(16 - 22).

Create a single PDF of your answers and name it [last_first].HW1.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 28 Aug
Array-Based Structures Chapter 2

Install Netbeans and use it to create a Java solution for Programming Exercise 1.45.

Document your code, including authorship and context, and your outputs;

Create a single package "p1" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p1/*.java" and then execute "java p1.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P1" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P1".

Due: 10:00 AM

Bowring solution from class

R 30 Aug
Array-Based Structures Chapter 2

Knowledge Exercises 2.(2, 4, 6, 8, 10, 12).

Create a single PDF of your answers and name it [last_first].HW2.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 04 Sep
Array-Based Structures Chapter 2

Use Netbeans to create a Java solution for Programming Exercises 2.19 and 2.20 taken together.

Document your code, including authorship and context, and your outputs;

Create a single package "p2" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p2/*.java" and then execute "java p2.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P2" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P2".

Due: 10:00 AM

Bowring solution from class

R 06 Sep Stacks and Queues Chapter 3

Knowledge Exercises 3.(2, 4, 6, 8, 10, 12, 14).

Create a single PDF of your answers and name it [last_first].HW3.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 11 Sep
Stacks and Queues Chapter 3

Use Netbeans to create a Java solution for Programming Exercises 3.24 and 3.21 taken together.

Details: Implement and test 3.24 first - you will be converting infixed expressions with integer operands (assume parentheses dictate order of operator execution) into postfixed expressions. Then implement 3.21 to take the postfixed expression from 3.24 and evaluate it.

You should have a class "ArithmeticExpressionConversions" with method "public static String convertInfixToPostfix( String infixExpression )" and method public static int evaluatePostfixExpression( String postfixExpression )".

Be sure to specify pre- and post-conditions and provide for reporting invalid expressions.

Your Driver class should take as input an infixed expression, convert it, and evaluate it. Output should show the conversion as well as the result. Your Driver class should loop until the user enters "-1".

Document your code, including authorship and context, and your outputs;

Create a single package "p3" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p3/*.java" and then execute "java p3.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P3" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P3".

Due: 10:00 AM

Bowring solution from class

R 13 Sep
Linked Lists and Iterators Chapter 4

Knowledge Exercises 4.(2, 4, 6, 8, 10, 12).

Create a single PDF of your answers and name it [last_first].HW4.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 18 Sep Linked Lists and Iterators Chapter 4

Refactor project P3 so that the Stack class is implemented using a singly-linked list.

Be sure to specify pre- and post-conditions and provide for reporting invalid expressions.

Your Driver class should take as input an infixed expression, convert it, and evaluate it. Output should show the conversion as well as the result. Your Driver class should loop until the user enters "-1".

Document your code, including authorship and context, and your outputs;

Create a single package "p4" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p4/*.java" and then execute "java p4.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P4" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P4".

Due: 10:00 AM

Bowring solution from class

Bowring solution from class using generics

R 20 Sep
Linked Lists and Iterators Chapter 4

Knowledge Exercises 4.(16, 18, 22, 24).

Create a single PDF of your answers and name it [last_first].HW5.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 25 Sep Review Chapters 1-4 Bring your questions to class in preparation for test.
R 27 Sep TEST #1  
T 02 Oct Hashed Data Structures Chapter 5

Use Netbeans to create a Java solution for Programming Exercise 4.32.

Requirements:

1. Create an interface named GenericQueueInterface specifying queue operations.

2. Create class SLLQueue that implements GenericQueueInterface using a double-ended singly-linked list.

3. Handle error conditions.

4. Specify pre- and post-conditions.

5. Document your code, including authorship and context, and your outputs.

Your Driver class should test your implementation of enqueue and dequeue as described in the problem statement. Inputs are not required, you can hard-code your tests as is done in the text. Be sure the output of your driver is readable with text explaining what you are testing.

Create a single package "p5" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p5/*.java" and then execute "java p5.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P5" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P5".

Due: 10:00 AM

Bowring solution from class

R 04 Oct Hashed Data Structures Chapter 5

Knowledge Exercises 5.(2, 4, 6, 8, 10, 12, 14, 16, 18).

Create a single PDF of your answers and name it [last_first].HW6.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 09 Oct Hashed Data Structures Chapter 5

Use Netbeans to create a Java solution for Programming Exercise 5.40.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

Your Driver class should test your implementation as described in the problem statement.

Create a single package "p6" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p6/*.java" and then execute "java p6.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P6" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P6".

Due: 10:00 AM

R 11 Oct Recursion Chapter 6

Knowledge Exercises 5.(22, 24, 26, 28, 30, 34, 36, 38).

Create a single PDF of your answers and name it [last_first].HW7.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 16 Oct Recursion Chapter 6

Use Netbeans to create a Java solution for Programming Exercises 6.(14, 15, 16, 17).

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Create a class RecursionExercises with four methods with signatures as follows (per the exercise numbers):

public int exercise14(int a, int b);

public char[] exercise15(int start, int end);

public int exercise16(int[] sortedArray, int aKey);

public int exercise17(int a, int b);

Your Driver class should test your implementations as described in the problem statements.

Create a single package "p7" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p7/*.java" and then execute "java p7.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P7" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P7".

Due: 10:00 AM

R 18 Oct Recursion Chapter 6

Knowledge Exercises 6.(2, 4, 6, 8, 10).

Create a single PDF of your answers and name it [last_first].HW8.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 23 Oct Trees Chapter 7

Use Netbeans to create a Java solution for Programming Exercise 6.24.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Create a class RecursionExercisesII with one method with signature as follows:

public void produceRoute();

Your Driver class should test your implementation as described in the problem statement.

Create a single package "p8" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p8/*.java" and then execute "java p8.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P8" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P8".

Due: 10:00 AM

Bowring solution from class

R 25 Oct Trees Chapter 7

Knowledge Exercises 7.(2, 4, 6, 8, 10, 12).

Create a single PDF of your answers and name it [last_first].HW9.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 30 Oct Trees Chapter 7

Use Netbeans to create a Java solution for Programming Exercise 7.29.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Create a class BinarySearchTree implementing the binary search tree interface for insert and fetch using an array and one additional method with signature as follows:

public void scanNLR(BinarySearchTree binarySearchTree) that prints out the scan;

Your Driver class should test your implementation as described in the problem statement.

Create a single package "p9" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p9/*.java" and then execute "java p9.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P9" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P9".

Due: 10:00 AM

R 01 Nov TEST #2  
T 06 Nov Sorting Chapter 8 ELECTION DAY = NO CLASS BUT YES ASSIGNMENT = READ
R 08 Nov Sorting Chapter 8

Use Netbeans to create a Java solution for Programming Exercises 8.34 and 8.35.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Create a class BubbleSort implementing the bubble sort. Provide two public methods (one for each exercise) as follows:

public static void sort(int[] numbers) that prints out the sorted array;

public static void sortWithReport(int[] numbers) that prints out the sorted array and the per-pass details specified in exercise 8.35;

Your Driver class should test your implementation as described in the problem statements.

Create a single package "p10" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p10/*.java" and then execute "java p10.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P10" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P10".

Due: 10:00 AM

T 13 Nov Sorting Chapter 8

Use Netbeans to create a Java solution for Programming Exercises 8.39.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Create a class MergeSort implementing the merge sort. Provide one public method as follows:

public static void sort(int[] numbers) that prints the sort statistics and comparisons for the four cases (more if you like) in table format per the exercise instructions;

Your Driver class should test your implementation as described in the problem statements.

Create a single package "p11" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p11/*.java" and then execute "java p11.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P11" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P11".

Due: 10:00 AM

R 15 Nov Graphs Chapter 9

Knowledge Exercises 9.(2, 4, 6, 8, 10, 12, 14, 16).

Create a single PDF of your answers and name it [last_first].HW10.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

T 20 Nov Graphs Chapter 9

Use Netbeans to create a Java solution for Programming Exercises 9.35.

Requirements:

1. Specify pre- and post-conditions.

2. Document your code, including authorship and context, and your outputs.

3. Extend the class SimpleGraph as directed.

Your Driver class should test your implementation as described in the problem statements.

Create a single package "p12" to contain your classes. Provide a "Driver" class with a main method that will exercise your solution. I will compile your source directory using "javac p12/*.java" and then execute "java p12.Driver". Please confirm that this works from the command line from inside the "src" directory before you submit. Note the "/" will be "\" on Windows machines.

Create a new folder "P12" in your "Assignments" folder. Zip your "src" folder and drop "src.zip" into "P12".

Due: 10:00 AM

R 22 Nov T H A N K S G I V I N G
T 27 Nov Graphs Chapter 9
R 29 Nov REVIEW ALL

Knowledge Exercises 9.(18, 20, 22, 24, 26, 28, 32, 34).

Create a single PDF of your answers and name it [last_first].HW11.pdf.

Drop the PDF into "Assignments".

Due: 10:00 AM

SAT 8 Dec 08:00 - 11:00 AM FINAL EXAM