IT 117: Introduction to Scripting
Homework 9

Due

Sunday, November 9th at 11:59 PM

What You Need to Do

Setup On Your Machine

Specification

Methods

__init__


get_title


get_label


get_artist


get_released


__str__

Test Code

Output

Suggestions

  1. Create the file hw9.py.
    Write the class header for LP.
    Write the constructor for this class.
    Make sure the constructor has parameters for each attribute.
    Make sure the constructor sets the value for each attribute.
    Remember, all attributes must be hidden.
    Add the test code to the bottom of the script.
    Comment out all but the first line of the script.
    Run the script.
    Fix any errors you find.
  2. Create the method get_title.
    Uncomment the second line of the test code to the bottom of the file.
    Run the script.
    Fix any errors you find.
  3. Create the method get_label.
    Uncomment the third line of the test code to the bottom of the file.
    Run the script.
    Fix any errors you find.
  4. Create the method get_artist.
    Add the fourth line of the test code to the bottom of the file.
    Run the script.
    Fix any errors you find.
  5. Create the method get_released.
    Uncomment the fifth line of the test code to the bottom of the file.
    Run the script.
    Fix any errors you find.
  6. Create the method __STR__.
    Return a string containing the value of all attributes each one separated from the next by a comma and a space.
    Uncomment the last line of the test code to the bottom of your script.
    Run the script.
    Fix any problem you find.

Testing on Your Machine

Copy the Script to Unix

Testing the Script on Unix (Optional)

Copyright © 2020 Glenn Hoffman. All rights reserved. May not be reproduced without permission.