P5.mod3.Fall2005

P5.mod3.Fall2005 - Program #5 File I/O; Arrays of Objects;...

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

View Full Document Right Arrow Icon
Program #5 File I/O; Arrays of Objects; Iterators, Simple Sorts COP 2521_706 Fall 2005 – 11/6/05 Note: This program and all remaining programs will be run using the JGrasp facility included as a CD with your textbook. The details of the turning will be discussed ahead. Objectives: Gain experience using multiple classes To gain experience with StringTokenizer (inputting multiple items at one time) To gain experience reading input from an external file and more Java I/O To gain optional experience with ArrayList for dynamic array length (a very nice feature of Java) To gain experience with single and two-dimensional arrays, and arrays of objects To gain more experience with the toString methods To gain experience writing a larger program and learning how to solve a larger problem. To gain experience using an On 2 sort of your choice (interchange or exchange). Background : Study the programs on Quizzes and Questions and Answers and Complexity. Consider also the UML class diagrams we have had so far including comments on your last UML design from Program 4. Also, you will need to study the StringTokenizer class and its methods. I will present an approach to accessing your external file in JGrasp. Program 5 is an extension of these ideas plus some good work on arrays, ArrayList (optional), and traditional arrays. Please study this assignment carefully so we can answer any questions you might have. This assignment is a reasonably hefty one and has a number of parts. The key, of course as always, just do a LITTLE bit at a time , verifying as you go…I will provide hints during class as it is almost an imperative to develop this programming assignment incrementally. Objects of the Question class – created by the MiniQuiz class, which contains our static main method, created objects by passing questions and answers to Question as well as setting the complexity for that questions. We will modify this to include arrays…and more. Given this backdrop – and BE SURE to study these examples FIRST – our job is to meet the practical requirements discussed below. 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
1 . Introduction . You need to create an array of objects – one object for each quiz. You are to obtain the data used to create each object from a file called quiz . txt . You should call this array of objects that you create from the input file quizbank . Each object in the array will have a question, answer, and initial complexity level. Despite the fact that I
Background image of page 2
Image of page 3
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

P5.mod3.Fall2005 - Program #5 File I/O; Arrays of Objects;...

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

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