This commit is contained in:
2026-05-07 21:17:05 +03:30
parent 35224d0621
commit c9f7da2a71
50 changed files with 0 additions and 2804 deletions
@@ -1,44 +0,0 @@
name: Java CI with Gradle
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
- name: Make Gradle Wrapper executable
run: chmod +x ./gradlew
- name: Build with Gradle Wrapper
run: ./gradlew build
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
@@ -1,2 +0,0 @@
#Wed Feb 28 17:19:38 GMT+03:30 2024
gradle.version=7.4
@@ -1 +0,0 @@
HTML-Parser
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
</component>
</project>
@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
@@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="7684d9fd-9749-4ce8-9ca1-4a1896f87cbc" name="Changes" comment="added the the Game class and its html, some example for test added" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Class" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2czxOLfEywYECmtdYeXccYebHio" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
<option name="sortByType" value="true" />
<option name="sortKey" value="BY_TYPE" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/Asus/Desktop/placeHolder/Second-Assignment-CineScribe&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot;
}
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="E:\homework\semester 4\TA\HTML-Parser\src\main\java" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\Lenovo\OneDrive\Desktop\AP\html pparser\New folder\Fourth-Assignment-HTML-Parser\src\Resources" />
</key>
</component>
<component name="RunManager">
<configuration name="ParserTest.testSortByName" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":test" />
<option value="--tests" />
<option value="&quot;ParserTest.testSortByName&quot;" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Gradle.ParserTest.testSortByName" />
</list>
</recent_temporary>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a605dfff-ee43-4feb-8a32-11c0aa0402f8" name="Changes" comment="" />
<created>1709128175583</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1709128175583</updated>
<workItem from="1709128177461" duration="3475000" />
<workItem from="1709131890398" duration="40000" />
<workItem from="1709132777776" duration="1878000" />
<workItem from="1709147208766" duration="626000" />
<workItem from="1709754207930" duration="532000" />
<workItem from="1743338234636" duration="2449000" />
</task>
<task id="LOCAL-00001" summary="added the the Game class and its html, some example for test added">
<created>1743341137706</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1743341137706</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="added the the Game class and its html, some example for test added" />
<option name="LAST_COMMIT_MESSAGE" value="added the the Game class and its html, some example for test added" />
</component>
</project>
@@ -1,100 +0,0 @@
1. Game: Advance Wars, Rating: 4.7, Price: 89
2. Game: Baldur's Gate II: Shadows of Amn, Rating: 4.9, Price: 91
3. Game: Blast Corps, Rating: 3.7, Price: 83
4. Game: Bloodborne, Rating: 4.8, Price: 88
5. Game: CS student simulator, Rating: 1.0, Price: 85
6. Game: Call of Duty: Advanced Warfare - Ascendance, Rating: 4.0, Price: 67
7. Game: Call of Duty: Advanced Warfare - Reckoning, Rating: 3.5, Price: 57
8. Game: Call of Duty: Advanced Warfare - Supremacy, Rating: 4.4, Price: 64
9. Game: Call of Duty: Black Ops II, Rating: 3.8, Price: 50
10. Game: Call of Duty: Black Ops III, Rating: 3.7, Price: 50
11. Game: Call of Duty: Infinite Warfare - Sabotage, Rating: 4.3, Price: 18
12. Game: Call of Duty: Modern Warfare Remastered, Rating: 3.9, Price: 71
13. Game: Company of Heroes, Rating: 4.7, Price: 87
14. Game: Counter-Strike: Source, Rating: 4.4, Price: 89
15. Game: Dead Space 2, Rating: 4.4, Price: 86
16. Game: Devil May Cry 5, Rating: 4.7, Price: 91
17. Game: Diablo, Rating: 4.8, Price: 87
18. Game: Dishonored 2, Rating: 4.3, Price: 80
19. Game: Divinity: Original Sin Enhanced Edition, Rating: 4.6, Price: 80
20. Game: Divinity: Original Sin II, Rating: 4.7, Price: 88
21. Game: Doom 3, Rating: 4.1, Price: 81
22. Game: Eternal Darkness: Sanity's Requiem, Rating: 4.6, Price: 87
23. Game: Far Cry 3, Rating: 4.9, Price: 80
24. Game: Far Cry 4, Rating: 4.8, Price: 91
25. Game: Final Fantasy XII, Rating: 4.7, Price: 76
26. Game: Flipnote Studio, Rating: 4.2, Price: 75
27. Game: Forza Motorsport, Rating: 4.6, Price: 76
28. Game: Forza Motorsport 3, Rating: 4.7, Price: 81
29. Game: Geometry Wars: Retro Evolved 2, Rating: 3.8, Price: 83
30. Game: God of War II, Rating: 4.9, Price: 90
31. Game: God of War III, Rating: 4.9, Price: 88
32. Game: Gran Turismo 2, Rating: 4.6, Price: 90
33. Game: Gran Turismo 3: A-Spec, Rating: 4.5, Price: 84
34. Game: Grand Theft Auto V, Rating: 3.6, Price: 36
35. Game: Guacamelee! Gold Edition, Rating: 4.3, Price: 75
36. Game: Half-Life 2: Episode Two, Rating: 4.2, Price: 92
37. Game: Half-Life: Alyx, Rating: 4.8, Price: 92
38. Game: Halo: Combat Evolved, Rating: 4.6, Price: 87
39. Game: Hollow Knight, Rating: 4.3, Price: 90
40. Game: Injustice 2: Legendary Edition, Rating: 4.0, Price: 77
41. Game: JSRF: Jet Set Radio Future, Rating: 4.1, Price: 83
42. Game: Mario Kart 8 DLC Pack 2, Rating: 3.9, Price: 89
43. Game: Metal Gear Solid 2: Sons of Liberty, Rating: 4.7, Price: 88
44. Game: Metal Gear Solid 3: Subsistence, Rating: 4.7, Price: 91
45. Game: Metal Gear Solid 4: Guns of the Patriots, Rating: 4.5, Price: 88
46. Game: Metroid Prime, Rating: 4.5, Price: 89
47. Game: Minecraft: Xbox One Edition, Rating: 4.4, Price: 73
48. Game: NFL 2K2, Rating: 3.6, Price: 71
49. Game: NHL 2002, Rating: 4.0, Price: 83
50. Game: Paper Mario, Rating: 4.5, Price: 90
51. Game: Persona 5 Royal, Rating: 4.7, Price: 84
52. Game: Pikmin 2, Rating: 4.0, Price: 90
53. Game: Portal: Still Alive, Rating: 3.9, Price: 86
54. Game: Project Gotham Racing 3, Rating: 4.2, Price: 79
55. Game: Red Faction, Rating: 3.9, Price: 79
56. Game: Resident Evil (2002), Rating: 4.2, Price: 92
57. Game: Resident Evil 4: Wii Edition, Rating: 3.9, Price: 89
58. Game: Resident Evil Code: Veronica, Rating: 4.6, Price: 85
59. Game: Rome: Total War, Rating: 4.9, Price: 90
60. Game: Shin Megami Tensei: Persona 4, Rating: 4.1, Price: 77
61. Game: Sid Meier's Civilization III, Rating: 4.0, Price: 84
62. Game: Sid Meier's Civilization IV, Rating: 4.3, Price: 82
63. Game: Sid Meier's Civilization V, Rating: 4.3, Price: 80
64. Game: Sid Meier's Gettysburg!, Rating: 4.4, Price: 74
65. Game: Silent Hunter III, Rating: 3.9, Price: 78
66. Game: Slay the Spire, Rating: 3.5, Price: 69
67. Game: Super Mario 3D Land, Rating: 4.1, Price: 84
68. Game: Super Mario 3D World, Rating: 4.7, Price: 89
69. Game: Super Mario Galaxy, Rating: 4.6, Price: 91
70. Game: Super Mario Odyssey, Rating: 4.9, Price: 89
71. Game: Super Mario Sunshine, Rating: 4.5, Price: 84
72. Game: Super Mario World: Super Mario Advance 2, Rating: 4.6, Price: 90
73. Game: Super Smash Bros. Melee, Rating: 4.8, Price: 91
74. Game: System Shock 2, Rating: 4.6, Price: 91
75. Game: Team Fortress 2, Rating: 4.8, Price: 90
76. Game: Tekken 3, Rating: 4.4, Price: 91
77. Game: Tekken: Dark Resurrection, Rating: 3.8, Price: 86
78. Game: The Chronicles of Riddick: Escape From Butcher Bay - Developer's Cut, Rating: 3.8, Price: 86
79. Game: The House in Fata Morgana, Rating: 4.3, Price: 83
80. Game: The Last of Us, Rating: 4.9, Price: 92
81. Game: The Last of Us Part II, Rating: 4.9, Price: 57
82. Game: The Legend of Zelda Collector's Edition, Rating: 4.7, Price: 89
83. Game: The Legend of Zelda: A Link to the Past, Rating: 4.8, Price: 90
84. Game: The Legend of Zelda: Majora's Mask, Rating: 4.6, Price: 91
85. Game: The Legend of Zelda: The Wind Waker, Rating: 4.8, Price: 90
86. Game: The Stanley Parable, Rating: 4.0, Price: 80
87. Game: The World Ends with You, Rating: 4.5, Price: 87
88. Game: Titanfall, Rating: 4.2, Price: 61
89. Game: Tom Clancy's Rainbow Six Siege, Rating: 4.6, Price: 88
90. Game: Tony Hawk's Pro Skater, Rating: 4.8, Price: 88
91. Game: Uncharted 2: Among Thieves, Rating: 4.7, Price: 88
92. Game: Uncharted 3: Drake's Deception, Rating: 4.7, Price: 84
93. Game: Unreal Tournament 2004, Rating: 4.6, Price: 88
94. Game: Vagrant Story, Rating: 4.5, Price: 90
95. Game: Virtua Fighter 4, Rating: 4.4, Price: 81
96. Game: WWF SmackDown! 2: Know Your Role, Rating: 4.2, Price: 84
97. Game: Warcraft III: Reign of Chaos, Rating: 4.9, Price: 92
98. Game: Watch Dogs 2, Rating: 4.1, Price: 81
99. Game: Wipeout XL, Rating: 4.3, Price: 86
100. Game: World of Warcraft, Rating: 4.8, Price: 74
@@ -1,100 +0,0 @@
1. Game: The Last of Us, Rating: 4.9, Price: 92
2. Game: Half-Life: Alyx, Rating: 4.8, Price: 92
3. Game: Warcraft III: Reign of Chaos, Rating: 4.9, Price: 92
4. Game: Half-Life 2: Episode Two, Rating: 4.2, Price: 92
5. Game: Resident Evil (2002), Rating: 4.2, Price: 92
6. Game: Far Cry 4, Rating: 4.8, Price: 91
7. Game: Super Mario Galaxy, Rating: 4.6, Price: 91
8. Game: Devil May Cry 5, Rating: 4.7, Price: 91
9. Game: Tekken 3, Rating: 4.4, Price: 91
10. Game: Baldur's Gate II: Shadows of Amn, Rating: 4.9, Price: 91
11. Game: The Legend of Zelda: Majora's Mask, Rating: 4.6, Price: 91
12. Game: Metal Gear Solid 3: Subsistence, Rating: 4.7, Price: 91
13. Game: System Shock 2, Rating: 4.6, Price: 91
14. Game: Super Smash Bros. Melee, Rating: 4.8, Price: 91
15. Game: The Legend of Zelda: The Wind Waker, Rating: 4.8, Price: 90
16. Game: The Legend of Zelda: A Link to the Past, Rating: 4.8, Price: 90
17. Game: Gran Turismo 2, Rating: 4.6, Price: 90
18. Game: God of War II, Rating: 4.9, Price: 90
19. Game: Paper Mario, Rating: 4.5, Price: 90
20. Game: Vagrant Story, Rating: 4.5, Price: 90
21. Game: Team Fortress 2, Rating: 4.8, Price: 90
22. Game: Super Mario World: Super Mario Advance 2, Rating: 4.6, Price: 90
23. Game: Rome: Total War, Rating: 4.9, Price: 90
24. Game: Hollow Knight, Rating: 4.3, Price: 90
25. Game: Pikmin 2, Rating: 4.0, Price: 90
26. Game: Metroid Prime, Rating: 4.5, Price: 89
27. Game: Super Mario Odyssey, Rating: 4.9, Price: 89
28. Game: The Legend of Zelda Collector's Edition, Rating: 4.7, Price: 89
29. Game: Super Mario 3D World, Rating: 4.7, Price: 89
30. Game: Advance Wars, Rating: 4.7, Price: 89
31. Game: Mario Kart 8 DLC Pack 2, Rating: 3.9, Price: 89
32. Game: Resident Evil 4: Wii Edition, Rating: 3.9, Price: 89
33. Game: Counter-Strike: Source, Rating: 4.4, Price: 89
34. Game: Uncharted 2: Among Thieves, Rating: 4.7, Price: 88
35. Game: Metal Gear Solid 2: Sons of Liberty, Rating: 4.7, Price: 88
36. Game: Metal Gear Solid 4: Guns of the Patriots, Rating: 4.5, Price: 88
37. Game: Tom Clancy's Rainbow Six Siege, Rating: 4.6, Price: 88
38. Game: Divinity: Original Sin II, Rating: 4.7, Price: 88
39. Game: Unreal Tournament 2004, Rating: 4.6, Price: 88
40. Game: God of War III, Rating: 4.9, Price: 88
41. Game: Bloodborne, Rating: 4.8, Price: 88
42. Game: Tony Hawk's Pro Skater, Rating: 4.8, Price: 88
43. Game: Halo: Combat Evolved, Rating: 4.6, Price: 87
44. Game: Diablo, Rating: 4.8, Price: 87
45. Game: Company of Heroes, Rating: 4.7, Price: 87
46. Game: Eternal Darkness: Sanity's Requiem, Rating: 4.6, Price: 87
47. Game: The World Ends with You, Rating: 4.5, Price: 87
48. Game: Wipeout XL, Rating: 4.3, Price: 86
49. Game: Portal: Still Alive, Rating: 3.9, Price: 86
50. Game: The Chronicles of Riddick: Escape From Butcher Bay - Developer's Cut, Rating: 3.8, Price: 86
51. Game: Dead Space 2, Rating: 4.4, Price: 86
52. Game: Tekken: Dark Resurrection, Rating: 3.8, Price: 86
53. Game: Resident Evil Code: Veronica, Rating: 4.6, Price: 85
54. Game: CS student simulator, Rating: 1.0, Price: 85
55. Game: Gran Turismo 3: A-Spec, Rating: 4.5, Price: 84
56. Game: Persona 5 Royal, Rating: 4.7, Price: 84
57. Game: Uncharted 3: Drake's Deception, Rating: 4.7, Price: 84
58. Game: Super Mario Sunshine, Rating: 4.5, Price: 84
59. Game: Sid Meier's Civilization III, Rating: 4.0, Price: 84
60. Game: WWF SmackDown! 2: Know Your Role, Rating: 4.2, Price: 84
61. Game: Super Mario 3D Land, Rating: 4.1, Price: 84
62. Game: The House in Fata Morgana, Rating: 4.3, Price: 83
63. Game: NHL 2002, Rating: 4.0, Price: 83
64. Game: Blast Corps, Rating: 3.7, Price: 83
65. Game: Geometry Wars: Retro Evolved 2, Rating: 3.8, Price: 83
66. Game: JSRF: Jet Set Radio Future, Rating: 4.1, Price: 83
67. Game: Sid Meier's Civilization IV, Rating: 4.3, Price: 82
68. Game: Virtua Fighter 4, Rating: 4.4, Price: 81
69. Game: Forza Motorsport 3, Rating: 4.7, Price: 81
70. Game: Watch Dogs 2, Rating: 4.1, Price: 81
71. Game: Doom 3, Rating: 4.1, Price: 81
72. Game: Far Cry 3, Rating: 4.9, Price: 80
73. Game: Sid Meier's Civilization V, Rating: 4.3, Price: 80
74. Game: Dishonored 2, Rating: 4.3, Price: 80
75. Game: Divinity: Original Sin Enhanced Edition, Rating: 4.6, Price: 80
76. Game: The Stanley Parable, Rating: 4.0, Price: 80
77. Game: Project Gotham Racing 3, Rating: 4.2, Price: 79
78. Game: Red Faction, Rating: 3.9, Price: 79
79. Game: Silent Hunter III, Rating: 3.9, Price: 78
80. Game: Shin Megami Tensei: Persona 4, Rating: 4.1, Price: 77
81. Game: Injustice 2: Legendary Edition, Rating: 4.0, Price: 77
82. Game: Forza Motorsport, Rating: 4.6, Price: 76
83. Game: Final Fantasy XII, Rating: 4.7, Price: 76
84. Game: Flipnote Studio, Rating: 4.2, Price: 75
85. Game: Guacamelee! Gold Edition, Rating: 4.3, Price: 75
86. Game: World of Warcraft, Rating: 4.8, Price: 74
87. Game: Sid Meier's Gettysburg!, Rating: 4.4, Price: 74
88. Game: Minecraft: Xbox One Edition, Rating: 4.4, Price: 73
89. Game: NFL 2K2, Rating: 3.6, Price: 71
90. Game: Call of Duty: Modern Warfare Remastered, Rating: 3.9, Price: 71
91. Game: Slay the Spire, Rating: 3.5, Price: 69
92. Game: Call of Duty: Advanced Warfare - Ascendance, Rating: 4.0, Price: 67
93. Game: Call of Duty: Advanced Warfare - Supremacy, Rating: 4.4, Price: 64
94. Game: Titanfall, Rating: 4.2, Price: 61
95. Game: The Last of Us Part II, Rating: 4.9, Price: 57
96. Game: Call of Duty: Advanced Warfare - Reckoning, Rating: 3.5, Price: 57
97. Game: Call of Duty: Black Ops III, Rating: 3.7, Price: 50
98. Game: Call of Duty: Black Ops II, Rating: 3.8, Price: 50
99. Game: Grand Theft Auto V, Rating: 3.6, Price: 36
100. Game: Call of Duty: Infinite Warfare - Sabotage, Rating: 4.3, Price: 18
@@ -1,100 +0,0 @@
1. Game: Super Mario Odyssey, Rating: 4.9, Price: 89
2. Game: Baldur's Gate II: Shadows of Amn, Rating: 4.9, Price: 91
3. Game: The Last of Us, Rating: 4.9, Price: 92
4. Game: Far Cry 3, Rating: 4.9, Price: 80
5. Game: The Last of Us Part II, Rating: 4.9, Price: 57
6. Game: God of War II, Rating: 4.9, Price: 90
7. Game: God of War III, Rating: 4.9, Price: 88
8. Game: Warcraft III: Reign of Chaos, Rating: 4.9, Price: 92
9. Game: Rome: Total War, Rating: 4.9, Price: 90
10. Game: Far Cry 4, Rating: 4.8, Price: 91
11. Game: The Legend of Zelda: The Wind Waker, Rating: 4.8, Price: 90
12. Game: The Legend of Zelda: A Link to the Past, Rating: 4.8, Price: 90
13. Game: Diablo, Rating: 4.8, Price: 87
14. Game: Half-Life: Alyx, Rating: 4.8, Price: 92
15. Game: World of Warcraft, Rating: 4.8, Price: 74
16. Game: Bloodborne, Rating: 4.8, Price: 88
17. Game: Team Fortress 2, Rating: 4.8, Price: 90
18. Game: Super Smash Bros. Melee, Rating: 4.8, Price: 91
19. Game: Tony Hawk's Pro Skater, Rating: 4.8, Price: 88
20. Game: Devil May Cry 5, Rating: 4.7, Price: 91
21. Game: Uncharted 2: Among Thieves, Rating: 4.7, Price: 88
22. Game: Metal Gear Solid 2: Sons of Liberty, Rating: 4.7, Price: 88
23. Game: The Legend of Zelda Collector's Edition, Rating: 4.7, Price: 89
24. Game: Persona 5 Royal, Rating: 4.7, Price: 84
25. Game: Metal Gear Solid 3: Subsistence, Rating: 4.7, Price: 91
26. Game: Company of Heroes, Rating: 4.7, Price: 87
27. Game: Divinity: Original Sin II, Rating: 4.7, Price: 88
28. Game: Super Mario 3D World, Rating: 4.7, Price: 89
29. Game: Uncharted 3: Drake's Deception, Rating: 4.7, Price: 84
30. Game: Advance Wars, Rating: 4.7, Price: 89
31. Game: Final Fantasy XII, Rating: 4.7, Price: 76
32. Game: Forza Motorsport 3, Rating: 4.7, Price: 81
33. Game: Super Mario Galaxy, Rating: 4.6, Price: 91
34. Game: Halo: Combat Evolved, Rating: 4.6, Price: 87
35. Game: The Legend of Zelda: Majora's Mask, Rating: 4.6, Price: 91
36. Game: Resident Evil Code: Veronica, Rating: 4.6, Price: 85
37. Game: Tom Clancy's Rainbow Six Siege, Rating: 4.6, Price: 88
38. Game: Gran Turismo 2, Rating: 4.6, Price: 90
39. Game: Unreal Tournament 2004, Rating: 4.6, Price: 88
40. Game: Eternal Darkness: Sanity's Requiem, Rating: 4.6, Price: 87
41. Game: Forza Motorsport, Rating: 4.6, Price: 76
42. Game: System Shock 2, Rating: 4.6, Price: 91
43. Game: Super Mario World: Super Mario Advance 2, Rating: 4.6, Price: 90
44. Game: Divinity: Original Sin Enhanced Edition, Rating: 4.6, Price: 80
45. Game: Metroid Prime, Rating: 4.5, Price: 89
46. Game: Gran Turismo 3: A-Spec, Rating: 4.5, Price: 84
47. Game: Metal Gear Solid 4: Guns of the Patriots, Rating: 4.5, Price: 88
48. Game: Paper Mario, Rating: 4.5, Price: 90
49. Game: Vagrant Story, Rating: 4.5, Price: 90
50. Game: Super Mario Sunshine, Rating: 4.5, Price: 84
51. Game: The World Ends with You, Rating: 4.5, Price: 87
52. Game: Tekken 3, Rating: 4.4, Price: 91
53. Game: Virtua Fighter 4, Rating: 4.4, Price: 81
54. Game: Sid Meier's Gettysburg!, Rating: 4.4, Price: 74
55. Game: Dead Space 2, Rating: 4.4, Price: 86
56. Game: Minecraft: Xbox One Edition, Rating: 4.4, Price: 73
57. Game: Call of Duty: Advanced Warfare - Supremacy, Rating: 4.4, Price: 64
58. Game: Counter-Strike: Source, Rating: 4.4, Price: 89
59. Game: The House in Fata Morgana, Rating: 4.3, Price: 83
60. Game: Sid Meier's Civilization IV, Rating: 4.3, Price: 82
61. Game: Wipeout XL, Rating: 4.3, Price: 86
62. Game: Hollow Knight, Rating: 4.3, Price: 90
63. Game: Sid Meier's Civilization V, Rating: 4.3, Price: 80
64. Game: Dishonored 2, Rating: 4.3, Price: 80
65. Game: Call of Duty: Infinite Warfare - Sabotage, Rating: 4.3, Price: 18
66. Game: Guacamelee! Gold Edition, Rating: 4.3, Price: 75
67. Game: Flipnote Studio, Rating: 4.2, Price: 75
68. Game: Half-Life 2: Episode Two, Rating: 4.2, Price: 92
69. Game: WWF SmackDown! 2: Know Your Role, Rating: 4.2, Price: 84
70. Game: Project Gotham Racing 3, Rating: 4.2, Price: 79
71. Game: Titanfall, Rating: 4.2, Price: 61
72. Game: Resident Evil (2002), Rating: 4.2, Price: 92
73. Game: Shin Megami Tensei: Persona 4, Rating: 4.1, Price: 77
74. Game: Super Mario 3D Land, Rating: 4.1, Price: 84
75. Game: JSRF: Jet Set Radio Future, Rating: 4.1, Price: 83
76. Game: Watch Dogs 2, Rating: 4.1, Price: 81
77. Game: Doom 3, Rating: 4.1, Price: 81
78. Game: NHL 2002, Rating: 4.0, Price: 83
79. Game: Sid Meier's Civilization III, Rating: 4.0, Price: 84
80. Game: Pikmin 2, Rating: 4.0, Price: 90
81. Game: Injustice 2: Legendary Edition, Rating: 4.0, Price: 77
82. Game: Call of Duty: Advanced Warfare - Ascendance, Rating: 4.0, Price: 67
83. Game: The Stanley Parable, Rating: 4.0, Price: 80
84. Game: Portal: Still Alive, Rating: 3.9, Price: 86
85. Game: Silent Hunter III, Rating: 3.9, Price: 78
86. Game: Mario Kart 8 DLC Pack 2, Rating: 3.9, Price: 89
87. Game: Red Faction, Rating: 3.9, Price: 79
88. Game: Call of Duty: Modern Warfare Remastered, Rating: 3.9, Price: 71
89. Game: Resident Evil 4: Wii Edition, Rating: 3.9, Price: 89
90. Game: The Chronicles of Riddick: Escape From Butcher Bay - Developer's Cut, Rating: 3.8, Price: 86
91. Game: Geometry Wars: Retro Evolved 2, Rating: 3.8, Price: 83
92. Game: Call of Duty: Black Ops II, Rating: 3.8, Price: 50
93. Game: Tekken: Dark Resurrection, Rating: 3.8, Price: 86
94. Game: Blast Corps, Rating: 3.7, Price: 83
95. Game: Call of Duty: Black Ops III, Rating: 3.7, Price: 50
96. Game: NFL 2K2, Rating: 3.6, Price: 71
97. Game: Grand Theft Auto V, Rating: 3.6, Price: 36
98. Game: Call of Duty: Advanced Warfare - Reckoning, Rating: 3.5, Price: 57
99. Game: Slay the Spire, Rating: 3.5, Price: 69
100. Game: CS student simulator, Rating: 1.0, Price: 85
@@ -1,140 +0,0 @@
# Fourth Assignment: Steam Scraper 🎮
## Introduction
This project delves into the practical application of HTML parsing techniques using Java and the JSoup library. The objective is to extract and manipulate data from a structured HTML document containing information about various video-games. Key tasks include parsing the document, creating Java objects to represent the data, sorting the information based on different criteria, and presenting the results effectively.
## Why Learn Web Scraping? 📊
Mastering web scraping empowers individuals and businesses to glean valuable insights, automate tasks, and make informed decisions based on real-time data.
- In e-commerce, web scraping aids in monitoring competitors' prices, tracking product availability, and gathering customer reviews. In finance, it facilitates trend analysis, investment decisions, and risk assessment.
- Research, academia, journalism, and media professionals leverage web scraping for data collection, trend tracking, sentiment analysis, and investigative reporting.
By mastering web scraping, professionals can extract data efficiently, outperform competitors, and drive data-informed success in diverse industries.
## Prerequisites ✅
Before diving into this project, make sure you have the following tools and knowledge:
### Tools Needed:
- **Java 17 or higher** : Download the latest version from [Oracle's Java website](https://www.oracle.com/java/technologies/downloads/).
- **Git** : Install Git, a powerful version control system, from [Git's official website](https://git-scm.com/downloads).
- **Gradle** : Utilize Gradle (recommended version 7.6 or newer) as the build tool. You can find installation instructions [here](https://gradle.org/install/).
### Knowledge Required:
In addition to the tools mentioned above, familiarity with the following topics is crucial for successful project completion:
- **Jsoup** : Understanding how to access, parse, and manipulate HTML files using Jsoup.
- **HTML** : Knowledge of various HTML tags, their purposes, and how to identify and manipulate them using Jsoup.
- **CSS** : Understanding how to style HTML elements, work with CSS classes, and utilize selectors efficiently.
By having a solid grasp of these tools and concepts, you'll be well-equipped to excel in this project. 🚀
## Objectives 🎯
The primary objectives of this assignment are:
- Parsing an HTML file with video-game data.
- Extracting relevant information such as price, rating, and other game attributes.
- Implementing Java classes to represent games.
- Utilizing JSoup for HTML parsing.
- Applying sorting algorithms for organizing data by price, rating, and game name.
- Displaying the sorted game information effectively.
## Tasks 📝
1. **Set Up the Project:**
- Start by cloning the repository to your local machine.
- Open the project in an IDE such as IntelliJ.
2. **Integrate JSoup Dependency:**
- Include the JSoup dependency in your `build.gradle` file.
```gradle
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation 'org.jsoup:jsoup:1.14.3'
}
```
3. **Define the Country Class:**
- Create a `Game` class in Java to encapsulate country-specific data.
5. **HTML Parsing using JSoup:**
Utilize JSoup to parse the HTML file located in the Resources folder at this path: `Fourth-Assignment-Steam-Scraper\src\Resources` and extract relevant information such as:
- `<span class="game-name">` = for game names
- `<span class="game-rating">` = for game ratings
- `<span class="game-price">` = for game prices
**Note: The span tags are nested within other tags and div closures.**
6. **Implement Sorting Functionality:**
- Develop sorting algorithms for various criteria like rating, price, and name.
8. **Visualize Results:**
- Clearly present the sorted game data.
## Bonus Objectives (For Advanced Users) 🌟
To enhance your project further:
- Expand data extraction to additional websites, such as [Oscar Winning Films](https://www.scrapethissite.com/pages/ajax-javascript/).
- Develop a user interface for interactive querying and sorting.
- Utilize SQL or NoSQL databases to store the scraped data.
## Notes 📝
Here are some important points to keep in mind:
- there is a `Help` folder located at the root directory of the project which contains the sorted games each by different priorities. It is there just so you can see what your output should look like in the end.
- The unit tests are provided to assist you in understanding the project requirements. Your final grade is not solely dependent on their results; they are meant to aid your learning process. Remember to enable GitHub Actions for the test workflow to run on GitHub.
- Feel free to leverage ChatGPT for learning web scraping and resolving any challenges that you may not find solutions to on the internet. Utilize its capabilities to enhance your understanding and overcome obstacles effectively.
**but It is strictly prohibited to use ChatGPT or any other AI generative model for completing any section of this assignment. Failure to comply will result in a score of 0 without any warnings.**
## Evaluation 🧐
Your success will be judged based on:
- Functionality of the code in parsing HTML, creating Java objects, and sorting data.
- Readability and maintainability of the code.
- Efficiency of sorting algorithms.
- Clarity of the output format.
## Submission 📁
To share your work:
1. Add your mentor as a contributor to the project.
2. Create a `develop` branch for implementing features.
3. Use Git for regular code commits.
4. Push your code to the remote repository.
5. Submit a pull request to merge the `develop` branch with `main`.
The deadline for submitting your code is **Wednesday, April 23** (3th of Ordibehesht).
If you have any further questions or need clarification, do not hesitate to reach out to your mentor. Good luck with your project! 🌟
## Resources 📚
- [Jsoup - Official website](https://jsoup.org/cookbook/)
- [Jsoup - Javapoint](https://www.javatpoint.com/jsoup-tutorial)
- [Jsoup - Baeldung](https://www.baeldung.com/java-with-jsoup)
- [HTML - W3](https://www.w3schools.com/html/)
- [CSS - W3](https://www.w3schools.com/css/default.asp)
- [HTML & CSS - SuperSimpleDev](https://youtu.be/G3e-cpL7ofc?si=n7VZ6-SzUMqPgYH4)
- [HTML & CSS - BroCode](https://youtu.be/HGTJBPNC-Gw?si=UIfbcK-raImMT129)
@@ -1,20 +0,0 @@
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation 'org.jsoup:jsoup:1.14.3'
}
test {
useJUnitPlatform()
}
@@ -1,106 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Class ParserTest</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Class ParserTest</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/default-package.html">default-package</a> &gt; ParserTest</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">3</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.035s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Tests</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">testSortByArea()</td>
<td class="success">0.028s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">testSortByName()</td>
<td class="success">0.003s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">testSortByPopulation()</td>
<td class="success">0.004s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4</a> at Feb 28, 2024, 6:39:51 PM</p>
</div>
</div>
</body>
</html>
@@ -1,179 +0,0 @@
body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 12pt;
}
body, a, a:visited {
color: #303030;
}
#content {
padding-left: 50px;
padding-right: 50px;
padding-top: 30px;
padding-bottom: 30px;
}
#content h1 {
font-size: 160%;
margin-bottom: 10px;
}
#footer {
margin-top: 100px;
font-size: 80%;
white-space: nowrap;
}
#footer, #footer a {
color: #a0a0a0;
}
#line-wrapping-toggle {
vertical-align: middle;
}
#label-for-line-wrapping-toggle {
vertical-align: middle;
}
ul {
margin-left: 0;
}
h1, h2, h3 {
white-space: nowrap;
}
h2 {
font-size: 120%;
}
ul.tabLinks {
padding-left: 0;
padding-top: 10px;
padding-bottom: 10px;
overflow: auto;
min-width: 800px;
width: auto !important;
width: 800px;
}
ul.tabLinks li {
float: left;
height: 100%;
list-style: none;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 0;
-moz-border-radius: 7px;
border-radius: 7px;
margin-right: 25px;
border: solid 1px #d4d4d4;
background-color: #f0f0f0;
}
ul.tabLinks li:hover {
background-color: #fafafa;
}
ul.tabLinks li.selected {
background-color: #c5f0f5;
border-color: #c5f0f5;
}
ul.tabLinks a {
font-size: 120%;
display: block;
outline: none;
text-decoration: none;
margin: 0;
padding: 0;
}
ul.tabLinks li h2 {
margin: 0;
padding: 0;
}
div.tab {
}
div.selected {
display: block;
}
div.deselected {
display: none;
}
div.tab table {
min-width: 350px;
width: auto !important;
width: 350px;
border-collapse: collapse;
}
div.tab th, div.tab table {
border-bottom: solid #d0d0d0 1px;
}
div.tab th {
text-align: left;
white-space: nowrap;
padding-left: 6em;
}
div.tab th:first-child {
padding-left: 0;
}
div.tab td {
white-space: nowrap;
padding-left: 6em;
padding-top: 5px;
padding-bottom: 5px;
}
div.tab td:first-child {
padding-left: 0;
}
div.tab td.numeric, div.tab th.numeric {
text-align: right;
}
span.code {
display: inline-block;
margin-top: 0em;
margin-bottom: 1em;
}
span.code pre {
font-size: 11pt;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
margin: 0;
background-color: #f7f7f7;
border: solid 1px #d0d0d0;
min-width: 700px;
width: auto !important;
width: 700px;
}
span.wrapped pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
}
label.hidden {
display: none;
}
@@ -1,84 +0,0 @@
#summary {
margin-top: 30px;
margin-bottom: 40px;
}
#summary table {
border-collapse: collapse;
}
#summary td {
vertical-align: top;
}
.breadcrumbs, .breadcrumbs a {
color: #606060;
}
.infoBox {
width: 110px;
padding-top: 15px;
padding-bottom: 15px;
text-align: center;
}
.infoBox p {
margin: 0;
}
.counter, .percent {
font-size: 120%;
font-weight: bold;
margin-bottom: 8px;
}
#duration {
width: 125px;
}
#successRate, .summaryGroup {
border: solid 2px #d0d0d0;
-moz-border-radius: 10px;
border-radius: 10px;
}
#successRate {
width: 140px;
margin-left: 35px;
}
#successRate .percent {
font-size: 180%;
}
.success, .success a {
color: #008000;
}
div.success, #successRate.success {
background-color: #bbd9bb;
border-color: #008000;
}
.failures, .failures a {
color: #b60808;
}
.skipped, .skipped a {
color: #c09853;
}
div.failures, #successRate.failures {
background-color: #ecdada;
border-color: #b60808;
}
ul.linkList {
padding-left: 0;
}
ul.linkList li {
list-style: none;
margin-bottom: 5px;
}
@@ -1,133 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Test Summary</title>
<link href="css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
<script src="js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Test Summary</h1>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">3</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.035s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Packages</a>
</li>
<li>
<a href="#tab1">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Packages</h2>
<table>
<thead>
<tr>
<th>Package</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success">
<a href="packages/default-package.html">default-package</a>
</td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>0.035s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
<div id="tab1" class="tab">
<h2>Classes</h2>
<table>
<thead>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success">
<a href="classes/ParserTest.html">ParserTest</a>
</td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>0.035s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4</a> at Feb 28, 2024, 6:39:51 PM</p>
</div>
</div>
</body>
</html>
@@ -1,194 +0,0 @@
(function (window, document) {
"use strict";
var tabs = {};
function changeElementClass(element, classValue) {
if (element.getAttribute("className")) {
element.setAttribute("className", classValue);
} else {
element.setAttribute("class", classValue);
}
}
function getClassAttribute(element) {
if (element.getAttribute("className")) {
return element.getAttribute("className");
} else {
return element.getAttribute("class");
}
}
function addClass(element, classValue) {
changeElementClass(element, getClassAttribute(element) + " " + classValue);
}
function removeClass(element, classValue) {
changeElementClass(element, getClassAttribute(element).replace(classValue, ""));
}
function initTabs() {
var container = document.getElementById("tabs");
tabs.tabs = findTabs(container);
tabs.titles = findTitles(tabs.tabs);
tabs.headers = findHeaders(container);
tabs.select = select;
tabs.deselectAll = deselectAll;
tabs.select(0);
return true;
}
function getCheckBox() {
return document.getElementById("line-wrapping-toggle");
}
function getLabelForCheckBox() {
return document.getElementById("label-for-line-wrapping-toggle");
}
function findCodeBlocks() {
var spans = document.getElementById("tabs").getElementsByTagName("span");
var codeBlocks = [];
for (var i = 0; i < spans.length; ++i) {
if (spans[i].className.indexOf("code") >= 0) {
codeBlocks.push(spans[i]);
}
}
return codeBlocks;
}
function forAllCodeBlocks(operation) {
var codeBlocks = findCodeBlocks();
for (var i = 0; i < codeBlocks.length; ++i) {
operation(codeBlocks[i], "wrapped");
}
}
function toggleLineWrapping() {
var checkBox = getCheckBox();
if (checkBox.checked) {
forAllCodeBlocks(addClass);
} else {
forAllCodeBlocks(removeClass);
}
}
function initControls() {
if (findCodeBlocks().length > 0) {
var checkBox = getCheckBox();
var label = getLabelForCheckBox();
checkBox.onclick = toggleLineWrapping;
checkBox.checked = false;
removeClass(label, "hidden");
}
}
function switchTab() {
var id = this.id.substr(1);
for (var i = 0; i < tabs.tabs.length; i++) {
if (tabs.tabs[i].id === id) {
tabs.select(i);
break;
}
}
return false;
}
function select(i) {
this.deselectAll();
changeElementClass(this.tabs[i], "tab selected");
changeElementClass(this.headers[i], "selected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
var h2 = document.createElement("H2");
h2.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(h2);
}
function deselectAll() {
for (var i = 0; i < this.tabs.length; i++) {
changeElementClass(this.tabs[i], "tab deselected");
changeElementClass(this.headers[i], "deselected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
var a = document.createElement("A");
a.setAttribute("id", "ltab" + i);
a.setAttribute("href", "#tab" + i);
a.onclick = switchTab;
a.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(a);
}
}
function findTabs(container) {
return findChildElements(container, "DIV", "tab");
}
function findHeaders(container) {
var owner = findChildElements(container, "UL", "tabLinks");
return findChildElements(owner[0], "LI", null);
}
function findTitles(tabs) {
var titles = [];
for (var i = 0; i < tabs.length; i++) {
var tab = tabs[i];
var header = findChildElements(tab, "H2", null)[0];
header.parentNode.removeChild(header);
if (header.innerText) {
titles.push(header.innerText);
} else {
titles.push(header.textContent);
}
}
return titles;
}
function findChildElements(container, name, targetClass) {
var elements = [];
var children = container.childNodes;
for (var i = 0; i < children.length; i++) {
var child = children.item(i);
if (child.nodeType === 1 && child.nodeName === name) {
if (targetClass && child.className.indexOf(targetClass) < 0) {
continue;
}
elements.push(child);
}
}
return elements;
}
// Entry point.
window.onload = function() {
initTabs();
initControls();
};
} (window, window.document));
@@ -1,103 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Default package</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Default package</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt; default-package</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">3</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.035s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Classes</h2>
<table>
<thread>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thread>
<tr>
<td class="success">
<a href="../classes/ParserTest.html">ParserTest</a>
</td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>0.035s</td>
<td class="success">100%</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 7.4</a> at Feb 28, 2024, 6:39:51 PM</p>
</div>
</div>
</body>
</html>
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="ParserTest" tests="3" skipped="0" failures="0" errors="0" timestamp="2024-02-28T15:09:51" hostname="DESKTOP-UC73C4L" time="0.037">
<properties/>
<testcase name="testSortByArea()" classname="ParserTest" time="0.028"/>
<testcase name="testSortByName()" classname="ParserTest" time="0.003"/>
<testcase name="testSortByPopulation()" classname="ParserTest" time="0.004"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>
@@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-234
View File
@@ -1,234 +0,0 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
@@ -1,89 +0,0 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
@@ -1,2 +0,0 @@
rootProject.name = 'HTML-Parser'
@@ -1,805 +0,0 @@
<div id="page">
<section id="games">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>
Video Game List: To Scrape
</h1>
<hr>
</div>
</div>
<!-- Game List -->
<div class="row">
<div class="col-md-4 game">
<h3 class="game-name">Far Cry 4</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario Galaxy</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Devil May Cry 5</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Metroid Prime</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario Odyssey</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Halo: Combat Evolved</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">87 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The House in Fata Morgana</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">83 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Uncharted 2: Among Thieves</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Tekken 3</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Legend of Zelda: The Wind Waker</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Metal Gear Solid 2: Sons of Liberty</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Baldur's Gate II: Shadows of Amn</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Legend of Zelda Collector's Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Gran Turismo 3: A-Spec</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Legend of Zelda: A Link to the Past</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Legend of Zelda: Majora's Mask</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Last of Us</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">92 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Persona 5 Royal</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Resident Evil Code: Veronica</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">85 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Diablo</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">87 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Metal Gear Solid 3: Subsistence</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Metal Gear Solid 4: Guns of the Patriots</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Sid Meier's Civilization IV</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">82 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Virtua Fighter 4</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">81 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Far Cry 3</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">80 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Tom Clancy's Rainbow Six Siege</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Company of Heroes</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">87 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Gran Turismo 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Last of Us Part II</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">57 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Half-Life: Alyx</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">92 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Divinity: Original Sin II</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Unreal Tournament 2004</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">God of War II</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario 3D World</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Paper Mario</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Wipeout XL</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">86 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">World of Warcraft</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">74 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Flipnote Studio</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">75 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">God of War III</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">NHL 2002</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">83 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Uncharted 3: Drake's Deception</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Bloodborne</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Eternal Darkness: Sanity's Requiem</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">87 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Warcraft III: Reign of Chaos</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">92 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Sid Meier's Gettysburg!</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">74 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Forza Motorsport</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">76 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Advance Wars</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Vagrant Story</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Team Fortress 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">System Shock 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Final Fantasy XII</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">76 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario World: Super Mario Advance 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Smash Bros. Melee</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">91 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Rome: Total War</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.9/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Forza Motorsport 3</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.7/5</span><br>
<strong>Price:</strong> <span class="game-price">81 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario Sunshine</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Tony Hawk's Pro Skater</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.8/5</span><br>
<strong>Price:</strong> <span class="game-price">88 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Portal: Still Alive</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">86 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Half-Life 2: Episode Two</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">92 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Chronicles of Riddick: Escape From Butcher Bay - Developer's Cut</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.8/5</span><br>
<strong>Price:</strong> <span class="game-price">86 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Shin Megami Tensei: Persona 4</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.1/5</span><br>
<strong>Price:</strong> <span class="game-price">77 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Hollow Knight</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Blast Corps</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.7/5</span><br>
<strong>Price:</strong> <span class="game-price">83 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Sid Meier's Civilization III</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">NFL 2K2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.6/5</span><br>
<strong>Price:</strong> <span class="game-price">71 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">WWF SmackDown! 2: Know Your Role</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Silent Hunter III</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">78 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Dead Space 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">86 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Pikmin 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">90 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Geometry Wars: Retro Evolved 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.8/5</span><br>
<strong>Price:</strong> <span class="game-price">83 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Sid Meier's Civilization V</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">80 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Super Mario 3D Land</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.1/5</span><br>
<strong>Price:</strong> <span class="game-price">84 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Mario Kart 8 DLC Pack 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Project Gotham Racing 3</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">79 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The World Ends with You</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.5/5</span><br>
<strong>Price:</strong> <span class="game-price">87 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Dishonored 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">80 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Injustice 2: Legendary Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">77 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Divinity: Original Sin Enhanced Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.6/5</span><br>
<strong>Price:</strong> <span class="game-price">80 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Minecraft: Xbox One Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">73 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">JSRF: Jet Set Radio Future</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.1/5</span><br>
<strong>Price:</strong> <span class="game-price">83 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Red Faction</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">79 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Modern Warfare Remastered</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">71 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Titanfall</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">61 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Black Ops III</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.7/5</span><br>
<strong>Price:</strong> <span class="game-price">50 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Watch Dogs 2</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.1/5</span><br>
<strong>Price:</strong> <span class="game-price">81 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Black Ops II</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.8/5</span><br>
<strong>Price:</strong> <span class="game-price">50 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Infinite Warfare - Sabotage</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">18 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Advanced Warfare - Reckoning</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.5/5</span><br>
<strong>Price:</strong> <span class="game-price">57 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Advanced Warfare - Ascendance</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">67 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Grand Theft Auto V</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.6/5</span><br>
<strong>Price:</strong> <span class="game-price">36 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Call of Duty: Advanced Warfare - Supremacy</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">64 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">CS student simulator</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">1.0/5</span><br>
<strong>Price:</strong> <span class="game-price">85 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Resident Evil (2002)</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.2/5</span><br>
<strong>Price:</strong> <span class="game-price">92 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Resident Evil 4: Wii Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.9/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Doom 3</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.1/5</span><br>
<strong>Price:</strong> <span class="game-price">81 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Tekken: Dark Resurrection</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.8/5</span><br>
<strong>Price:</strong> <span class="game-price">86 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">The Stanley Parable</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.0/5</span><br>
<strong>Price:</strong> <span class="game-price">80 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Slay the Spire</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">3.5/5</span><br>
<strong>Price:</strong> <span class="game-price">69 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Guacamelee! Gold Edition</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.3/5</span><br>
<strong>Price:</strong> <span class="game-price">75 €</span><br>
</div>
</div>
<div class="col-md-4 game">
<h3 class="game-name">Counter-Strike: Source</h3>
<div class="game-info">
<strong>Rating:</strong> <span class="game-rating">4.4/5</span><br>
<strong>Price:</strong> <span class="game-price">89 €</span><br>
</div>
</div>
</div>
</div>
</section>
</div>
@@ -1,40 +0,0 @@
import java.util.Objects;
public class Game {
private String name;
private double rating;
private int price;
public Game(String name, double rating, int price) {
//TODO
}
public String getName() {
return name;
}
public double getRating() {
return rating;
}
public int getPrice() {
return price;
}
@Override
public String toString() {
//TODO
return "";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Game game = (Game) o;
return Double.compare(game.rating, rating) == 0 && Double.compare(game.price, price) == 0 && Objects.equals(name, game.name);
}
}
@@ -1,48 +0,0 @@
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.File;
import java.io.IOException;
import java.util.*;
public class Parser {
static List<Game> games = new ArrayList<>();
public List<Game> sortByName(){
List<Game> sortedByName = new ArrayList<>(games);
// Sort games alphabetically (least)
//TODO
return sortedByName;
}
public List<Game> sortByRating(){
List<Game> sortedByRating = new ArrayList<>(games);
// Sort games by rating (most)
//TODO
return sortedByRating;
}
public List<Game> sortByPrice(){
List<Game> sortedByPrice = new ArrayList<>(games);
// Sort games by price (most)
//TODO
return sortedByPrice;
}
public void setUp() throws IOException {
//Parse the HTML file using Jsoup
//TODO
// Extract data from the HTML
//TODO
// Iterate through each Game div to extract Game data
//TODO
}
public static void main(String[] args) {
//you can test your code here before you run the unit tests
}
}
@@ -1,76 +0,0 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ParserTest {
public static Parser handle;
@BeforeAll
static void setUp() throws IOException {
handle = new Parser();
handle.setUp();
}
@Test
public void testSortByName() {
List<Game> sortedGames = handle.sortByName();
Game g1 = new Game("Bloodborne" ,4.8,88);
Game g2 = new Game("Gran Turismo 2" ,4.6,90);
Game g3 = new Game("Resident Evil Code: Veronica" ,4.6,85);
Game g4 = new Game("Super Smash Bros. Melee" ,4.8,91);
Game g5 = new Game("The Last of Us" ,4.9,92);
Game g6 = new Game("Wipeout XL" ,4.3,86);
assertEquals(100, sortedGames.size());
assertEquals(sortedGames.get(3),g1);
assertEquals(sortedGames.get(31),g2);
assertEquals(sortedGames.get(57),g3);
assertEquals(sortedGames.get(72),g4);
assertEquals(sortedGames.get(79),g5);
assertEquals(sortedGames.get(98),g6);
}
@Test
public void testSortByPrice() {
List<Game> sortedGames = handle.sortByPrice();
Game g1 = new Game("Tekken 3" ,4.4,91);
Game g2 = new Game("The Legend of Zelda: The Wind Waker" ,4.8,90);
Game g3 = new Game("Advance Wars" ,4.7,89);
Game g4 = new Game("Company of Heroes" ,4.7,87);
Game g5 = new Game("Uncharted 3: Drake's Deception" ,4.7,84);
Game g6 = new Game("Final Fantasy XII" ,4.7,76);
assertEquals(100, sortedGames.size());
assertEquals(sortedGames.get(8),g1);
assertEquals(sortedGames.get(14),g2);
assertEquals(sortedGames.get(29),g3);
assertEquals(sortedGames.get(44),g4);
assertEquals(sortedGames.get(56),g5);
assertEquals(sortedGames.get(82),g6);
}
@Test
public void testSortByRating() {
List<Game> sortedGames = handle.sortByRating();
Game g1 = new Game("God of War II" ,4.9,90);
Game g2 = new Game("Diablo" ,4.8,87);
Game g3 = new Game("Advance Wars" ,4.7,89);
Game g4 = new Game("Unreal Tournament 2004" ,4.6,88);
Game g5 = new Game("Gran Turismo 3: A-Spec" ,4.5,84);
Game g6 = new Game("Call of Duty: Infinite Warfare - Sabotage" ,4.3,18);
assertEquals(100, sortedGames.size());
assertEquals(sortedGames.get(5),g1);
assertEquals(sortedGames.get(12),g2);
assertEquals(sortedGames.get(29),g3);
assertEquals(sortedGames.get(38),g4);
assertEquals(sortedGames.get(45),g5);
assertEquals(sortedGames.get(64),g6);
}
}