The development of the Hurtz point of sale system is divided into three phases: Phase I: -- The GUI -- In this series of programming assignments, the student will be responsible for constructing the GUI elements (without meaningful behavior). The goals of these assignments will be to familiarize students with some of the common GUI controls (JTextField, JButton, JComboBox), to become capable of using/manipulating layout managers to arrange components on the screen, and to be proficient handling GUI events (button clicks, etc). Materials supplied to students: ------------------------------ Application Demo GUI Screen shot Class lectures that apply to this section: ----------------------------------------- 1,2 - Swing basics, GUI components 2,3 - Layout managers 3,4,5 - Layout managers, event handling 6 - Exceptions Assignment: ----------- Create HurtzAgentTerminal main() class Create SearchFrame top-level frame class (contains CriteriaPanel, ActionPanel, ResultsPanel) Create CriteriaPanel panel class with GUI layout & reasonable values Create ResultsPanel panel class with GUI layout only Create ActionPanel panel class with GUI layout Notes: [1] EC Opportunity with presentation (Animation/Sound,ResultsPanel,Menus...) [2] All student classes in this portion in edu.cod.cis218.client; GUI state model: Initial / After Reset: Criteria panel with default values, results panel clear, Rent button disabled. After successful search: Criteria panel continues to show user selections, results panel displays attributes of matching vehicle, Rent button is enabled. After rent: Criteria panel continues to show user selections, results panel displays attributes of matching vehicle, results of operation are displayed to user (student option). If the Rent operation was successful, the Rent button should be disabled. This phase should be complete roughly two weeks prior to the midterm. Phase II: -- The Database -- In this series of programming assignments, the student will adding GUI functionality (creating the Criteria object from the data specified and validating that Criteria), as well as complete the database utility that is used to create the "inventory database". The instructor provides a utility class includes createRandomCar(), and the student is responsible for creating the HurtzDBCreator class that creates and saves the cars to a file. The goals of these assignments are for students to become comfortable dealing with application exceptions, and performing console and file I/O. Also, a side lesson in defensive programming is taught with database utility command line args (no args prompts user for file name to save, and number of cars to create; filename and count can be specified in command line for non-interactive operation, but order is important). At the end of this phase, the student should have a working version of the program that searches for cars in a local inventory data file. Materials supplied to students: ------------------------------ Criteria CriteriaImpl w/ list of acceptable values in Doc Car CarImpl HurtzDataUtility (with Car[] createRandomCar() already implemented) AbstractHurtzSearchEngine Class lectures that apply to this section: ----------------------------------------- 6 - Exceptions (IOException) 7,8 - File I/O Assignment: ----------- Make ActionPanel's "Reset" button clear CriteriaPanel Add the functionality to the CriteriaPanel class to wrap up the user selections as a Criteria object so that the rest of the application can use that to perform the search. Add the functionality to the ResultsPanel to display a Car that was found by the search. Create a derived class HurtzTempSearchEngine of AbstractHurtzSearchEngine that uses HurtzDataUtility to create some random cars which it holds in memory. Use this class (HurtzTempSearchEngine) to test your event handling, criteria collection and results presentation *prior* to implementing the file-based search engine. This event handling is described below: Complete the event handling for Search and Rent buttons in the ActionPanel class using this HurtzTempSearchEngine. When the user clicks the Search button, the criteria that they have specified should be packaged as a CriteriaImpl object, and sent to the search engine using the search engine's findCar(Criteria) method. That method will return a Car object if one matches the Criteria. That car should be displayed in the ResultsPanel. When the user clicks the Rent button, the current car (i.e. the result of the last successful search, if any) should be passed to the searchEngine's removeCar(Car) method to be removed from active inventory. Remove car has a boolean return value that indicates whether its operation was successful. You should check that value and display some status information back to the user. Once that is all working with an in-memory search engine, you can proceed: Now ... Create a class, HurtzDBCreator that uses HurtzDataUtility to create cars, and then saves them to a file. The first command line parameter that HurtzDBCreator accepts should be the name of the file to create. The second should be the number of cars to put in the inventory. If no parameters are supplied, the user should be prompted for this information. HurtzDBCreator should be a console (command line) application that uses Object Serialization to save the cars to the data file. Create a derived class (HurtzFileSearchEngine) of AbstractHurtzSearchEngine that reads the file created by the HurtzDBCreator class, and uses the data in it to populate its inventory. Substitute the HurtzFileSearchEngine for the HurtzTempSearchEngine and verify that the application continues to work as specified. Notes: The first part (using the HurzTempSearchEngine) should be completed around the time of the midterm. The second part (using the HurztFileSearchEngien) should be completed within a week and a half after the midterm. Phase III: -- The Server -- In the final series of programming assignments, the student creates a server process that accepts requests from the client of two sorts: search, and rent. Search requests are accompanied by a Criteria instance, and the server returns a Car instance if one is found that matches the criteria. Requests to Rent are accompanied by the Car instance the user wants to rent. The server removes that car from the inventory, and returns a Boolean signifying whether or not the operation succeeded. Removing a car from inventory fails when the car to be removed is not found in the inventory. The goals of this phase are to introduce the student to network programming and Collections. At the end of this phase, the student should have a full client/server rental car POS application which can be deployed on multiple machines. Materials supplied to students: ------------------------------ None Class lectures that apply to this section: ----------------------------------------- 11,12 - Network programming 12,13 - Threads 15,16 - Animation & Sounds (EC) 17,18 - Data structures 19,20 - Collections Notes: [1] EC Opportunity in CarImplServer MT Assignments: ----------- Create CarImplServer. This class should be a console application that takes the following parameters: the port number to listen on, and the inventoty data file to use. The minimum requirement is for CarImplServer to accept multiple *serial* connections from clients (i.e. one client processes, disconnects, and then another client can connect), and that each client connection should service multiple requests. Change client to talk to server instead of local SearchEngine. The client should connect to the server once (not each time a search or rent operation is performed), unless the connection is lost. The client should notify the user if the connection is lost, or if some other error occurs while communicating with the server (required). For maximum credit in this part of the assignment, the client should attempt to re-establish communication on the next operation (search/rent), and repeat the cycle if necessary. Minimum work by student: edu | + cod | + cis218 | + client | | | + HurtzAgentTerminal | + SearchFrame | + CriteriaPanel | + ResultsPanel | + ActionPanel | | + server | + HurtzTempSearchEngine + HurtzFileSearchEngine + HurtzDBCreator + HurtzRentalServe