
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Adjeroh; Class: Introduction-Computer Science; Subject: Computer Science; University: West Virginia University; Term: Fall 2008;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

1
Question 1 (Sorting and Searching with Strings) 20 marks (A) Chapter 10, Programming Exercise #8, pp. 692 (B) Chapter 10, Programming Exercise #9, pp. 692 (Note: that the bubble sort program for integers is already in our notes)
Question 2 (Binary Search with and without Recursion) 35 marks (A) Chapter 10, Programming Exercise #13, pp. 962. (B) Repeat (A), but by using a recursive version of the binary search method.
For Part (A), use a user-defined method called binarySearchVectors( ) to perform the binary search. For Part (B), use a recursive version recursiveBinarySearch().
Notes: The book already has a binary search method for arrays in Chapter 10. For this problem, you should use the bubble sort results developed in part (Q1B) above (and not selection sort as suggested in the book).
Question 3 (Koch’s Snowflakes) 35 marks Chapter 14, Programming Exercise #15, pp. 956
Note: This is a simple program, although it may look intimidating at first sight. For this problem, first look at the example on pp. 944 of the book (also in the class handout). You will need the drawLine() method, defined in java.awt.* and GUI components in javax.swing.*. This problem covers materials from Chapters 13 and 14.
Programming Style & Program Organization 10 marks
Remember that coding (or implementation) is just one aspect of the problem solving methodology. Projects will be marked based on how well they follow the software development methodology as described in class. Also, see other examples in the book. You could copy the problem as described in the book as your Problem Statement. The Problem Solving phase is mandatory for all the questions. For details on the format for assignment submission, and guidelines for preparing your projects, please see the documents: “CS 110: Preparation and Grading of Programming Projects: The Importance of Professionalism” http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/proj-prep.htm, and “CS 110: Format of Your Programming Projects” http://www.csee.wvu.edu/~adjeroh/classes/cs110/general/prformat.htm
These documents are available from the course web site. Also, see examples in the book (especially the Programming Examples). Submit Command Please submit all files used in your assignment using the submit command: http://www.csee.wvu.edu/~adjeroh/classes/cs110/assessment/submit.html That is, program codes, and the files for the documentation. Also, you are required to submit a hardcopy of your assignment documentation (problem solving phase, algorithm design, verification, test plan, and program listing) in class. (See due dates above).