CMSC 206 (Data Structures)

Assignment#4

Total (200 pts) due:   Friday, Nov 1st, 2013 11:59:59pm

 

Problems

1.     Do programming project 2.1 in Chapter 2, page 76 of your textbook, feel free to copy all code necessary from the book. Instead of using main to show your method works, make up your own test cases in a JUnit test class named HighArrayTest.java. [30pts]

2.     Do programming project 2.6 in Chapter 2, page 76 of your textbook, feel free to copy all code necessary from the book. Make up your own test cases in HighArrayTest.java that you created from the previous problem. [30pts]

3.     Do programming project 2.4 in Chapter 2, page 76 of your textbook. Make up your own test cases in a JUnit test class named OrderedArrTest.java to show your method works. Note that since you are using JUnit tests, you DO NOT need to implement OrderedApp class. [30pts]

4.     Do programming project 2.5 in Chapter 2, page 76 of your textbook. Use the orderedArray.java that you implement from the previous problem in this problem. Make up your own test cases in the JUnit test class OrderedArrTest.java created in the previous problem to show your method works. [30pts]

5.     Do programming project 3.3 in Chapter 3, page 112 of your textbook, feel free to copy all code necessary from the book. Make up your own test cases in a JUnit test class named InsertSortTest.java to show your method works. Note that since you are using JUnit tests, you DO NOT need to implement InsertSortApp class. [40pts]

6.     Do programming project 3.6 in Chapter 3, page 113 of your textbook, feel free to copy all code necessary from the book. Make up your own test cases in the JUnit test class InsertSortTest.java created in the previous problem to show your method works. [40pts]

Additional requirements/hint

  1. For problem 1 and 2, submit HighArray.java and HighArrayTest.java. Note that since you are using JUnit tests, you DO NOT need to implement HighArrayApp class.
  2. For problem 3 and 4, submit OrderedArray.java and OrderedArrTest.java. Note that since you are using JUnit tests, you DO NOT need to implement OrderedApp class.
  3. For problem 5 and 6, submit InsertSort.java and InsertSortTest.java. Note that since you are using JUnit tests, you DO NOT need to implement InsertSortApp class.

Submission

Provide working code for all the classes and method required for this assignment. Classes include:

  1. HighArray.java and HighArrayTest.java.
  2. OrderedArray.java and OrderedArrTest.java.
  3. InsertSort.java and InsertSortTest.java.


Turn in a zip le named LastnameFirstname-Assignment4.zip, containing all your source code. The package name for the project must be edu.brynmawr.cs206.assignment4. Include the Javadoc tag @author in each class source file. DO NOT turn in class files.