Part 2 Object InputOutput Streams For this exercise you will
Part 2 Object Input/Output Streams
For this exercise, you will use JavaFX to create a 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. To do this, you will 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.
Details
The first step is to create the entity object. An entity object is just a plain old java class -- nothing fancy. It has some attributes, and the appropriate getters/setters. Here, we have a TShirt class with 3 attributes: size, text, and gift. We want this object to be serializable, so make sure it implements the required interface.
Next, use your new JavaFX knowledge to create the following 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.
Solution
In modular arithmetic the set of congruence classes relatively prime to the modulus number, say n, form a group under multiplication called the multiplicative group of integers modulo n. It is also called the group of primitive residue classes modulo n. In the theory of rings, a branch of abstract algebra, it is described as the group of units of the ring of integers modulo n. (Units refers to elements with a multiplicative inverse.)
