javafx programming

Homework Assignment

Without using the Scene Builder, implement an application using JavaFX that stacks the cannon balls.The cannon balls are name-colored.The requirements for this assignment are listed below:

  • The cannon balls are to be painted with one of these colors:
    • AQUA
    • BLACK
    • BLUE
    • CORAL
    • GREEN
    • GREY
    • RED
    • WHITE
    • YELLOW
  • The cannon balls are drawn with the black solid-line strokes with the width specified by the user.
  • The application will have a menu bar on top with two menus, File and Setup.
  • The File menu has the only one menu item, Exit.When selected, the Exit menu item will terminate the application.
  • The Setup menu has two menu items:
    • Configure Pyramid… – When selected, this menu item will display the below dialog.The user can specify the name of the pyramid, the height of the pyramid, and the stacking order (LeftJustified, Center, RightJustified) of the cannon balls.The default values are:
      • Name: MyPyramid
      • Height: 5
      • Order: LeftJustified
    • Configure Cannon Balls… – When selected, this menu item will display the below dialog.The user will be able to specify the radius in pixels to draw each cannon ball, the color of the cannon balls, and the stroke width in pixels to draw a back solid-line around each cannon balls.The default values are:
      • Radius:50
      • Stroke Width:1
      • Color:BLUE
  • The settings for the pyramid and cannon balls must be defined separately.In other words, there must be separate classes defined for the pyramid settings and cannon ball settings.
  • The cannon balls are drawn in the drawing panel.They are stacked on each other based on the specified stacking order.
  • The drawing panel is scrollable.The horizontal and vertical scroll bars will appear as needed.
  • The drawing panel has borders.
  • There is the status message/bar which displays the pyramid height and the stacking order.
  • Sample screen shots are included below.