Answered step by step
Verified Expert Solution
Question
1 Approved Answer
All other parts preceding have been posted as well -- java please :) Part 12 In the ProBasketballPlayer class, create a new toString method which
All other parts preceding have been posted as well -- java please :)
Part 12 In the ProBasketballPlayer class, create a new toString method which return a String containing all the information from the toString method of the BasketballPlayer class along with the yearsInLeague and role values for the player. Part 13 Create a class named Basketball Tester. Create a main method that reads in the information from CBP.csv and PBP.csv. Each row of information should be stored as a College BasketballPlayer object (CBP.csv) or a ProBasketballPlayer object (PBP.csv). Add each new College BasketballPlayer object to an ArrayList named cbPlayers and add each new ProBasketballPlayer objet to an ArrayList named pbPlayers. Part 14 Create a method in the BasketballTester class named bestCBP value. The method should accept an ArrayList of College BasketballPlayer objects. The method should return a String with the name and value of the player with the highest value determined by the get Value method of the BasketballPlayer class. The format of the String is left to you. You must us an enhanced for-loop in your implementation. Part 15 Create a method in the BasketballTester class named bestPBP contract. The method should accept an ArrayList of ProBasketballPlayer objects and a String. The String argument indicates the role of the player (e.g. starter or bench). The method should return a String with the name and contract value of the player with the highest contract value in the role given as an argument to the method. The format of the String is left to you. You must us an enhanced for-loop in your implementation. Part 16 In the main method of the BasketballTester call both the bestCBP value and bestPBPcontract methods with cbPlayers and pbPlayers. When calling the bestPBP contract method, use "Starter as the String argument. Print the String returned from each method to the screen. Part 12 In the ProBasketballPlayer class, create a new toString method which return a String containing all the information from the toString method of the BasketballPlayer class along with the yearsInLeague and role values for the player. Part 13 Create a class named Basketball Tester. Create a main method that reads in the information from CBP.csv and PBP.csv. Each row of information should be stored as a College BasketballPlayer object (CBP.csv) or a ProBasketballPlayer object (PBP.csv). Add each new College BasketballPlayer object to an ArrayList named cbPlayers and add each new ProBasketballPlayer objet to an ArrayList named pbPlayers. Part 14 Create a method in the BasketballTester class named bestCBP value. The method should accept an ArrayList of College BasketballPlayer objects. The method should return a String with the name and value of the player with the highest value determined by the get Value method of the BasketballPlayer class. The format of the String is left to you. You must us an enhanced for-loop in your implementation. Part 15 Create a method in the BasketballTester class named bestPBP contract. The method should accept an ArrayList of ProBasketballPlayer objects and a String. The String argument indicates the role of the player (e.g. starter or bench). The method should return a String with the name and contract value of the player with the highest contract value in the role given as an argument to the method. The format of the String is left to you. You must us an enhanced for-loop in your implementation. Part 16 In the main method of the BasketballTester call both the bestCBP value and bestPBPcontract methods with cbPlayers and pbPlayers. When calling the bestPBP contract method, use "Starter as the String argument. Print the String returned from each method to the screenStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started