CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of...

6
CSE 1325 Project Description 7/28/16 Page 1 of 6 Das CSE 1325 Summer 2016 Object-Oriented and Event-driven Programming (Using Java) Instructor: Soumyava Das Graphical User Interface (GUI), Event Listeners and Handlers Project IV Assigned On: 07/28/2016 Due on: 08/10/2016 (before 11:55pm) Submit by: Blackboard (1 folder containing all the files/sub-folders) https://elearn.uta.edu/ Weight: 15% of total Total Points: 100 You should read the whole document BEFORE starting your design. To help you, added material has been highlighted in this color. Overview of all projects: This is the fourth of the 4 projects over the semester; you will develop an application that captures the operations of an enterprise. The scope of the project will include modeling the components of the enterprise as described in here, choosing the data structures, algorithms, and other aspects of managing information. You will develop a GUI along the way in one of the projects (most likely in project 4). Problem (project 4): The goal of this project is to add a meaningful GUI to the design of the MavBuy project (from project 3). The GUI will be used for managing various aspects of MavBuy and to display useful information using the menu. Exception handling, where applicable, should also be incorporated from this project onwards. Please make sure that you adhere to the OO principles (taught in the lectures and the book) throughout the design and implementation phases. The projects, though small and tailored to the available timeframe, are designed to give you an opportunity to understand and exercise specific OO principles, taught in the course, for each project. Remember, Java is only a vehicle for supporting OOD. Make sure you fully and properly understand and leverage the features available in Java for your design. You will also use UML for your design. In this project, you will be augmenting the design of project 3 by adding a GUI using which all interaction will be done including input error handling. Your project will utilize all the classes and interfaces (designed and provided) from Project 3. You will be adding new classes related to GUI. The following classes developed in Project 3 will be used:

Transcript of CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of...

Page 1: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 1 of 6 Das

CSE 1325 – Summer 2016 Object-Oriented and Event-driven Programming (Using Java)

Instructor: Soumyava Das Graphical User Interface (GUI), Event Listeners and Handlers

Project IV

Assigned On: 07/28/2016 Due on: 08/10/2016 (before 11:55pm) Submit by: Blackboard (1 folder containing all the files/sub-folders) https://elearn.uta.edu/ Weight: 15% of total Total Points: 100 You should read the whole document BEFORE starting your design. To help you, added material has been highlighted in this color. Overview of all projects: This is the fourth of the 4 projects over the semester; you will develop an application that captures the operations of an enterprise. The scope of the project will include modeling the components of the enterprise as described in here, choosing the data structures, algorithms, and other aspects of managing information. You will develop a GUI along the way in one of the projects (most likely in project 4). Problem (project 4): The goal of this project is to add a meaningful GUI to the design of the MavBuy project (from project 3). The GUI will be used for managing various aspects of MavBuy and to display useful information using the menu. Exception handling, where applicable, should also be incorporated from this project onwards. Please make sure that you adhere to the OO principles (taught in the lectures and the book) throughout the design and implementation phases. The projects, though small and tailored to the available timeframe, are designed to give you an opportunity to understand and exercise specific OO principles, taught in the course, for each project. Remember, Java is only a vehicle for supporting OOD. Make sure you fully and properly understand and leverage the features available in Java for your design. You will also use UML for your design. In this project, you will be augmenting the design of project 3 by adding a GUI using which all interaction will be done including input error handling. Your project will utilize all the classes and interfaces (designed and provided) from Project 3. You will be adding new classes related to GUI. The following classes developed in Project 3 will be used:

Page 2: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 2 of 6 Das

General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest class – concrete class 2. Employee as abstract class 3. Other classes: Agent, Accountant, Items, Customers etc. as per your design in

project 3

Input and code for reading input will be same as project 3. Example code for writing output will also be provided (same as given for project 3). Specifically for this project: You will design and implement a graphical user interface for project 3. All output will be shown in one of the windows of the GUI. Inputs for commands which will also be part of the GUI will be taken from the GUI as text inputs in a window or as selection of drop-down menus or some other form. Once the input data file (containing the menu) is finished, the interface will come up and all further interactions (choosing a command, input and output) will be through this GUI. You may still write your output to the output file as in project 3.

What you need to accomplish in this project (and will be graded on). You will use project 3 to process all the commands and then start the GUI: A. You will design a GUI (as a separate class which extends one of swing classes (most

likely JFrame) that will accomplish the following. The GUI should: Have at least two of the following containers. Make sure you specify the ones you have used in the comments and in java documentation

i. JFrame ii. JLayeredPane iii. JList iv. JPanel v. JTabbedPane

Make meaningful use of at least 4 (or more as needed) of the following GUI components:

i. JButton ii. JCheckBox iii. JCheckBoxMenuButton iv. JComboBox v. JLabel

Page 3: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 3 of 6 Das

vi. JRadioButton vii. JRadioButtonMenuItem viii. JTextArea ix. JTextField x. JMenu xi. JMenuItem xii. JOptionPane xiii. JPasswordField Use at least 2 of the following layout managers for designing the GUI: i. BorderLayout ii. BoxLayout iii. GridLayout iv. FlowLayout v. GridBagLayout vi. CardLayout

B. You should be able to perform the following basic operations through your GUI.

[Hint: You may design a separate JPanel for each of the operations shown below or use a tabbed pane or something that clearly prompts the user for what needs to be done]

a. Show employees (all types), Items and Customers (as buttons, tabs, or separate panels or scrollable lists of id’s)

b. Execute, one at a time, a list of commands (shown below in section C) with respect to a chosen item in a.

c. Accept appropriate input (shown below) from the user to execute each command and handle exceptions in case of incorrect inputs or provide a list to choose from. You can avoid errors in input by providing proper choices to choose from

d. Display the formatted output for each command in a scrollable (or a separate) output window.

e. All input/output is from GUI only after reading the data file.

C. Your program should display and execute the following commands (accept appropriate inputs from the GUI or be able to select an input for each command from the GUI). I. Show Details

Input: Allow user to make a single (optionally multiple) selection from – employees, items, and customers.

Page 4: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 4 of 6 Das

Action: Retrieve corresponding data from objects from the system Output: Display the corresponding details in a meaningful manner (for example, for employees show all employees with their type, date of hire and date of release (if present); for item types, show their details, and for customers show all customers with their status

II. Show items sold Input: choose an item type from the list or accept as input Action: retrieve item sale information Output: Display sales of that item (e.g. FZ-35) and the total revenue generated. Optionally, you can also organize along year and subtotals for each year as well as the total. This will help understand the interest of customers for item types

III. Show total revenue for the data set Input: choose a year or ‘all’ as input. Action: compute total revenue for year or all by each category Output: display the revenue generated for that year or for all the data set

IV. Display employees (an agent or accountant or web designer) who have been

with MavBuy the longest Input: none Action: compute the oldest member using the Date class method. You can find one of the oldest without sorting. Optionally, you can sort and display all oldest clients if more than one. Note that there may be multiple oldest! Output: Display appropriate employee (or employees) details

V. List purchase details Input: year and customer id Action: Display items to a single customer Output: For each given customer id show the individual items bought by the customer in that particular year along with the quantity and price (customer portfolio)

Page 5: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 5 of 6 Das

VI. Display customers who have spent the highest and lowest amounts by year Input: year Action: compute the total amount spent by each customer and compute the highest and lowest values Output: Display customer names with highest and lowest amounts spent along with the year

Make sure that proper error checks, error messages as appropriate are given for the above. For example, you cannot buy an item that does not exist; you cannot list items for a non-existent customer, etc.

Coding Style: Be sure to observe standard Java naming conventions and style. These will be observed across all projects for this course, hence it is necessary that you understand and follow them correctly. They include:

a. Class names begin with an upper-case letter, as do any subsequent words in the class name.

b. Method names begin with a lower-case letter, and any subsequent words in the method name begin with an upper-case letter.

c. Class, instance and local variables begin with a lower-case letter, and any subsequent words in the name of that variable begin with an upper-case letter.

d. Each set of opening/closing curly braces must be in the same column. All user prompts must be clear and understandable

e. Give meaningful names for classes, methods, and variables even if they seem to be long. The point is that the names should be easy to understand for a person looking at your code

f. Your program is properly indented to make it understandable. Proper matching of if … then … else and other control structures is important and should be easily understandable

g. Do not put multiple statements in a single line h. All static final variables will be upper case identifiers i. Please use a main method in each class for unit testing that class

In addition, ensure that your code is properly documented (apart from javadoc commands) in terms of comments and other forms of documentation wherever necessary.

Page 6: CSE 1325 Project Description4.pdf · 2016-08-07 · CSE 1325 Project Description 7/28/16 Page 2 of 6 Das General description of the problem (applicable to all projects) 1. The MavBuy/MavBuyTest

CSE 1325 Project Description

7/28/16 Page 6 of 6 Das

Grading Scheme: The GUI project will be graded using the following scheme (total) 100

1. Class, fields, and method design, proper use of use of Swing components, event handling using OO principles 35

2. Correctness of the implementation of GUI components 20 3. Correct execution of the overall program 35 4. Look and feel & Ease of use (TA's decision will be binding) 10

Correct design, implementation, and execution of the program constitute a significant percentage of the grade. Please make sure it works correctly before you submit it. We reserve the right to question you about the details of your implementation and testing to make sure you have indeed designed and implemented the project. What and How to Submit: For this project, you will submit the following using the naming convention suggested below:

1. Each .java file will contain one or more related classes

All of the above files should be placed in a single zipped folder named as - ‘Proj4_firstname_lastname_final_setion.zip’. The folder should then be uploaded using blackboard using your login. Note that blackboard will not permit you to submit after the deadline [11:55 pm] has passed. Please login and familiarize yourself in using blackboard. Please make sure you press the SUBMIT button to make sure the project is submitted. For this project, we will execute and test your submitted code on TA’s laptop or a PC. If we have any problems in executing it, we will contact you. You can opt to give a demo for the GUI project to the TA in the class hours on 11th August.