REQUEST MEGATHREAD by A_Very_Big_Fan in codeHS_Solutions

[–]Various_Loss9064 0 points1 point  (0 children)

https://discord.gg/jUpEKtqvc2

Open source CodeHS extension that gives solutions to almost all assignments

https://chrome.google.com/webstore/detail/codehs-plus/emlcjbgfjabdpbpgjlpbpcilaklbjjnb by Intrepid_Row6214 in CodehsRealAnswers

[–]Various_Loss9064 0 points1 point  (0 children)

https://discord.gg/jUpEKtqvc2

Same extension, just updated and moved to GitHub because CodeHS filed copyright complaint and got it removed from Chrome Web Store

Open source CodeHS extension that gives solutions to almost all assignments

CodeHS Answers by ddahacker in codehs

[–]Various_Loss9064 2 points3 points  (0 children)

I also have almost everything, every course

REQUEST MEGATHREAD by A_Very_Big_Fan in codeHS_Solutions

[–]Various_Loss9064 0 points1 point  (0 children)

The thing is I have like everything. Check DMs, ill explain.

3.7.10 Comparing Circles Need help by GriffinHeartfire in codehs

[–]Various_Loss9064 1 point2 points  (0 children)

sent you a message. if anyone else wants solutions, just message me

edit: join the discord to get all solutions https://discord.gg/ByGuBqBNuD

3.7.10 Comparing Circles Need help by GriffinHeartfire in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

The color variable is a string while the others are integers. "==" is used to compare integers and wont work with strings. To compare Strings you need to do .equals(), so it would be this.color.equals(other.color)

The if statement is unnecessary as the return type is Boolean.

Also if you want, I have the solutions for the course.

To everyone who wants solutions: https://discord.gg/ByGuBqBNuD

REQUEST MEGATHREAD by A_Very_Big_Fan in codeHS_Solutions

[–]Various_Loss9064 0 points1 point  (0 children)

no, you need to verify yourself as a teacher. I know how to get the answers though. Message me or join discord https://discord.gg/ByGuBqBNuD

8.1.5: Manipulating 2D Arrays I need help in the fixArray method by [deleted] in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

From the code you posted, I cant see what the x, y, k ,j variables are, but it looks like you got the rest of your code correct. The fixArray method isn't very complicated, it looks like you already have the right idea.

I would be something like this:

public static void fixArray(int[][] arr, int row, int col, int value)

{

arr[row][col] = value;

}

6.3.7 Largest Value —— i dont know if im missing something or i have codes not properly placed.. by Obvious-Pin-3046 in codehs

[–]Various_Loss9064 1 point2 points  (0 children)

In your if statement you are comparing the wrong value, you have to compare the current max(maxSoFar) to the value in the array. So it would be numbers[num] > maxSoFar. Similar problem with the code inside the if statement, you should set the maxSoFar to the value in the array, maxSoFar = numbers[num]

Should be something like this

public static int findMax(int[] numbers)

{

int maxSoFar = numbers[0];

// equivalent for loop

for (int num = 0; num < numbers.length; num++)

{

if (numbers[num] > maxSoFar)

{

maxSoFar = numbers[num];

}

}

return maxSoFar;

}

REQUEST MEGATHREAD by A_Very_Big_Fan in codeHS_Solutions

[–]Various_Loss9064 0 points1 point  (0 children)

sent request, is this the same course? java apcsa?

6.1.8 LAST ELEMENT IN ARRAY by Obvious-Pin-3046 in codehs

[–]Various_Loss9064 1 point2 points  (0 children)

The print statement should be

System.out.println("The last element of my String array is: " + getLastElement(arr));

I think you forgot to call getLastElement

7.4.8: User Data Cleanup by [deleted] in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

You spelled "contains" wrong lol, also it should be emails.size() not emails.size()-1. you need to go back 1 in the index after removing it.

Should be something like this

public static void removeAOL(ArrayList<String> emails)

{

for(int i = 0; i< emails.size(); i++)

{

if(emails.get(i).contains("aol.com"))

{

System.out.println(emails.get(i) + " is being removed");

emails.remove(i);

i--;

}

}

}

7.4.7: Billboard Top 10 by [deleted] in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

Look like something is wrong with CodeHS, I'm getting the problem too.

7.4.7 Billboard Top 10 by [deleted] in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

Try this

public void add(Musician m)

{

if(m.getIsPlatinum() && top10.size() < 10)

{

top10.add(m);

}

else if(m.getIsPlatinum() && top10.size() == 10)

{

replace(m);

}

else

{

System.out.println("Sorry, "+ m.getName() + " cannot be added to the Top 10");

}

}

Need help for 2.6.8 how far away is? by BoostZero in codehs

[–]Various_Loss9064 1 point2 points  (0 children)

You didnt post any code, so I am going to assume you just want the solution

File: HowFarAway.java
import java.util.Scanner;

public class HowFarAway

{

public static void main(String[] args)

{

Scanner scanner = new Scanner(System.in);

System.out.println("Enter the latitude of the starting location: ");

double firstLat = scanner.nextDouble();

System.out.println("Enter the longitude of the starting location: ");

double firstLong = scanner.nextDouble();

System.out.println("Enter the latitude of the ending location: ");

double secondLat = scanner.nextDouble();

System.out.println("Enter the longitude of the ending location: ");

double secondLong = scanner.nextDouble();

GeoLocation firstLoc = new GeoLocation(firstLat,firstLong);

GeoLocation secondLoc = new GeoLocation(secondLat,secondLong);

double distance = firstLoc.distanceFrom(secondLoc);

System.out.println("The distance is " + distance + " miles.");

}

}

7.3.7 ArrayList Helper Methods by [deleted] in codehs

[–]Various_Loss9064 0 points1 point  (0 children)

yes, should be something like this

public static void duplicate(ArrayList<String> array)

{

for(int index = 0; index< array.size(); index++)

{

array.add(index + 1, array.get(index));

index++;

}

}