P6.Fall2005 - Program#6 COP 2551_706 Fall 2005 Note This...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Program #6 COP 2551_706 Fall 2005 Note: This program will be run using the JGrasp IDE in a Windows environment. This will use: STRINGTOKENIZER; EXTERNAL FILES; ARRAYLIST OF STRINGS AND OBJECTS. ITERATORS, EXCEPTION HANDLERS Objectives: Gain additional experience using multiple classes To gain experience with sorting objects To gain additional experience processing arrays of objects To gain experience with inheritance To gain experience using abstract classes To gain experience using polymorphism To gain experience with Exception Handlers (optional; extra credit) To gain more experience with UML and program design using classes . Background : Consider program in your text at the end of Chapter 8 on Inheritance. It reads: Design and implement a set of classes that define various types of reading material: books, novels, magazines, technical journals, textbooks, and so on. Include data values that describe various attributes of the material, such as the number of pages and the names of the primary characters. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes. We will use this basic thinking to define a closely related programming assignment that is a bit more challenging and include some materials from Chapter 10 on exception handling and reading text files. Overview : Using records from an input file that you create (records provided ahead), you are to create three arrays of objects. Each array of objects are arrays of different types of books. You are to display each of these lists, sort each array of objects, and then display the arrays of types of books again. In a little more detail, you will need to access the external file, read in records, access individual fields, determine the appropriate array the input data should be put into, build the arrays of different types of books, sort them based on author, and display these lists with appropriate headers. If you elect to accommodate the Exception processing, your input stream will contain a couple of records containing errors. In this case, you will need to catch these exceptions and process them accordingly (ahead). (You may remove the two records containing errors, if you wish. Exception processing may be undertaken for extra credit.). If this is your choice, then the file you create should contain no errors dealing with the data itself. No editing of input fields will be necessary. Of course, any I/O can generate an IOException,, as you are aware from Program #5. PROCESSING
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/26/2011 for the course COP 2551 taught by Professor Roggio,r during the Summer '08 term at UNF.

Page1 / 5

P6.Fall2005 - Program#6 COP 2551_706 Fall 2005 Note This...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online