subject
Mathematics, 24.05.2021 16:30 issaaamiaaa15

The file you will be referring to is a file called pokemon. csv. - Study the contents of this file and become familiar with how the data is layed out.
- The first row is the column headers for each data in each row
- Each row (line) is a character
High Level Agenda
Step 1: Create the source code for reading a data file and create a list of data objects
Step 2: Create some methods to gather statistics of the data
Step 3: Create JUnit tests for the statistical methods
Details
Part 1: Source Code
A) Create a .csv file reader class called CsvReader
a. Method: public boolean readFile(String fileName)
i. Return value is true if file was read okay, false otherwise (if this returns
false, then something is not right and so you have to fix it. Make this
method bullet proof as best as you can).
ii. This method should store Character objects in a Hashset member
variable in this class
iii. Ideally, you should create a new Character object (for each row data line)
in this method and then for each line (String) read, pass the information
to the Character class method (this should be the constructor of the
Character class)
b. Method: public Hashset getCharacterSet()
i. This method allows the retrieval of the entire HashSet of Character
objects that were created
ii. returns a hash set of Character objects (these are based on the rows of
data)
B) Create a character class called Character
a. Constructor: public Character(String dataLine)
i. When creating a new character, this constructor should take in the row
dataLine and then it should perform the line parsing i. e. using the split(..)
command to get the individual data pieces from the data line.
ii. The method should initiate the setting of the column data (which should
be the member variables in this class). Note: use the same name spelling
as the name that are in the column headers of the I/O file (pokemon. csv)
1. The column header names is the first row of information.
b. You will add any other additional supporting methods to get this class to work
right for you. So you will decide what is needed and what is not based on the
needs for the project.
c. You should have a handful of get methods to retrieve data.
d. NOTE: you can look at the information in PART 2 and this will give you a sense of
which variables to create in your Character class.
C) Create a runner class (with main) called Pokemon
a. Method: create a main class
i. Creates the CsvReader object and calls the CsvReader. readFile method
ii. Assuming CsvReader. readFile() runs okay, then get the HashSet of
Character objects from CsvReader object (use the getCharacterSet()
method from the CsvReader class.
iii. With the data set, you will have base set of information to start working
with for Part 2
1. NOTE: good idea to print out some properties of the object just to
ensure you can loop through the set. This is debug output only.
Part 2: Data Gathering
For this part, you will create a few methods that give you information about the set. In the
Pokemon class in Part 1, you will add the following methods and test them in the main method:
A) Method: public HashSet getHitPointList(int maxHP, HashSet
baseSet)
a. This method will return a list of Pokemon characters that have a range of HP (hit
points) from 0 to maxHP). The HP is the "hp" column in the .csv file.
b. The baseSet is the set you got from Part C. a.ii
B) Method: public int getIsLegendaryCount()
a. This method returns the total count of characters that are marked as legendary
(This is the "is_legendary" column in the .csv file)
C) Method: public TreeSet (char firstLetter)
a. As the name mentions, this method should return a TreeSet that orders the
Character objects by their name.
b. Example: If you entered the letter ‘C’ as the input parameter, this method should
return all the characters with names that start with the letter ‘C’ or ‘c’
c. The name column is called "name" in the .csv file.
D) NOTE: For this part, you should run a couple of test runs to look at the output of the
return values from each of these methods, just to make your code is working.
Part 3: JUnit testing
For this part, you just need to test the three methods in part 2. This part will be up to you on
how you want to test the return. A positive and negative test for each method is all you need.
Don’t create more.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 20:00
Landon wrote that 3−2.6=4. which statement about his answer is true?
Answers: 1
question
Mathematics, 22.06.2019 03:00
Select quivalent or not equivalent to indicate whether the expression above is equivalent or not equivalent to the values or expressions in the last column.
Answers: 3
question
Mathematics, 22.06.2019 04:00
Iwill mark ad braniless pls just evens
Answers: 2
question
Mathematics, 22.06.2019 04:20
The weibull distribution is widely used in statistical problems relating to aging of solid insulating materials subjected to aging and stress. use this distribution as a model for time (in hours) to failure of solid insulating specimens subjected to ac voltage. the values of the parameters depend on the voltage and temperature; suppose α = 2.5 and β = 190. (a) what is the probability that a specimen's lifetime is at most 250? less than 250? more than 300? (round your answers to four decimal places.) at most 250 less than 250 more than 300 (b) what is the probability that a specimen's lifetime is between 100 and 250? (round your answer to four decimal places.) (c) what value is such that exactly 50% of all specimens have lifetimes exceeding that value? (round your answer to three decimal places.) hr
Answers: 2
You know the right answer?
The file you will be referring to is a file called pokemon. csv. - Study the contents of this file...
Questions
question
Mathematics, 10.07.2019 19:00
question
Mathematics, 10.07.2019 19:00
Questions on the website: 13722360