Assignment 5 –Selective Performance Program Generator

Maximum Points = 50

 

 The purpose of this lab is to continue your introduction to Java applets and the Scanner, File classes and conditional (decision) statements 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/or musical performances. This assignment builds on Assignment 4.

 

v  Your program must read the data from a file called schedule.txt

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

 

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

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

                                                :

 

v  Your program must include a class that will hold the performance data that (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  Your program will then ask the user whether they want to purchase tickets to 1) only musical performances, 2) only theatrical performances, or 3) both types of performances [HINT: you can use JOptionPane pop-ups]

v  Once your program has collected the data, you need to display the schedule listing the selected performances using the JApplet class. [Note that there may be between 0 and 10 performances selected.]

v  Your schedule should have a title at the top in a larger font (and possible different font face and color) along with an appropriate graphic image of your choice for musicals, theater, or both. The 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 selected performances). Provide a 10% discount for those selecting both musical and theatrical performances.

 

EXTRA CHALLENGE: instead of JOptionPane, use a GUI feature (Buttons, RadioButtons, Checkboxes, Lists) [see example: http://csc.columbusstate.edu/summers/NOTES/Cs463/graphics.html].

 

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 8 a.m. on Wednesday, October 26, 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 a.m. on Wednesday, November 2, 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)