Making the Grade…

honor_roll_certificate

The Intro

So at this point we have several tools at our disposal for handling complex data in Python, namely classes, which provide us a structure for packaging properties and methods in one place.

Today we going to practice our skills again, this time on a set of grade data.  Read on for all the details…

In the HS APPS N: drive, please copy the file grade-data.csv to your H: drive where you keep your Python programs.

Your assignment is adapt your AddressBook program to output an honor roll for a class of students.  You will have to define two classes that will store and process the data.

The STUDENT Class

Your Student class should include the following properties:

Student Properties

The objects should include last name, first name, and percent attributes for storing the data from the file.

Student Methods

letterGrade() will take a students percent and convert it to a letter grade based on a standard grading scale: 93-100 A, 90 – 92 A-, 87-89 B+, 83-86 B, 80-82 B-, 77-79 C+, 73-76 C, 70-72 C-, 67-69 D+, 63-66 D, 60-62 D-, <60 E.

The ComputerClass Class

Your ComputerClass class should  include the following properties and methods:

ComputerClass Properties

The ComputerClass objects will have a classname attribute and a classlist attribute.  classlist is a Python list of the students objects from the file.

ComputerClass Methods

The objects will require these three methods:

addStudent(), which will append a Student object to classlist.

importFromCSVFile(), which will receive the file name and then retrieve the data from the file and store it in classlist as a list of Student objects.

honorRollSort(), which sorts the data by percent in descending order to produce an Honor Roll list.

The Output

Once these items are in place, use the TableWindow class from our AddressBook program to display the honor roll in a GUI table.

The image below shows the output of the program:

honorroll

Upon completion of your program, please use the following submission link to submit your work.