Advertisement
Guest User

runescapeFishing

a guest
May 14th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. /*
  2. * This program is used to calculate the number of a specific fish needed for the user
  3. * to go from their current fishing level to the maximum level of 99
  4. *
  5. * @author: Zmoss1
  6. * @date 05/14/2024
  7. */
  8. import java.util.Scanner;
  9.  
  10. public class RunescapeFishing {
  11.  
  12. public static void main(String[] args) {
  13. //Add scanner object
  14. Scanner fishingExperience = new Scanner(System.in);
  15.  
  16.  
  17. //Define constants
  18. final int LEVEL_99 = 13034431,
  19.  
  20.  
  21. //Define variables
  22. int fishingCurrentXP, xpNeeded;
  23.  
  24.  
  25. //Get user current xp input
  26. System.out.println("What is your current fishing xp? (do not use commas) ");
  27. fishingCurrentXP = fishingExperience.nextInt();
  28.  
  29.  
  30. //Calculate remaining xp
  31. xpNeeded = (LEVEL_99 - fishingCurrentXP);
  32.  
  33. //Display remaining xp to user
  34. System.out.println("XP needed to reach 99 is " + xpNeeded);
  35.  
  36. //Add second scanner object
  37.  
  38.  
  39. //Get type of fish input
  40. System.out.println("What type of fish would you like to catch?");
  41.  
  42. //Define constant fish
  43.  
  44.  
  45. //Calculate number of fish needed for level 99
  46.  
  47.  
  48. //Display number of fish needed to user
  49.  
  50. }
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement