Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

QUESTION 1 IS-125 • Exam 2

Sociology Nov 17, 2022

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.

Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment