COP3022: Java Programming
Programming Project # 6
See Dropbox for due date
Develop a Java program that uses:
• Graphical User Interfaces
• Java Components such as JButtons, and JPanels
• Event Handlers such as ActionListeners.
Java zyBook Chpt 1 - 14
Create a java graphics program that displays an order menu and bill from a Sandwich shop, or any other establishment you prefer. In this program the design is left up to the programmer however good object oriented design is required. Below are two images that should be used to assist in development of your program. Items are selected on the Order Calculator and the Message window that displays the Subtotal, Tax and Total is displayed when the Calculate Button is pressed. You can also combine the two functions in the same panel if you wish.
NOTE: USE OF A GUI BUILDER (DRAG AND DROP COMPONENTS) IS NOT ALLOWED.
1. Develop a project that provides the functionality show in the images above.
2. The type of shop, items offered and cost is up to the designer. However each item must have a different cost and the final calculation must be correct.
3. The images display the minimum requirements, however the following is a list of those minimum requirements.
1. Welcome panel with the shop name and three item panels with panel labels.
2. At least one set of Checkboxes that allows multiple selection and one set of Radio buttons that are mutually exclusive.
3. A Panel that holds the calculate and exit button
4. A popup box or separate panel that displays the cost of the selections and the tax. Note the tax must be calculated after the items are selected.
1. Create a project that is object oriented, therefore there should be several classes.
2. Each student should think about this project and create a design.
3. Create a UML Class diagram that shows all the classes in your project.
1. The class diagrams should be created in at multiple iterations.
1. The first series of iterations should be done before you code and should provide a design that the code follows.
2. The second series of iterations should be completed after the code is complete and should reflex the EXACT class structure of you final program.
3. The class diagrams should include
1. Access specifier (- or +).
2. All instance fields with type.
3. All methods with return type and parameter types.
4. Associations, Generalization (Inheritance) and Aggregation and Multiplicity
5. Stereotyping – Interface or Abstract Classes.
4. Create a word document explaining the differences and the rational behind the differences between the final result of the two series of iterations. A difference is expected as it is extremely difficult to anticipate every design characteristic prior to coding.
4. Below is an outline of possible structure of the program. This is a basic outline and does not address all the required details. You may want to think about your design first before reading the suggested structure below.
1. Create a separate class for each Panel except the button panel.
2. Create an Order Calculation class.
1. Extends JFrame.
2. Instance fields are objects of the Panel types.
3. Adds the Panels to the JFrame using a Boarder Layout
4. A method to create the Button Panel (Calculate and Exit)
5. Two inner ActionListener classes that handle the button actions.
3. A class that contains the main method and simply creates the Order Calculation object.
1. Follow the submission requirements of your instructor.
2. You should turn in
a. All your .java with javadoc included.
b. The UML Class Diagram that is used to Design the program.
c. The UML Class Diagram that is completed after the program is finished and exactly reflexes your program’s Class Structure.
d. A word or other readable document explaining the differences and the rational behind the differences between the final result of the two series of iterations. A difference is expected as it is extremely difficult to anticipate every design characteristic prior to coding.
e. Remember to compile and run your program one last time before you submit it. If your program will not compile, the graders will not be responsible for trying to test it.
• Projects will be graded on whether they correctly solve the problem, and whether they adhere to good programming practices.
• Projects must be received by the time specified on the due date. Projects received after that time will get a grade of zero.
• Please review the academic honesty policy that you signed at the beginning of the semester. Note that viewing another student's solution, whether in whole or in part, is considered academic dishonesty. Also note that submitting code obtained through the Internet or other sources, whether in whole or in part, is considered academic dishonesty. All programs submitted will be reviewed for evidence of academic dishonesty, and all violations will be handled accordingly.Attachments