subject

Description For this assignment you will create a Pokedex program. Your program will read the data from a
provided file (pokedex. csv), and will as the user to input the number of two Pokemon. The program
will then tell which pokemon has an advantage in battle.
The advantage will be given in the pokedex. csv file. Don't worry about the .csv extension, all it is
is a text file formatted in a specific way.

Behind the scenes, all it is is a text file, in which each line has the data of a single pokemon. The
data for a single pokemon is then separated by commas (,). Here are the first few lines of the
pokedex (minus the first line):
1,Bulbasaur, Grass, Poison,45,49,49,45,1,2,0.5,0.5,0.25 ,2,0.5,1,1,2,2,1,1,1,1,0.5
2,Ivysaur, Grass, Poison,60,62,63,60,1,2,0.5,0.5,0.25 ,2,0.5,1,1,2,2,1,1,1,1,0.5
3,Venusaur, Grass, Poison,80,82,83,80,1,2,0.5,0.5,0.25 ,2,0.5,1,1,2,2,1,1,1,1,0.5
4,Charmander, Fire,,39,52,43,65,1,0.5,2,1,0.5,0.5 ,1,1,2,1,1,0.5,2,1,1,0.5
5,Charmeleon, Fire,,58,64,58,80,1,0.5,2,1,0.5,0.5 ,1,1,2,1,1,0.5,2,1,1,0.5
6,Charizard, Fire, Flying,78,84,78,100,1,0.5,2,2,0.25, 1,0.5,1,0,1,1,0.25,4,1,1,0.5
Notice that some Pokemons only have a single type, and therefore the column for type_2 is empty
(see Charmander for example). The first line contains the names of the attributes of the pokemon, it
is called the header, here is a description of each column:
• pokedex_number: The entry number of the Pokemon in the National Pokedex
• name: The English name of the Pokemon
• type_1: The Primary Type of the Pokemon
• type_2: The Secondary Type of the Pokemon if it has it• hp: The Base HP of the Pokemon
• attack: The Base Attack of the Pokemon
• defense: The Base Defense of the Pokemon
• speed: The Base Speed of the Pokemon
• against_normal: Denotes the multiplier applied when damage is taken from an attack of a
normal type pokemon
• against_fire: Denotes the multiplier applied when damage is taken from an attack of a fire
type pokemon
• against_water: Denotes the multiplier applied when damage is taken from an attack of a
water type pokemon
• against_electric: Denotes the multiplier applied when damage is taken from an attack of
an electric type pokemon
• against_grass: Denotes the multiplier applied when damage is taken from an attack of a
grass type pokemon
• against_ice: Denotes the multiplier applied when damage is taken from an attack of a ice
type pokemon
• against_fight: Denotes the multiplier applied when damage is taken from an attack of a
fighting type pokemon
• against_poison: Denotes the multiplier applied when damage is taken from an attack of a
poison type pokemon
• against_ground: Denotes the multiplier applied when damage is taken from an attack of a
ground type pokemon
• against_flying: Denotes the multiplier applied when damage is taken from an attack of a
flying type pokemon
• against_psychic: Denotes the multiplier applied when damage is taken from an attack of a
psychic type pokemon
• against_bug: Denotes the multiplier applied when damage is taken from an attack of a bug
type pokemon
• against_rock: Denotes the multiplier applied when damage is taken from an attack of a rock
type pokemon
• against_ghost: Denotes the multiplier applied when damage is taken from an attack of a
ghost type pokemon
• against_dragon: Denotes the multiplier applied when damage is taken from an attack of a
dragon type pokemon
• against_fairy: Denotes the multiplier applied when damage is taken from an attack of a
fairy type pokemon
This dataset is adapted from a more comprehensive one found at: https://www. kaggle. com
/mariotormo/complete-pokemon-datase t-updated-090420 The file format .csv stands for Comma
Separated Values, you can learn more about it here: https://en. wikipedia. org/wiki/Comma-
separated_valuesRequirements
• Your program must have at least 3 different classes designed and implemented by yourself:
Pokemon and Pokedex, and Main
• The class Pokemon should be used to represent a single pokemon
• The Pokedex class must implement the public Pokemon typeAdvantageCheck(Pokemon
p1, Pokemon p2); method, that returns the pokemon that has the advantage against the
other.
• The Main class is where the public static void main(String[] args) {} method is
located, where you will implement the main logic of your program
• At least one of the classes (Pokemon or Pokedex) must throw an exceprion (can be a custom
made exception or a ready-to-use provided by Java)
• Your program must use the try/catch block at least once
• Your submission will be a compressed file containing all the .java source files (do not include
.class files or the dataset)
• Your program must compile!
Hints
• Investigate the most suitable way to read the contents from the dataset (official
documentation, FileReader and the class material are a good start)
Example run
Enter the first pokemon number (1-151): 4
You chose Charmander.
Enter the second pokemon number (1-151): 7
You chose Squirtle.
Squirtle has the type advantage over Charmander in a battle!

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:40, vannahboo2022
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins ○ output the score for the person and the computer. ○ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. ○ output the die value, and amount of the round pot. ○ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. ○ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner ○ score totals are output along with who the winner was. user or computer ○ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, DSUDLER5555
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
image
Computers and Technology, 23.06.2019 19:30, bevanscory123
What are loans to a company or government for a set amount of time
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
You know the right answer?
Description For this assignment you will create a Pokedex program. Your program will read the data...

Questions in other subjects:

Konu
Mathematics, 20.08.2019 17:30
Konu
Mathematics, 20.08.2019 17:30