Skip to content

Commit

Permalink
post-merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdziallas committed Jan 2, 2024
1 parent b82d6b6 commit 54d2f3e
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 47 deletions.
28 changes: 0 additions & 28 deletions docs/labs/12-Hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ which means that no matter the size of the hashtable,
you would be able to count on the running time not increasing
(as long as the number of buckets is roughly equal to the
number of items and you have a full hash function yada-yada).
Here's a picture that may help you understand a `HashMap` more intuitively:\
![Hashmap](https://user-images.githubusercontent.com/61854184/223947825-eec214e9-22e6-4163-aef8-f370d9cda147.png)

## Why didn't they just call it a hashtable then?

Expand Down Expand Up @@ -126,32 +124,6 @@ String def = phobias.get("ergophobia");
// def now has the value "the abnormal fear of work"
```

In the case of say, a flashcard application,
the definition can be retrieved to return the key using a `getKey` function.
This method does require a for each loop to check all hashmap entries,
as well as the importing of the `Map.entry` java utility[^1].
The import allows us to use the `Entry` object
as well as the `map.entrySet` method in order to iterate each hashmap entry[^2].

```java
import java.util.Map.Entry;

...

String def = "the abnormal fear of work";
for(Entry<String, String> entry : phobias.entrySet()){
if(entry.getValue() == def){
String key = entry.getKey());
// key now has the value "ergophobia"
}
}
```

Resources:

[^1]: https://docs.oracle.com/javase/8/docs/api/java/util/Map.Entry.html
[^2]: https://tecadmin.net/java-hashmap-get-value-from-key/

If you try to get a phobia
that has not been introduced into this particular phobias map
like say this one
Expand Down
2 changes: 1 addition & 1 deletion docs/labs/13-Refact.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ which is here:
|:---:|:---:|
|```if(x != 4 || x != 5)```|```if(!(x == 4 && x == 5))```|

Based on [De Morgan's Law](https://www.cuemath.com/data/de-morgans-law/),
Based on De Morgan's Law,
the two statements here are the same,
yet one is more confusing to decipher.

Expand Down
5 changes: 2 additions & 3 deletions docs/labs/4-ACM.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ we would notice that we would have a picture like this.
There are a lot of other methods that `GOval`, `GLine`, `GRect`, and `GLabel` have, which
can be used to manipulate various attributes of each object beyond what we've done here.
Thankfully, the University of Stanford offers a lot of nicely compiled summaries for them.
If you want to see more specific documentation about these classes,
then you can visit the university pages for them here:
Thankfully, the documentation offers a lot of nicely compiled summaries for them.
If you want to see more specifics about these classes, you can visit the pages here:

- [`GOval`](https://cs.stanford.edu/people/eroberts/jtf/javadoc/student/acm/graphics/GOval.html)
- [`GLine`](https://cs.stanford.edu/people/eroberts/jtf/javadoc/complete/acm/graphics/GLine.html)
Expand Down
2 changes: 0 additions & 2 deletions docs/labs/6-Lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ void printList(ArrayList<String> list) {
}
```

For more in-dpeth information about the differences between Arrays and ArrayLists, [click here](https://www.w3schools.blog/difference-between-array-and-arraylist-in-java).

## **Completing this mini-lab**

To complete this lab,
Expand Down
1 change: 0 additions & 1 deletion docs/labs/61-UseCasePic.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ which is a part of **UML** which stands for *Unified Modeling Language*.

UML is good for getting a high-level understanding of a piece of software
and how different components interact with one another.
If you want to learn more about UML, you can visit the [official UML website](https://www.uml.org/).
While this can sound scary,
*"UM-What?!? You want to introduce us to ANOTHER language!?!"*,
don't fret.
Expand Down
7 changes: 1 addition & 6 deletions docs/labs/65-UMLClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,4 @@ together {
}
```

You can also use the keyword ```hidden``` as part of a relation to hide associations

### Extra Information

If you are interested in an extra-curricular software that might be useful for any other projects,
please [follow this tutorial about Lucid Charts](Supplemental/lucidchart.html)
You can also use the keyword ```hidden``` as part of a relation to hide associations.
7 changes: 1 addition & 6 deletions docs/labs/Supplemental/Installing_Jars_Into_Eclipse.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ In order to use the library, you have to manually add it.
5. Click the ***Add JARs...*** button
6. Locate the JAR file and double-click it
7. Click ***Apply and Close*** to enable the just added JAR file
8. Try to run your code

![20230309_003217](https://user-images.githubusercontent.com/72991689/223967170-8119d305-4c50-4b69-856d-7e1578db9335.gif)
Note: In the gif, there is an error in the console in Eclipse. This is due to how
I tried to run the program without the JAR file in my build path.
After enabling the JAR, I can run the program without any errors
8. Try to run your code

0 comments on commit 54d2f3e

Please sign in to comment.