Advertisement
KarolPiechaczek

Untitled

Jan 22nd, 2022 (edited)
1,046
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package mathSkillTest;
  2.  
  3. import java.util.Random;
  4.  
  5. public class Number {
  6.     Random random = new Random();
  7.     private int firstNumber = Math.abs(random.nextInt() % 99 + 1),
  8.                 secondNumber = Math.abs(random.nextInt() % 99 + 1),
  9.                 result = firstNumber +  secondNumber, attempts, userResult = 0, shoot = 0;
  10.  
  11.     public int getShoot() {
  12.         return shoot;
  13.     }
  14.     public void setShoot(int shoot) {
  15.         this.shoot = shoot;
  16.     }
  17.    
  18.     public int getUserResult() {
  19.         return userResult;
  20.     }
  21.     public void setUserResult(int userResult) {
  22.         this.userResult = userResult;
  23.     }
  24.    
  25.    
  26.     public int getAttempts() {
  27.         return attempts;
  28.     }
  29.     public void setAttempts(int attempts) {
  30.         this.attempts = attempts;
  31.     }
  32.    
  33.     public int getResult() {
  34.         return result;
  35.     }
  36.     public void setResult(int result) {
  37.         this.result = result;
  38.     }
  39.    
  40.     public int getFirstNumber() {
  41.         return firstNumber;
  42.     }
  43.     public void setFirstNumber(int firstNumber) {
  44.         this.firstNumber = firstNumber;
  45.     }
  46.    
  47.     public int getSecondNumber() {
  48.         return secondNumber;
  49.     }
  50.     public void setSecondNumber(int secondNumber) {
  51.         this.secondNumber = secondNumber;
  52.     }
  53. }
  54.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement