Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement