Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

FIT2034

Computer Programming 2

Semester 2, 2014

Major Assignment: Auction House Management System

Objectives

The purpose of this assignment is to assess your progress towards attainment of a selection of the learning objectives from study guides 1 to 10, and to give you practice at solving a larger, more   integrated problem, from scratch.

On successful completion of this assignment you should have demonstrated that you are able to:

•   write classes with instance and class-level attributes and methods

•   encapsulate data, state information, and behaviours within an object.

•   write programs consisting of multiple classes which interact to fulfill some functional specifications

•   use a variety of API classes which perform input and output using both the text console and files using a variety of techniques

•   use ArrayList objects, to manage a simple collection of objects and/or primitive data values

•   handle caught exceptions in an appropriate manner

•   perform simple formatting of data for output

•   create a GUI that provides interactivity

The assignment may cause you to demonstrate that you have attained other learning objectives; the above list is not necessarily exhaustive. However, we are not expecting you to demonstrate             attainment of learning objectives of study guides 11 or 12.

Overview of Assignment Task

You have been asked by your client to create a software program that will assist them in the day-to- day operations of their Auction House. The Auction House runs Auctions on a number of different items from Art to Jewelry to Automotive and Property. Each item up for Auction belongs to a          different Collection, each Collection is auctioned off on a certain date. Buyers may place bids on     items in a Collection before the auction date but after the auction date the items within the                collection are sold to the highest bidder.

For the initial version of the software the client has requested the following functionality:

•   The ability to create different items (called Consignments) both within the program and loaded from an external data source.

•   The ability to create a Collection and to add Consignments to the Collections.

•   The ability to create and store data about their Buyers.

•   The ability to set the current highest bidder and increase the bid amount of a Consignment.

•   The ability to End a Collection and generate a report detailing which items were sold to which Buyer and for how much.

•   The System should save itself upon shutdown and reload the data in the same state.

Data Requirements of the System

The System you develop will need to store a variety of different data. To do this you should create a number different data classes, these classes are outlined below:

DR1  The Buyer Class

The first and simplest objects within the system are the Buyers. The client currently gathers the  following information about the Buyers: Their name, their address, their phone number and their email. Write a simple Java class to represent the Buyers within the system.

DR2  The Consignment Class Hierarchy

The client has informed you that all of the Consignments they Auction fall into four categories: Art, Jewelry, Automotive and Property. Every Consignment consists of a Name, a Current Bid amount,  a reference to the Buyer who placed the current bid and a brief description of the object. In addition to that basic information the following is stored for each different type of Consignment:

•   Art Consignments also store the name of the Artist, the Length, Width and Height of the piece and the year it was created.

•   Jewelry Consignments also store the type of metal used, information about the Gemstones in the piece and the country of origin.

•   Automotive Consignments also store the Make and Model of the vehicle, the year it was made and the number of kilometers it has driven.

•   Property Consignments also store the address of the property and the architectural style of the building.

Write a set of Java classes to represent the hierarchy of the Consignments, be sure to utilize inheritance.

DR3  The Collection Class

The client groups their Consignments up into Collections. A Collection is made up of a Name, and a List of Consignments. The Collection class should also be able to generate the report that details which items were sold to which Buyer and for how much.

Functional Requirements of the System

After the initial data classes are created the next step is to focus on the functionality of the System. The overall presentation of the System will be a Java GUI implemented via Swing and AWT. The overall design and look of the GUI it up to you. The client wants the following functionality           implemented:

FR1  The Buyer subsystem

One screen in the application should allow the Users to add and remove Buyers. It should also      display a list of all of the current Buyers within the System. When the User selects the Add Buyer option it should add a buyer to the list based on the information entered. When the User selects     remove Buyer it should remove the selected Buyer from the list.

FR2  The Collection subsystem

The next screen of the system is used to manage the Collections of Consignments. This screen will display a list of the current Collections within the system and will contain three options. The first   will be an option to create a new collection from scratch. This option will prompt the user for the   name of the Collection and create an empty Collection with that name (and add it to the list).

The second option will create a Collection based on existing data. The System will open a text file   named collection.txt” contained within the program root directory that will contain the name of the collection and the information about all of the Consignments within the collection (for more            information about the data structure of this file see Appendix A).

The final option should take the user to the Consignment Management subsystem (see FR3)

FR3  The Consignment Management System

The Consignment management system will display a list of all of the Consignments within a           Collection. The Users will be able to select a Consignment and increase the current bid amount and set a Buyer as the current highest bidder.

Users will also have the ability to manually add a new Consignment to the collection. This option  should show a Window that will allow the users to select the type of Consignment and enter the     information about the Consignment. Once all of the info is added the the new Consignment will be added to the Collection.

This screen will also have an option to end the collection. Once this option is selected the Collection is marked as ended and no more bids can be made, the final Auction report will also be displayed.    This report will outline each item and state the amount it sold for and the name of the buyer to          bought it.

FR4  Data Persistence

The system should ensure that the state of the program is correctly saved before the program is       terminated and correctly reloaded when the program starts. This should be achieved through binary file serialization.

Other Requirements (for Assessment)

The following are some requirements about what you must demonstrate that you have understood from your studies:

Coding Requirements:

1.   You must make use of the technique of object serialization

2.   You must make use of input from a plain-text file

3.   You should use the GUI components for user-input

4.   You should use the ArrayList class and/or plain arrays in your program

Other Specific Requirements:

5. Exception Handling and Validation

You are expected to handle exceptions that are thrown by Java API classes. The system should not   die, but should report a description of the error situation that has arisen, and where possible allow     the user to continue using the program. The key aim of this is so as to not lose any unsaved changes.

Additionally, for the classes you create, validation should be performed. In any case where an invalid instruction is attempted, you should generate and throw an exception. Some of the       assessment will be checking to see if you have made appropriate decisions as to what things to generate exceptions for.

Clarifications

If you require anything to be clarified, ask you tutor or post a question to the Moodle discussion      forum. However, do not post any code to Moodle which could be part ofyour final solution, and do not tell people how to solve the task. Only lecturers can choose whether to give additional hints.

Submission Requirements

Assignments must be submitted to Moodle on or before the due date.

You are to create a ZIP file containing just the .java files which form your system. Do not place them in any sort of folders. Do not include the provided datafiles.

You should not submit any data files though, as the marker will be using their own files (see Appendix A).

The work submitted must be your own work. The marker or your tutor may ask for a follow up interview after you have submitted if deemed necessary.

Appendix A  Supplied Files

You are supplied with one data file containing the data of one Collection:

Note that the data file shows you the expected format of the data. This format is as follows:

Collection

Number of items

A list of each consignment item in the following format:

ART

Name

Description

Artist name

Length

Width

Height

Year

JEWELRY

Name

Description

Metal

Gemstone

Country

AUTO

Name

Description

Make

Model

Year

Kilometers

PROPERTY

Name

Description

Address

Style

NOTE: it is possible that we will be testing your application with data files other then the ones we   provide. As long as the data files we used conform to this format we expect your application to load them correctly, so be sure to test your program with different files.