This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyCircle { | |
| //Instance Variables | |
| int radius = 1; | |
| int x; | |
| int y; | |
| MyPoint center; | |
| double area = null; | |
| public MyCircle(int xValue, int yValue, int radius) { | |
| x = xValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Majority { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| int positions = input.nextInt(); | |
| int[] myarray; | |
| int[] newarray = new int[positions]; | |
| for (int i=0; i < newarray.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class FarthestPair { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| int positions = input.nextInt(); | |
| int[] myarray; | |
| int[] newarray = new int[positions]; | |
| for (int i=0; i < newarray.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class ClosestPair { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| int positions = input.nextInt(); | |
| int[] myarray; | |
| int[] newarray = new int[positions]; | |
| for (int i=0; i < newarray.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class IntegerSort { | |
| public static void main(String [] args) { | |
| Scanner input = new Scanner(System.in); | |
| integerSort(); | |
| } | |
| public static void integerSort() { | |
| Scanner input = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class ModifiedBinarySearch { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| BinarySearch(); | |
| } | |
| public static int BinarySearch(int[] myarray, int key) { | |
| int mid; | |
| int low = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class dedup { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| dedup(); | |
| } | |
| public static void dedup() { | |
| Scanner input = new Scanner(System.in); | |
| System.out.println("Please introduce the number of strings you wish to sort:"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| import java.util.Scanner; | |
| import java.util.Arrays; | |
| public class LandBSearch { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); | |
| Random randomGenerator = new Random(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| import java.util.*; | |
| public class ReplaceNumber { | |
| public static void main(String [] args) { | |
| Scanner input = new Scanner(System.in); | |
| Random randomGenerator = new Random(); | |
| System.out.println("Please introduce the rows and columns you want to fill"); | |
| int x = input.nextInt(); | |
| int y = input.nextInt(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class RainFall { | |
| public static void main(String [] args) { | |
| Scanner input = new Scanner(System.in); | |
| Double[][] rain = InputData(); | |
| HighestRainFall(rain); | |
| TotalRainfall(rain); | |
| TotalRainfallWeek(rain); | |
| Days(rain); |