Assignment 4 –Performance Program Generator

Maximum Points = 50

 

 The purpose of this lab is to continue your introduction to the creation of objects and introduce you to Java applets and the Scanner, File, and Applet classes in the Java programming language. In this lab you will write a program that reads data from a file and then generates an applet that displays a program listing the season’s theatrical and musical performances.

 

v    Your program must read the data from a file called schedule.txt [HINT: You will need to use the Scanner class described on page 1018 (example from keyboard on page 157)] and example with a File class described on page 997 (example in CougarView’s Instructor Links and Files in the URL Dissector folder in the Solutions folder.) NOTE: you will need to use a delimiter as illustrated in the example to separate the data components.

v    The data in the file will consist of 6 performances (each performance will consist of a Title/Name, Date, time, location, and cost) where each component will be separated by the hash (#) symbol as shown below:

 

Hamlet#October 17, 2011#7:30 PM#Riverpark Theater, CSU#12.50

Loretta Lynn#November 22, 2011#7:30 PM#RiverCenter#25.25

                                        :

 

v    Your program must include a class that will hold the performance data (complete with constructor(s), get and set methods for each instance variable, and a toString method that returns the contents of the instance variables)

v    Once your program has collected the data, you need to display the schedule listing the six performances using the Applet class described on page 991 (examples on page 63 and http://csc.columbusstate.edu/summers/NOTES/JAVA.HTM) [NOTE: that Applets use a method init instead of the main method]

v    Your schedule should have a title at the top in a larger font (and possible different font face and color) along with a graphic. The six performances should be organized and displayed “appropriately” [more than just listed in a column].

v    List somewhere on the “page” the total cost if you bought a season pass (tickets for all six performances).

 

EXTRA CHALLENGE: add images.

 

Make sure that your program uses proper indentation and complete documentation. See http://csc.columbusstate.edu/summers/NOTES/1301/style.htm for guidelines.

The program heading should occur at the top of the program and should include:

               /**
                * PROGRAM SPECIFICATIONS
                * NARRATIVE DESCRIPTION:
                *
                * @author (your name) 
                * @version (date)
                */

 

  (Due before class on Wednesday, October 12, 2011) Submit a .doc file containing the UML class diagram showing inheritance for all the classes used in your program and your timesheet documenting your time. [10 pts]

 (Due before 8 am on Wednesday, October 19, 2011) Submit your .java files containing your program and your timesheet documenting your time to the dropbox in WebCT..

 Grades are determined using the following scale:

Grading Rubric  (Word document)