Assignment Statement
For this assignment you will complete a portion of the Pizza order system that you used with Assignment
3, but instead of the supplied console-based interface you will build your own GUI interface using
JavaFX. You will need your Pizza, LineItem and IllegalPizza classes.
You do not need to implement all of the functionality contained in the assignment 3 console interface. You
do not need to save or load a pizza order from a file. You do not need to delete lines from the order or
modify the quantities of line items in the order. Here is what your GUI must do:
The user must be able to configure a pizza, following the same restrictions listed in assignment 3, by
choosing a size, and then the cheese, ham, green pepper and pineapple toppings. The user's choices
must be limited to the legal options given with the assignment.
Display the cost of the pizza configured by the user.
The user must be able to specify a quantity of these pizzas and must be restricted to entering an integer
between 1 and 100, inclusive.
Display the cost of this quantity of the configured pizza.
A button is used to save the current pizza configuration and quantity as a line item which is added to the
order being displayed. Instead of displaying the current order to the console, display it in the same way
in a TextArea control. Every time this button is clicked by the user another line item is added to and
displayed in the order.
As the last line in the displayed order, show the total order cost (without tax!).
Your GUI must be "monkey proof". The user must not be able to configure an illegal pizza or supply an
illegal quantity. The user cannot be allowed to edit displayed costs or the displayed order. As you might
expect, every time the program starts the order will be empty. Your GUI should also remain fairly stable
on re-sizing and its operation should be self-explanatory and user-friendly.
You should consider using a stylesheet (*.css) file as well as an FXML file edited by SceneBuilder, but
this is not mandatory. Keep in mind, however, that a strength of JavaFX is its ability to separate
appearance, layout and functionality into different files.
There is no need for Javadoc commenting and you will likely only need a few comments in your
functional code to explain what it is doing.
Submission and Grading Scheme
Submit all of your *.java files to the onQ dropbox including Pizza.java, LineItem.java, IllegalPizza.java
and Main.java along with your stylesheet file, your *.fxml file and your controller file(s), if you used
them. It would be easier for your grader if you built your project with all of these files in the application
package. If you did not do so or would rather just submit a single file, create a zip file of your project's src
folder containing the folder and package structure that you did use.
Sixteen marks, out of 20, are allotted for the proper operation of your GUI as specified above. Four marks
are for the style, efficiency and documentation of your code.
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。