Sei sulla pagina 1di 5

Metropolitan State University, St.

Paul, MN
ICS 141-03 Programming with Objects
Assignment 6
1 Due Date, Goals, etc.
1.1 Goals
To enable the following student outcomes.

Create, compile, test, and debug Java programs using an Integrated Development
Environment (such as Eclipse).

Employ standard Java coding conventions, proper programming style, and ap-
propriate documentation conventions.

Apply inheritance, information hiding, and polymorphism to solve problems.

Apply stepwise refinement and design techniques.

Design and implement object-oriented applications based on problem statements.

1.2 Group Work


You may work in a group of two, but not more. If you plan to work in a group, you
must inform me by April 14. You cannot change your group after that date, but you
may decide to not work as a group at any time.

1.3 Due Date


8:59 AM on April 28, 2017. This is a hard deadline. You cannot submit this late
even if you havent exhausted your grace period quota.

2 The Problem
In this assignment, you will provide a user interface and some additional functionality
using the classes developed for Assignment 5.
I will upload an Eclipse project called PA6 to D2L. This project contains the
following.

A set of classes that form my solution to Assignment 5.

A new class called UserInterface that provides a little more than skeleton
functionality that needs to be completed.

The following is a set of activities that you need to do.

1. Instead of using arrays to store events and tickets in the classes Events and
Event respectively, use the following.
1
private ObservableList<Event> events = FXCollections.observableArrayList();

Change all associated methods of the classes Events and Event appropriately.

2. As given, UserInterface provides an incomplete interface. Take a look at the


video file stored on the D2L site to see what the interface should look like.
Add the necessary widgets to make this happen. I dont mind your making the
interface look slightly different, but the functionality must be preserved in every
respect and the interface must be easy to use.

3. UserInterface needs three ListViews: one for the types of events, a second one
for the list of events, and a third for the list of tickets. I have already provided
the ListView for the types of events. Create the other two. Refer to

http://docs.oracle.com/javafx/2/ui_controls/list-view.htm

for a useful writeup.

4. It should be possible to create concerts, meetings, and plays by using the Create
Event button.

5. It should be possible to issue tickets for a specific play or concert. The maximum
number of tickets that can be sold for any event is 5.

6. Appropriate messages must be displayed when events are created and when tick-
ets are sold.

7. When a specific event is selected, all tickets sold for it must be displayed imme-
diately. For a meeting, the list should be empty.

8. It should be possible to change the description and price factor or fee as the case
may be for an event by clicking the update button.

9. When the window is closed, a file named eventsProceeds should be updated as


described below. The file has just two lines.

(a) Open the file for reading.


(b) Read both lines and store the information in memory.
(c) Close the file.
(d) Delete the file.
(e) Recreate the file with the same name.
(f) Write the first line to show the session number (one more than the previous)
and the total proceeds. A sample line is given below.
Proceeds from session 21 657.8

2
(g) Write the second line to reflect the total proceeds, which is computed by
adding the total proceeds as read from the previous incarnation of the file
and the proceeds from this session. The line may look like this.
Total proceeds so far 2638.2

(h) Close the file.

It is extremely hard to describe every little detail for an interface of this kind. Run
the demo (the video file) and observe how it behaves. This functionality must be
preserved.

3 Goals for Each Week


You have three weeks to complete the assignment. It is a serious mistake to procras-
tinate work. Postponing the work invites the real (and almost certain) possibility of
your not being able to complete the assignment by the due date. Remember that
you cannot submit this late.
The following are the goals I suggest.
By April 14 Add all necessary widgets so the interface is complete. Change the
types in Events.

By April 21 Process all events

By April 28 Complete the file processing.

4 Documentation
Before every class definition, write comments using /** ; give a good description of
the program. Write the comments for an audience that does not know of ICS 141
assignments. You should also give your name in this section and it must be clearly
visible. Remember to do this for every class.
Before each method, write comments using /** briefly describing what the method
does.

5 Coding Conventions
Use the coding conventions as given in the file CodingStandards.pdf (see D2L).
Format the code using the Eclipse standard Java formatting feature. For this, do
the following. (See Figure 1. There is a demonstration video on this in D2L.)

1. In Eclipse, click the menu Window and then click Preferences.

2. Click Java, Editor, Save Actions.

3. Click the options as shown in Figure 1 and click Apply.

Before every override of a method, you must put the @Override annotation.
3
Figure 1: Auto-formatting using Eclipse

4
6 Grading
If your program does not compile error free, you will get a 0 for the assignment. I will
make no attempt to correct any errors and execute the program.
There is a penalty of 5 points for not submitting the work as an Eclipse project.
Members of a group will receive the same grade.
After that, your program will be graded for documentation, coding conventions,
and structure. Please refer to the rubrics for this assignment.

7 Submission
Submit the program as an Eclipse project. For this, do the following. (There is a
demonstration video on this in D2L.)

1. In the Eclipse Project Explorer window, right click on the project.

2. Click on Export. . .

3. In the window for Export, expand General and click on Archive File.
Click Next.

4. In the next window, browse to any folder of your choice and any file name you
wish. Save the file as a zipped file.

5. Upload the zipped file.

If you work in a group, only one member should submit the code. He/she will need to
share the feedback with the other member.

Potrebbero piacerti anche