Homework Assignment # 2

Due Wednesday September 18, 2013 by 11:59 PM. Use turnin to submit your homework (i.e., turnin --submit ericweb2 cs313_hw2 HW2.py)

[10 Points] Please have the following at the top of HW2.py

# HW2.py
# Homework 2 
# UT EID: XXX999, UTCS username: XXXXXXXX 
# CS313e, Fall 2013, Dr. P. Cannata 
# Department of Computer Science, The University of Texas at Austin --

Implement the following UML diagram in python.
(In this diagram, there are 5 classes, Person, Student, Employee, PhDStudent, and Grade.
There is a supervisor/supervised line (Relationship) going from the Person class to the Person class.
There is a person/grade line (Relationship) going from the Person to the Grade class.)

Use String instead of the Date data type, and change the data type of "value" in "Grade" to be String.
Have an __init__ function for the attributes unique to the class. 
Don't use a super function.

Make three instances e1, p1, and g1 of the Employee, PhDStudent, and Grade classes.

e1's name should be Ben Black, leave the other attributes blank (number = 0, strings = "")
p1's name should be Sue Flower, leave the other attributes blank (number = 0, strings = "")
g1's name should be Physics and value A.

For the instances, make it so that e1 supervises p1 and p1's grade is g1.
1 Point of extra credit if you make these relationships bi-directional.
(I.e., supervisor, supervised, person, and grade should also be attributes of the appropriate classes.
Don't include them in the __init__ function. There type should be list.)

Print the non-blank attributes for each instance.
For the relationships, print the non-blank values of the instances in the relationship.

The print statements should give the follow if you've also done the extra credit:

e1: Name - Ben Black , Supervises - Sue Flower
p1: Name - Sue Flower , Supervised by - Ben Black , Grade - Physics A
g1: Name - Physics , Grade for student - A Sue Flower