Make a Java program to maintain a simplified network of friends, friends of friends, etc. Each
erson has a name, an address, a phonenumber, and friends. There are three [url removed, login to view], only one person ('me') is available directly. Secondly, every person except 'me' is the
friend of exactly one other person. Thus, to any person there is exactly one chain of friends
starting from 'me'. Thirdly, each person has at most two friends.
The *user interface* has a *text area* to show the attributes of one person. We call that person the
selected person. Further, the *user interface* should be equipped with buttons for actions:
? Go back to 'me'. The selected person becomes 'me'.
? Modify the data of the selected person. The new values have to be available in
appropriate *text fields*. It is not possible to change friends in this way.
? Go to the first friend, if any. The first friend of the selected person becomes selected. If
the selected person has no first friend, nothing happens.
? Go to the second friend, if any, analogously.
? Add a new person as first friend of the selected person. The data for the new person
should be present in the same *text fields* as used for modification. If the selected person
already has a first friend, that friend is replaced by the new friend.
? Add a new person as second friend of the selected person, analogously.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Should be running in Visual Cafe. GUI, enine and person class are important.
? Visual Cafe
? Program three classes: a GUI; an engine; a class, of which each person is an *instance*.
? When the program starts there is only one person: 'me'. Other persons are added as
riends. The engine object should create and remember the 'me' object.
? The engine needs a *reference* to the selected person as well.
? The friend attributes are *references* to other persons. Set the initial values of these
attributes to null, i.e. a reference to nothing ("no friend").
? Only when a person is added, the corresponding object has to be created.
? Technically, it is difficult to show the data of 'me' immediately when the program starts.
It is sufficient when the user has to press a button first.