Please read the entire problem before jumping into the code!
Using the in-class examples and practice test as a guide, continue to modify your Compass
class by adding the following characteristics:
Compass
objects together. It will leave
the arguments unchanged, but will return a (correctly bounded) Compass
object
based on their sum.<<
) for the Compass
object
that will output the date in the apropriate format.d°m's"
or d.ddd°
(decimal degrees) format.e.g.: If you have the following data: 45 degrees, 15 minutes and 0 seconds the output looks like this
decimal degree
stateoutput off 45°15'0"
on 45.25°
1 minute = 0.0166667 decimal degrees (or 1/60 degree)
1 second = 0.0166667 decimal minutes (or 1/60 minute) = 0.0002777777 decimal minutes (or 1/3600 minute)Your output functions should use the value stored in the class data member to display output appropriately.
Update your a driver program to test all the permutations of your class, as you did in the practice test. Your class definition, implementation and driver program should all be in appropriately named, separate files. Submit your copies to the FTP site in a separate folder/directory called P11.
Submissions to the FTP site that are NOT saved in the separate P11 directory will be automatically docked 10 points for failing to follow instructions.