Commit b738dc89 authored by Adam Blank's avatar Adam Blank
Browse files

Reorders lab03 and lab02

parent baa3ce2a
No related merge requests found
Showing with 92 additions and 149 deletions
+92 -149
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<component name="PreferredVcsStorage"> <component name="PreferredVcsStorage">
<preferredVcsName>ApexVCS</preferredVcsName> <preferredVcsName>ApexVCS</preferredVcsName>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11.0.1" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/lab03-debugging.iml" filepath="$PROJECT_DIR$/lab03-debugging.iml" /> <module fileurl="file://$PROJECT_DIR$/lab02-debugging.iml" filepath="$PROJECT_DIR$/lab02-debugging.iml" />
</modules> </modules>
</component> </component>
</project> </project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="VcsDirectoryMappings"> <component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" /> <mapping directory="$PROJECT_DIR$" vcs="Git" />
</component> </component>
</project> </project>
\ No newline at end of file
This diff is collapsed.
File moved
package edu.caltech.cs2.lab03; package edu.caltech.cs2.lab02;
public class Searcher { public class Searcher {
public static boolean isSorted(int[] array) { public static boolean isSorted(int[] array) {
......
package edu.caltech.cs2.lab03; package edu.caltech.cs2.lab02;
import org.junit.jupiter.api.*; import org.junit.jupiter.api.*;
......
package edu.caltech.cs2.lab03; package edu.caltech.cs2.lab02;
import org.junit.jupiter.api.*; import org.junit.jupiter.api.*;
...@@ -47,7 +47,7 @@ public class BinarySearcherTests { ...@@ -47,7 +47,7 @@ public class BinarySearcherTests {
int trial = 0; int trial = 0;
while (trial < TRIALS) { while (trial < TRIALS) {
// Generate a random array of a random length // Generate a random array of a random length
int[] arr = generateRandomSortedArray(r, Math.abs(r.nextInt())); int[] arr = generateRandomSortedArray(r, Math.abs(r.nextInt() % 10000));
// We want to test both elements that are in the array and not in the array // We want to test both elements that are in the array and not in the array
// So, run through all the elements in the array, and for each one test both // So, run through all the elements in the array, and for each one test both
......
package edu.caltech.cs2.lab03; package edu.caltech.cs2.lab02;
import org.junit.jupiter.api.*; import org.junit.jupiter.api.*;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment