Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / QUESTION 1 IS-125 • Exam 2

QUESTION 1 IS-125 • Exam 2

Sociology

QUESTION 1 IS-125 • Exam 2 . Part A (40 points) Using the UML below as the design, implement a Python version of the Song class. Be sure to implement the correct public or private aspects of the class member items as shown in the UML. In the implementation, eliminate the possibility of negative values for the time by converting any negative value to the corresponding positive value (i.e. -5.25 becomes 5.25). The str method should create a string that reads as follows (assuming a time of 2.75 minutes): The song Yesterday by Paul McCartney is 2.75 minutes long. (OK, I'm a lot older than you!!!) Also write a separate Python test program that demonstrates all the elements of the song class by creating a Song object, printing the returned value for each of the get methods, and printing the object using the str method. Submit both the class and test program.py files for grading by zipping them into a single folder. UML For Song Class Song -title: string - artist: string - time: float + __init__(title: string, artist: string, time: float) + getTitle(): string + getArtist(): string + getTime(): float _str_0: string Decimal minutes (i.e.: 2.75) Constructor + See instructions above Evaluation: • Creation of class .py file. (5 points) • Correction of negative time values. (5 points) • Private class variables. (10 points) Import of class into test program. (5 points) • Test program creates object using class constructor. (10 points) • Test program demonstrates all class methods.

Option 1

Low Cost Option
Download this past answer in few clicks

16.89 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE