IT 117: Introduction to Scripting
Homework 8

Due

Sunday, November 2nd at 11:59 PM

What You Need to Do

Setup On Your Machine

Specification

Methods

__init__


get_title


get_label


get_artist


print_lp

Test Code

lp = LP("The London Concert", "Sony Classical", "Wynton Marsalis")
print(lp.get_title())
print(lp.get_label())
print(lp.get_artist())
lp.print_lp()

Output

Suggestions

Suggestions

  1. Create the file hw8.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.
    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.
    Uncomment 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 print_lp.
    Uncomment the last line of the test code to the bottom of the file.
    Run the script.
    Fix any errors 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.