cs102 lab10


http://www.maths.nuigalway.ie/~gettrick/teach/cs102/labs/l10.html



A hospital will store information on its patients in a class called patients. For each patient, we will store the attributes

  1. patients forename,
  2. patients surname,
  3. date of patients admission,
  4. date of birth, and
  5. name of the county where they live.
Write a class in python to represent each patient. Further, write a subclass private(patients) to store information on private patients in the hospital. These patients will have two extra attributes 1) name of insurance company, 2) reference code of insurance policy (you can treat this as a string of characters). Construct a list of six (6) fictional patients (use fictional data you make up yourself), 3 of whom are private patients, and print out the birth date of all these 6 patients using a for loop. All your methods, the constructor, and the class itself, should have appropriate docstrings. You should test your methods well (by calling them from the main program), to make sure they work as planned.
© NUI, Galway