ICT 4361 — Java Programming Exercise 6

Purpose:

This exercise will familiarize you with file processing, and provide additional experience in text processing in Java.

Our approach will be based on a simple Mad-Libs exercise, suggested by the MIT introductory course to Java, ( MIT OpenCourseWare Java Preparation Course), as begun in the previous exercise.

In this week's exercise, we add a file-parsing front-end on the basic MadLib construct.

There are many ways to extend this exercise.

You can check out Madlibs.org to see how a web front end is added to a similar capability.

What To Hand In:

Please hand in a listing for each program requested, formatted in an easy-to-read style.

Ensure your name, and the name of the file is available in a comment at the top of the file.

Also, ensure that you have a sample of the output from the program.

If your program fails to compile, hand in your error listing as your output.

For each question asked, provide one or two sentences summarizing your answer. Please be both complete and succinct.

Problems:

Begin with your solution—or the sample solution—from last week.
  1. Create a class called MadlibFileReader which has the following methods:
  2. Create a class called MadlibFile which encapsulates a simple main program (not very different than MadHello in many ways):
  3. Create your own MadLib template file, and test your program by running MadlibFile with it

Notes:

Evaluation Criteria:

CriteriaWeight
MadlibFileReader, test, and output35
MadlibFile program and test output35
Your own MadLib template, and its output run30