1. You will have two classes with main methods each and one class
MyClassToBePersisted.
2. You run the serialize class to make a file project.ser
3. You run the deserialize to read the file data.

re: Step 1. Profile and School. Yes but ArrayLists and String classes
that are encapsulated in the MyClassToBePersisted.

re: Step 2. Properties, Fields, Attributes, They are all just about
the same meaning here. You need data so you set your data up in fields/
properties of the class to be persisted. When you get to databases
programming you will understand what a persistence unit or class or
bean is. It is just a getter, setter class that has the names of the
variables you want to get data from. They are just variables here that
are pre-named or hard coded.
Yes the one static final long is serialVersionUID or the version
control Id you mentioned in 2.
Just try to understand the program you are basing this one on
SerializeTime. You can ask more questions about it because it's done.
Your homework is another mater.

On Aug 21, 10:15 pm, Kakashi24142 <[email protected]> wrote:
> The homework is:
> "1.Write MyClassToBePersisted.java, which contains the following
> properties
> -Profile field, which has the following fields
> --String name
> --int age
> --String hobby
> -School field, which has the following fields
> --String nameOfSchool
> --int yearStarted (this is transient field)
> -Write SerializeMyClassToBePersisted.java which creates an instance of
> MyClassToBePersisted class and serialize it into a file in its main
> method.
> -Write DeserializeMyClassToBePersisted.java which read the serialized
> file and deserialize it into instance of MyClassToBePersisted class in
> its main method.
> 2. Write MyClassToBePersisted.java, which contains the following
> properties with version control."
>
> For step 1:
> Profile and School are classes right? If so, was it intended that they
> be inner classes?
> Why does it ask to create 2 classes with the main() method?
>
> For step 2:
> Where are the "following" properties? Does it mean the properties from
> step 1, except you have a final static variable that keeps track of
> the identification number?

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to