Lab 8
OO HTML Page Maker
Submit after the end of the lab session
Overview
For this lab, you will modify a class that creates an html page that presents a customized story.
Instructions, questions, and code writing
- Download the zip folder for the lab.
- Study the StoryPage class and run the demo script (pagemaker.py) that shows how the class works. You may want to review how the string format method works with named values.
- Modify the template.html file so that it includes some additional content. Make sure that the demo script still works.
- Modify the create method so that it includes at least one additional parameter to generate a customized story (instead of a simple greeting).
- Add a set_color method that allows the color of some element in the page to be set. This method will require the creation of an additional instance method, whose default value can be set in __init__. Note that the template html file has an example of setting a color. You'll want to provide the means for setting this value in Python using the format method.
- Modify pagemaker.py so that it demonstates how your modifications work.
- Optional: post your pages on studentweb.cdm.depaul.edu so that others can see them if you provide the URLs.
- Super optional: create a GUI that allows the user to specify the attributes and then click a button to generate the page.
Deliverable
Create a text (preferred) or pdf file that contains the following:
- A statement that summarizes your completion of the lab. As appropriate, the statement should
include the following:
- Who you worked with on the lab
- Any difficulties you encountered
- Your summary of your experience
- Any documentation that shows that your code works
- A summary of the files included in your submitted folder
Put your file and Python code in a folder, zip it and submit it under Lab 8 on D2L. Check that your submitted zip file is complete.
Grading
Your lab submission will be graded using the following rubric:
- + .5 --- Your submission is clearly formatted.
- + .5 --- Your submission includes a summary statement and includes how you collaborated.
- + .5 / 1.0 --- You submitted most of the lab (0.5) or you submitted all of the lab (1.0).
- + .5 --- Your lab submission is generally correct.