Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE MAKE SOLUTION IN JAVA Team Rocket is at it again! There\'s a large field

ID: 3736574 • Letter: P

Question

PLEASE MAKE SOLUTION IN JAVA

Team Rocket is at it again! There's a large field filled to the brim with Pokémon! Team Rocket wants to capture them all in their quest to... hmm... take over the world? Or something like that? That's beside the point; their ultimate plan will fail unless they capture every single Pokémon in the field! They will fly a plane over the field and drop a huge net over the Pokémon to capture them! But netting is expensive. And when you are taking over the world (or something) you have.to be efficient with your Pokédollars. Team Rocket wants to make sure they don't buy any more netting than they absolutely need. The netting company is very particular about their netting cutting though, they won't do any cuts that would result in a net shape where the intersection points between the boundary points of the net leave the polygon. In other words, the net must be in the shape of a convex polygon Team Rocket's Pokéradar has returned a list of X.Y coordinates of each Pokémon in the field. Can you writea program that will return the number of square meters of netting that Team Rocket needs to purchase? The netting can be purchased at any specified size, so the total area is all that is needed Input Format The first line contains a single integer N, the number of Pokémon in the field. The next N lines each contain two integers separated by a space Where x and y are the x and y coordinates of the ith Pokémon in the field (x and y are given in meters, so you don't need to worry about units) Constraints 3 S N s 219 25000 S x,yi 25000 Output Format A single number A, which is the minimum area of netting that Team Rocket needs to buy Note: A 23 and 2 AEZ condition in this note, this means that your output will always end in either.0 or .5, e.g. 42.5 or 149597900.0 Sample Input 0 4 e Your output should always contain exactly one decimal place. Coupled with the second Sample Output 0 12.5 Explanation 0

Explanation / Answer

import java.io.*; public class Pokemon extends Formulas { public static void main (String [] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Formulas f = new Formulas(); String opt, ans; int EnemyHP = 100; do { System.out.println("What will Pikachu do? A) Thundershock B) Quick Attack C) Thundershock D) Thunder"); opt = br.readLine(); switch(opt) { case "a": case "A": f.setThundershock(); System.out.println("Pikachu uses Thundershock! Enemy Life:"+f.getThundershock()); break; case "b": case "B": f.setQuickAttack(); System.out.println("Pikachu uses Quick Attack! Enemy Life:"+f.getQuickAttack()); break; case "c": case "C": f.setThunderbolt(); System.out.println("Pikachu uses Thunderbolt! Enemy Life:"+f.getThunderbolt()); break; case "d": case "D": f.setThunder(); System.out.println("Pikachu uses Thunder! Enemy Life:"+f.getThunder()); break; default: System.out.println("Invalid input."); } } while (EnemyHP != 0); } } class Formulas extends SkillValues{ private int Thundershock, QuickAttack, Thunderbolt, Thunder, Damage, EnemyHP; SkillValues s = new SkillValues(); public void setThundershock() { this.Damage = s.valueThundershock(); EnemyHP -= Damage; } public void setQuickAttack() { this.Damage = s.valueQuickAttack(); EnemyHP -= Damage; } public void setThunderbolt() { this.Damage = s.valueThunderbolt(); EnemyHP -= Damage; } public void setThunder() { this.Damage = s.valueThunder(); EnemyHP -= Damage; } public int getThundershock() { return EnemyHP; } public int getQuickAttack() { return EnemyHP; } public int getThunderbolt() { return EnemyHP; } public int getThunder() { return EnemyHP; } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote