Question: Create a class called Star to store data and methods associated with individual stars. It should contain the following attributes: name as a string right
Create a class called Star to store data and methods associated with individual
stars. It should contain the following attributes:
name as a string
right ascension as a tuple hours minutes, seconds
declination as a tuple degrees arcminutes, arcseconds
distance as a float pc
absolute magnitude as a float
The constructor method should take these as arguments and use them to set the
values of the attributes associated with the object.
Give the class two methods:
appmag returns the apparent magnitude using
strreturns the string representation of the star, like the following
use embedded newlines
Star: Betelgeuse
:
Dec:
Mag:
Dist:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
