CodeGym /Courses /Java Collections /Big task: Create a URL shortener

Big task: Create a URL shortener

Java Collections
Level 6, Lesson 15
Available

"Hi, Amigo!"

"Hello, Captain Squirrels, sir!"

"You have a new secret mission today. In order to encrypt correspondence between our units, you need to implement your own URL shortener service."

"Cool! Uhh, I mean, I am ready, sir. But why do we need this?"

"What do you mean why? Soldier, we're surrounded by enemies. We need to protect our lines of communication. Proceed to the task."

"Yes, sir! Implement a URL shortener service."

"Go to our secret agent IntelliJ IDEA. You'll receive all of the instructions there."

"It shall be done, Captain!"

"Proceed."

Big task: Create a URL shortener - 1
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (part 1)
Shortener (part 1)
9
Task
Java Collections, level 6, lesson 15
Locked
Shortener (part 2)
Shortener (part 2)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (part 3)
Shortener (part 3)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (4)
Shortener (4)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (5)
Shortener (5)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (6)
Shortener (6)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (7)
Shortener (7)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (8)
Shortener (8)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (9)
Shortener (9)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (10)
Shortener (10)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (11)
Shortener (11)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (12)
Shortener (12)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (13)
Shortener (13)
32
Task
Java Collections, level 6, lesson 15
Locked
Shortener (14)
Shortener (14)
16
Task
Java Collections, level 6, lesson 15
Locked
Shortener (15)
Shortener (15)
9
Task
Java Collections, level 6, lesson 15
Locked
Shortener (16)
Shortener (16)
Comments (15)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Boat Level 40, Germany, Germany
15 May 2023
For part 3, the Requirements state that the field should be named LastID but this won't verify, it has to be LastId as the main Conditions state. Just some confusing inconsistency.
Alex Buyanov Level 47, Netherlands
14 October 2022
For part 14 (with JUnit tests), your support method testStrategy() MUST be public, or verification will fail. Though in the real world, I would have personally prefer to make all "helper" methods private... Also, for JUnit itself it does not matter.
Lisa Level 41
25 January 2022
part 8, here it starts that I say: boahh... this is really insane. I mentioned it before that I implemented already a lot of data structures including my own hash set. So I know how this is working (should work... in theory). However without any hint what the to implement methods should do this is haaaaarddd. Reaaaaalllly haaaard. Have just passed part 8 and now feel the need to share this. hihihi, now I've read part 9 requirements, getting interesting, too ohh, if your're German, than this is excellent study material from the HdM Stuttgart. Take a timeout for approx 3-4 weeks, watch the vids and code all the data structures he's talking of. Then you're prepared for this task. lil update: 9 and 10 are OK if you managed to code 8 and if you're fit with Files and Path classes (nio).
TheLordJackMC Level 39, Princeton, idk somewhere
12 August 2021
"almost impossible" they said
Andrei Level 1
23 July 2021
Not gonna lie, from about Task 9-10 I started copy pasting the solution... No background information, no prior explanations, just 'google' and expect me to solve only difficult tasks on my own. Sure buddy.
MaGaby2280 Level 41, Guatemala City, Guatemala
6 July 2021
Read more on Wikipedia ... lol Don´t give up... al repositories needed are in Maven
BlueJavaBanana Level 37
9 April 2021
Norbert Level 41, Kielce, Poland
28 November 2022
I think the easier way is open Project Structure, then choose libraries, then click in the upper left corner '+' click from maven, write there guava and choose it, click OK.
25 June 2020
This task is madness )
BlueJavaBanana Level 37
8 April 2021
Yep another CodeGym classic. Here is a simple lesson on lists that a child could understand. Now read through the 3000 lines of professional Java source code for the HashMap and make your own versions! Need help? Type in "HashMap" in google. I do get frustrated when we are given really simple lessons followed by tasks that are extremely difficult.
Tom Level 41, San Jose, Sweden
7 June 2021
But definitily we learn a lot!
yz Level 37, Jakarta, Indonesia
16 April 2020
for 7th task: Create Entry class; dont create OurHashMap.... class and inside the class make Entry class ...
BlueJavaBanana Level 37
7 April 2021
Helpful tip! The entry class should not be nested!
Senned Level 41, Azov, Russia
23 December 2019
For 8th task you need realisation HashMap in JDK 7 - U can find it here: http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/classes/java/util/HashMap.java
Senned Level 41, Azov, Russia
24 December 2019
Also https://www.baeldung.com/guava-bimap(task 12)