Perl

Menu

Homework 6

This assignment will involve creating a larger GUI application in Perl/Tk.

Create a basic course scheduler GUI application. When first loaded up, your application should display a grid going from Monday to Friday, 8am-9pm, delimited into hour-long blocks. Your application must have the following abilities:

  • Register for Class
  • Drop Class
  • Change Course Info
  • Assignment Reminder
  • Display Grid
  • Save Schedule
  • Load Schedule

Register for Class

When the user selects this option, you should present a form in which the user can choose the name of the class, which day(s) the class meets, at what time the class begins, in what room the class meets, and the length of the class.

Drop Class

You must create the ability for a student to drop any course for which he/she is already registered.

Change Course Info

When the user selects this option, present him/her with all of the info for the course (name, day(s), time, length, room), and allow any or all of this information to be altered.

Assignment Reminder

Allow the user to add an assignment (name, description, and due date) to any course. Also allow the user to delete any previously created assignment.

Display Grid

This option takes the user back to the main screen of the application - the course schedule. The grid should show all registered courses at their appointed days and times. It should be obvious from looking at the grid where the student will be at any given time at any given day. Each course's cells on the grid should show the course name and the room location.

Below the grid, show a list of all assignments on the user's Assignment Reminder. The list must show each assignment's name, description, due date, and for which course it was assigned. It must be ordered by duedate, earliest to latest.

Save Schedule

Save the existing schedule in some unique fashion, so that it can be recalled later. (Obviously, the most common and expected way to do this would be to allow the user to choose a filename to which you would write the Schedule's information)

Load Schedule

Load a schedule that was previously saved. All courses and assignments must be retained from the last time the schedule was saved.

Application Structure

Obviously, this is the same assignment as Homework 5, with three exceptions:

  • It is a GUI application, not a CGI application.
  • You must have the ability to save different schedules.
  • You must have the ability to load any previously saved schedule.

As with HW5, this assignment is freeform. So long as your submission meets all of the requirements (and is written in Perl/Tk) it's acceptable. You can have one main window that displays every possible option at once, you can have separate TopLevel windows, you can have pop up dialogs, you can have sets of widgets appear and disappear at appropriate times, etc. However you choose to create the application is fine.

Assumptions

You may make the following assumptions when coding this assignment:

  • A class meets at the same time every day that it meets
  • A class's length is a multiple of whole hours
  • The user will not attempt to schedule overlapping classes

Grading Criteria

Save and Load different Schedules 10
Register Course 15
Drop Course 7.5
Change Course Info 10
View Grid 12.5
Create Assignments 10
Drop Assignments 5
View Assignments 5
Application Navigation 5
Code Style 5
Output Style 5
Clean Compilation 5
Error Checking 5

Code Style

Your code should be easily read by a human being. Most important are: consistent indentation, explanatory comments, and meaningful variable names. For a full list to well-styled Perl code, please see perldoc perlstyle.

Output Style

For the purposes of this assignment, "output" refers to the appearance of your GUI application itself. Your application, should be easily usable by a human being with basic computer knowledge. Buttons and inputs should be labeled, instructions on what to do when should be given, the grid should make it obvious what courses are meeting when, etc.

Clean Compilation

Your code should produce no warnings. Your code should also of course, produce no errors. Warnings lose "Clean Compilation" points. Compilation Errors result in a 50% penalty.

Error Checking

No user - whether malicious or just ignorant - should be able to crash your program or cause unexpected consequences. You should check to see that all fields that need to be filled in are filled in, etc. Any time the user does something wrong, you should display an appropriate error message, either on the main window or in a pop-up dialog. Just printing a warning to the console is not acceptable.

Application Navigation

The user should be able to get from any part of your application to any other part of your application, by following the options and buttons you provide. This is also true for error conditions. If the user does something wrong, display an error message either along with a option or button to get back to a main page, or at the top of a main page itself.

Submission Instructions

You are free to develop this homework whereever you wish, be it solaris.remote.cs.rpi.edu, the CSDept's terminals in Amos Eaton, or your own laptop or desktop. When you submit, make sure you include - either as a comment or a readme - what machine you tested your code on. If you used your own machine, include the operating system, perl version (Run: perl -v), and Tk.pm version (Run: perl -MTk -le"print Tk::VERSION") Remember to submit your .pl script, and any .tar.gz files for modules you may have written.

Your program is due at 11:59:59pm EDT, Friday, May 2, 2008. You may submit infinite times, only the last submission will be graded. There is no late allowance for this assignment!.

Perl Quotes
Perl Quotes