Microsoft Word – Project_ Pokemon Search.docx
COMP 131
Final Project (Total: 100 points)
Your friend Danny who is super into Pokemon Go asked you to help him look up some Pokemon stats and moves. As a CS student, you are too lazy to manually look up and compare for him every time when he asks. So you have decided to write a program that does these for you automatically.
Rules:
- ● You may work with others, however, no copying and pasting code from each other. We will run your code through a checker to see the similarity between codes – this also checks for logic, believe it or not.
- ● Submission needs to include: Pokemon classes in Java, web crawler in Python, text file generated from the web crawler, the search program in Java, and a design document that explains the design of your class and the search program.
- ● You can design multiple classes to represent each Pokemon.
- ● Make sure you think through the design so that your program will be user friendly.
-
● Extra credits will be given to excellent projects.
Part 1:
Use Java to create classes that can represent all the information of a given Pokemon. Here is
the link that shows you the type of data you will need to store in your Pokemon objects. (You do
not need to store the image of the Pokemon.)
https://pokemondb.net/spinoff/go/pokedex
Think about how you could design your classes to represent these information. You should get
this part done by Nov 20.
Part 2 – (Mainly done in Lab 10):
Use Python to scrape the web page, save all the information into a text file. One Pokemon data per line, separated by comma.
Here is an example of a line from the output you should see in the text file: [‘Bulbasaur’, [‘Grass’, ‘Poison’], ‘001’, ’90’, ‘126’, ‘126’, ‘16%’, ‘10%’, ’25’, [‘Tackle’, ‘Vine Whip’], [‘Power Whip’, ‘Seed Bomb’, ‘Sludge Bomb’]] Part 3: (You may get started now and use the sampleData.txt to build your file parser) Create a search program in Java that allows user to search.
- First, you need to read in the txt file and save each Pokemon into an ArrayList of Pokemon. I have uploaded a sample txt file for you to start working on this part. Once you read in the information, you need to parse them and save the correct data into your object. (This part will take a while so make sure you start early!)
-
Then, you will need to choose 4 out of the 6 functionalities to implement:
a. Search by a Pokemon name, and prints Pokemon information
b. Search by a specific type, and prints all Pokemon with that type
c. Search by a specific threshold of one of the stats, for example, Capture Rate greater than 40% and prints all Pokemon in that threshold.
d. Compare two Pokemon by type, attack and defense.
e. Search by a specific quick move, which prints all Pokemon that knows the move f. Search by a specific special move, which prints all Pokemon that knows the move You only need to choose 4 out of 6 above to implement. Please indicate in your design
document which 4 you chose. Implementing all 6 correctly will receive extra credit.
Here is an example of the program (Your program does not need to look like mine! Be Creative) :
Welcome to Pokemon Search. Please choose one of the following function:
0. Search Pokemon by name
1. Search Pokemon by type
2. Search Pokemon by quick move
3. Search Pokemon by special move
4. Compare two Pokemon
5. Search Pokemon by threshold
6: Quit the program.
1
You chose: Search by Pokemon type
Enter a Pokemon type:
fairy
Here is the list of Pokemon with Fairy type:
035 Clefairy
036 Clefable
039 Jigglypuff
040 Wigglytuff
122 Mr.Mine
Enter 6 to quit the program. Otherwise, choose another function:
10
Sorry, invalid option.
Enter 6 to quit the program. Otherwise, choose another function:
4
You chose: Compare two Pokemon Enter the first Pokemon name: Pikachu
Enter the second Pokemon name:
Pepper
Sorry, invalid Pokemon.
Enter the second Pokemon name:
Oddish
Here is the comparison between Pikachu and Oddish: Type Defense Attack
Pikachu Electric 124 108 Oddish Grass/Poison 130
134
Enter 6 to quit the program. Otherwise, choose another function: 5
You chose: Search Pokemon by threshold
Which stat do you want to look up?
Capture Rate
What is the threshold?
5%
Which operation? (e.g. greater than, equals, etc.)
Less than
Here is the list of Pokemon with Capture Rate less than 5%:
003 Venusaur
006 Charizard
009 Blastoise
149 Dragonite
Enter 6 to quit the program. Otherwise, choose another function:
6
Thanks and come back again!
Design Document:
- In your design document, please elaborate on the design of your classes and your search program.
- Please list out all the assumptions you made in your design so that when the users run your program, they know what to expect.
-
For any additional features you add to the program, you may also want to explain and
highlight in your design document.
Grading Rubrics:
5 pts: Turn in all correct files on time
15 pts: Design document
10 pts: Web crawler
10 pts: Java class 15 pts * 4: 4 searching functions
Up to 2% extra credit added to this project