References Project Deliverable 6

References Project Deliverable 6

CS 1182

References Project Deliverable 6:

Polymorphism

Objectives (From course objectives 1 and 2)

By the time students have completed this module, they will be able to do the following:

  • Design, create, and trace C# code with lists of class instances that exploit the polymorphic properties of objects.
  • Design, create, and trace C# code with simple file i/o.

Deliverable 6 will require you to create a List of Reference objects. When a Book, Chapter, or Journal is created it can be added to the List. Each object in the List is of type Reference. So the list objects can use any of the methods specified in the Reference class, such as formatMPA(), etc. This allows us to use Polymorphism to treat the different objects in the same manner.

1. Begin by creating a new Class named ManageList. The ManageList class will contain a static List of References. The class should also contain a getter or property get to return the static list. Static data will retain its value for all objects that use the data.

2. Add a button with code to the Book, Chapter, and Journal forms to allow the user to add the objected created to the static List of Reference objects.

3. Add a RichTextBox control to the Manage References form to display the static list of references.

4. Add three radio buttons to the Manage References form to allow formatting of the items in the List of References in either MLA, APA, or LibMed format style.

5. Implement IComparable interface in Reference Class. This will required that you implement the CompareTo method to allow a list of Reference items to be sorted. Sort the names by the last name, first name, and initial of the first author in the list.

6. Add code in the Manage References form Activate event, and the three radio buttons CheckedChanged events to first sort the List of Reference items and then add the List of Reference items to the Rich Text Box.

7. Add code to the menu item to print the references to a document file to show a save dialog box and write the items in the RichTextBox to a .rtf file.

Here is an example of adding two books

And how the references would appear in the Manage References for

Create a class diagram

C courses CS1182 Fall2014 OOP and Project Deliverable 6 ClassDiagram1 png

Zip your project file and upload the zipped folder to Moodle Deliverable 6 Submission