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 m-M=5(logd-1)
str_returns the string representation of the star, like the following
(use embedded newlines)
Star: Betelgeuse
RA:,05h55m10.3s
Dec: ,+07d24'25.4"
Mag: ,-5.85
Dist: 220.0pc
 Create a class called Star to store data and methods associated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!