cleanup
This commit is contained in:
5 files changed
+4
-12
No files matched your search
@@ -45,7 +45,6 @@ public class WordCounter {
|
||||
for (int i = 0; i < words.size() && !exists; i++) {
|
||||
if (words.get(i).getWord().equals(word)) {
|
||||
words.get(i).increment();
|
||||
// look I did not use a break statement...
|
||||
exists = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,15 +51,6 @@ public class Primes {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* isPrime.
|
||||
* @param n int number
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isPrime(int n) {
|
||||
return primes.get(n);
|
||||
}
|
||||
|
||||
/**
|
||||
* calculatePrimes.
|
||||
* @param n int number of primes
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package ca.bcit.comp1510.lab07;
|
||||
|
||||
/*
|
||||
* Version 1 (Buggy).
|
||||
*
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TestThis {
|
||||
|
||||
/**
|
||||
* Return the largest value in the parameters.
|
||||
* @param a List of integers (use ArrayList<Integer> in test)
|
||||
* @param a List of integers (use ArrayList of Integer in test)
|
||||
* @return largest of numbers in List
|
||||
*/
|
||||
public int largest(List<Integer> a) {
|
||||
|
||||
@@ -146,7 +146,8 @@ public record Date(int day, int month, int year) {
|
||||
System.out.println("Valid month: " + validMonth);
|
||||
System.out.println("# of Days: " + daysInMonth);
|
||||
System.out.println("Valid day: " + validDay);
|
||||
|
||||
|
||||
Date newDate = new Date(day, month, year);
|
||||
newDate.year();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user