IT 117: Intermediate Scripting
Due Sunday, April 8th at 11:59 PM
There is one deliverable for this assignment:
It must be in an hw9 directory, which you must
create inside a hw directory inside you
Make sure the script obeys all the rules in the Script Requirements page.
In your hw9.py define the class Book
that has the following hidden fields
All but the description field are set by the constructor.
You must create accessor methods for all fields.
You must create a mutator method for description.
You must also create an __str__ method
that returns a string with the values of the first five fields.
In the same file you must have a loop which will read in values from the file
book.txt which has six lines, each one
containing a value for one of the fields.
You must then copy the following test code into your script
b1 = Book(title, sub_title, author, publisher, copyright)
I have created the file book.txt in
the directory /home/ghoffman/course_files/it117_files.
Your output should look something like this
Title: Guns, Germs, and Steel
Sub_title: The Fates of Human Societies
Author: Jared Diamond
Description: How the accident of geography influences the development of technology
Guns, Germs, and Steel: The Fates of Human Societies, Jared Diamond, Norton (1997)
Be sure to run this script on the Unix machine so you know it works
in the environment in which I will run it when I score your homework.