IT 117: Introduction to Scripting
Homework 8

Due

Sunday, March 31st at 11:59 PM

What You Need to Do

Setup On Your Machine

Specification

Methods

__init__


get_title


get_subtitle


get_author


print_book

Test Code

Output

Suggestions

  1. Create the file hw8.py.
    Write the class header for Book.
    Write the constructor for this class.
    Make sure the constructor has parameters for each attribute.
    Make sure the constructor sets the value foe each attribute.
    Add the first line of the test code to the bottom of the file.
    Run the script.
    Fix any errors you find.
  2. Create the method get_title.
    Add 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_subtitle.
    Add 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_author.
    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 print_book.
    Add 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 © 2021 Glenn Hoffman. All rights reserved. May not be reproduced without permission.