Answered You can hire a professional tutor to get the answer.

QUESTION

Object Input/Output Streams Create JavaFX small order form GUI for T-Shirt.

Object Input/Output Streams

 Create JavaFX  small order form GUI for T-Shirt. The information entered into the form must be 'preserved', that is, after you save it, and restart the app, the form should display with the information entered previously. Save the information in an entity object, and serialize it. When the app starts, if will de-serialize the object and use it to populate the form.

The first step is to create the entity object. The TShirt class with 3 attributes: size, text, and gift. We want this object to be serializable, so make sure it implements the required interface. ( As shown in the attachment opt)

Next, create the following GUI(as show with attached file GUi). The radio buttons should be grouped so only one is selected at any one time.

When the save button is selected, you will read the data from the form and call the setter methods on your entity object. Then, you will serialize your tshirt entity object it to the current directory.

When your JavaFX app starts, it needs to deserialize the TShirt entity object and call the getter methods to set the form controls. Keep in mind that the entity object may not exist ( which is certainly true the first time). In other words, make sure that you have de-serialized a object before you use it to populate the GUI controls.

  • Attachment 1
  • Attachment 2
importimportimportimportimportimportimport java.io.FileInputStream;java.io.FileNotFoundException;java.io.FileOutputStream;java.io.IOException;java.io.ObjectInputStream;...
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question