Let's review what we implemented so far through this and this illustration that things that have been 2
implemented are emphasized in green and the ones that are yet to be implemented are shown in blue. 3
So we implemented model undelete store and we need to implement the view of the controller. 4
But the last is application that we are building we need to write a separate program that program would 5
just load the data that is it will go to all the entities like the users and the bookmarks and then 6
we'll invoke the different steps that we are yet to implement. 7
Like the bookmarking process marking book MOTSS kid friendly and so on. 8
So now let's write this launcher program and to begin with we will use it to load the data and we would 9
also see if everything we do so far is working correctly or not. 10
Let's call this program as we launch let's clear to launch and com got semantics Square. 11
Trivial 12
And since it's a launcher program let's have a main method here 13
. 14
I had a method called load data. 15
So this would be responsible for loading that it up. 16
So let's just click this and it's actually capitis the top. 17
It's always the main method at the bottom. 18
Now from here let's in work gun store dog load data so we know that it loads the data. 19
So this is the dust or glass that Spartacists our segment here 20
. 21
OK. 22
So this what we loaded it down. 23
Next let's fetch the radio from the store and for that we can use the getter method. 24
And it's also introduced the corresponding data structures in this class that is the users under bookmarks 25
. 26
So let's just write them 27
. 28
So that would hold the users. 29
And for bookmark we know it's a two dimensional array. 30
It's just in both user and bookmarks bookmark and to D2. 31
OK. 32
Now let's initialize them here 33
. 34
Get users and do the same for bookmarks 35
same book and control space. 36
So bookmark manager non-geek instance dot get bookmarks. 37
So we have the required data here. 38
Let's actually bring this data out 39
so we will see if it if everything is working fine or not 40
so hostile print only user data and let's do it in a subject matter. 41
So let's just write a new method for that. 42
It's called It does print user data. 43
It's highlighted here and sick create Brende user data and it would create a private method here. 44
So since users is a global variable here we can directly access it from here. 45
Our user user 46
users 47
on greenspace simply print user. 48
Now let's also how bringed bookmark data 49
it's hard to generate the matter 50
here since bookmarks is a good dimensionality. 51
We would need to foreclose an asteroid. 52
It's called a bookmark list 53
for each control space. 54
Nice. 55
And let's just say space 56
and space bookmark. 57
So let's just go ahead and run this program and see if what we call it is correct a. 58
Right quick run nice job application. 59
Now it brings something. 60
So let's just go ahead and look at that. 61
OK. 62
Now so what what are we supposed to do it's printing something it's calling the string method in the 63
object class. 64
So we need to all right Doc.. 65
So that let's go into each of our users or judge each of our entities and override the boosting method 66
in the object class and for that it's very simple let's just do it automatically. 67
That's going to source said generate do string and by default to set up in all the fields. 68
Now let's just keep it like that and that's it. 69
Where is what's the insertion point. 70
And let's say last member so that it will be created as the last member of the class and say OK now 71
you go here. 72
So it's has created this dusting method automatically and it is overwriting this. 73
In addition it means that this method is overwriting a method in the superclass. 74
So it's as simple as that. 75
Let's just do that for the rest of the. 76
And it is too generic to string class member. 77
That's the advantage of using an ID 78
. 79
How cool is that. 80
So let's just go ahead run this launch program one more time and there you go you can see the output 81
. 82
So here are you all the users thousand Tozan and Rantel going on to and so on. 83
Here are the emails the passwords. 84
The first name last name gender user type. 85
Similarly prints for the book also here sorry the weblink. 86
It's printing ramblings here spreading that you are in and the host for the movie. 87
It's using the release ear and cast and directors here and the same for the book also. 88
OK so everything we have written is working correctly. 89
It just doesn't burn ID and the title and those fees because those fields are inside the bookmark. 90
So under tousling mother is not here but we can have a posting here also and we can invoke it from the 91
from the subclauses. 92
But I don't think that's necessary because we know that it's working fine. 93
So that's good enough for now. 94
So just go ahead and implement the launch program and we will continue building the project.