SHARE
TWEET

Untitled

a guest Dec 9th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.     public boolean checkType() {
  3.         if (this.type.equals("Brown dwarf") && (this.apparentMagnitude <= 20 && this.apparentMagnitude >= 15)) {
  4.             return true;
  5.         } else if ((this.type.equals("Red dwarf") || this.type.equals("White dwarf")) && (this.apparentMagnitude <= 15 || this.apparentMagnitude >= 10)) {
  6.             return true;
  7.         } else if(this.type.equals("Subdwarf") && (this.apparentMagnitude <= 10 && this.apparentMagnitude >= 5)) {
  8.             return true;
  9.         } else if ((this.type.equals("Main sequence") || this.type.equals("Subgiant")) && (this.apparentMagnitude <= 5 && this.apparentMagnitude >= 0)){
  10.             return true;
  11.         } else if ((this.type.equals("Giant") || this.type.equals("Bright giant")) && (this.apparentMagnitude <= 0 && this.apparentMagnitude >= -5)){
  12.             return true;
  13.         } else if ((this.type.equals("Blue supergiant") || this.type.equals("Yellow supergiant") || this.type.equals("Red supergiant") || this.type.equals("Hypergiant")) && (this.apparentMagnitude <= 15 && this.apparentMagnitude >= 10)){
  14.             return true;
  15.         } else {
  16.             return false;
  17.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top