Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean checkType() {
- if (this.type.equals("Brown dwarf") && (this.apparentMagnitude <= 20 && this.apparentMagnitude >= 15)) {
- return true;
- } else if ((this.type.equals("Red dwarf") || this.type.equals("White dwarf")) && (this.apparentMagnitude <= 15 || this.apparentMagnitude >= 10)) {
- return true;
- } else if(this.type.equals("Subdwarf") && (this.apparentMagnitude <= 10 && this.apparentMagnitude >= 5)) {
- return true;
- } else if ((this.type.equals("Main sequence") || this.type.equals("Subgiant")) && (this.apparentMagnitude <= 5 && this.apparentMagnitude >= 0)){
- return true;
- } else if ((this.type.equals("Giant") || this.type.equals("Bright giant")) && (this.apparentMagnitude <= 0 && this.apparentMagnitude >= -5)){
- return true;
- } 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)){
- return true;
- } else {
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement