Extra Credit: Implementation

Introduction

For this extra credit assignment, you are asked to implement the first scenario from Homework 3. In particular, you need to implement a software prototype that can handle the submission of a paper to an electronic journal. Your prototype needs to handle two cases: one in which nothing is wrong with the submitted paper and its associated metadata and the second when the submitted paper is too long.

Your software prototype needs to present a user-interface of some sort. This interface can be text-based, GUI, or Web-based (your choice). It needs to ask for a title, a list of authors, and a pointer to a text file. (We will use text files rather than PDF files for this assignment.)

A successful submission will result in an e-mail message being generated to the editor-in-chief informing him/her of the new submission and a message telling the user that the paper was received. For a text-based UI, simply print both messages to standard out. For a GUI-based UI, simply create two windows, one for each message. For a Web-based UI, simply generate an HTML document containing both messages.

If the paper is too long, your software should generate an error message (again to standard out, a window, or an HTML document, based on the type of UI your prototype uses). A paper is too long if it contains more than 500 words. A word, for this assignment, is defined as a string of non-space characters surrounded by one or more space characters. The preceeding sentence has 20 words using this definition.

Your prototype should contain object-oriented code that generates the user-interface, receives the submission event, creates a Paper object, checks its length, and then either generates the "success" output or the "failure" output depending on the length of the selected text file. You need to test your code with a text file that contains less than 500 words, and one that contains more than 500 words.

Evaluation

Your assignment will be evaluated in terms of the ability of your prototype to handle its two test cases (paper too long; paper length okay). In addition, your code will be evaluated based on its structure and use of OO concepts and techniques.

This assignment is worth 50 points: 20 points for handling test case 1 (paper too long), 20 points for handling test case 2 (paper length okay) and 10 points for the quality of your code.

This homework should be submitted electronically via the Moodle. In particular, you should upload a .zip or .tar archive containing the source code for implementing this scenario and a README file describing how to compile and run your code.

Any questions?

Send questions to <kena@cs.colorado.edu>. Answers to common questions will be discussed in class and/or posted to the class website.

Honor Code

Note: This is an individual assignment. Please do not work on or discuss this assignment with other students in the class.