Help everyone in this theater you are really going to go ahead and create our 18th Android application.
So just click on this.
Start any new Android do your project for the application name just type in here app 18 and you can
actually specify the company domain package name and project location and then click on next.
And here you need to actually specify the API 16 Android 4.1 jelly bean.
And then click on Next choose plant activity next.
And then here you can actually specify a name for the activity name lay out name title and many resource
name.
So I suggest that you actually leave these names as default and then click on finish ok everyone.
Now let's actually select this hello world takes you here and then press on delete key on your keyboard.
Let's actually go inside this red folder here.
And inside the layout folder double click on this activity underline made that example and then select
is filleting action but press on delete key on your keyboard.
OK.
So let's go back inside this content underline made that example.
And now I when I actually design my user interface for this application.
So just select this linearly vertical here and then put it here at the center of this relatively OK.
And then let's actually select our scroll view here.
So as you can see here inside these containers fall there.
OK.
Select the scroll you vertical as you can see and then put it inside this linearly out vertical here.
OK so now let's actually to select a text field.
OK.
As you can see this is a text field here inside these text fields folder.
OK.
And then put it inside this scroll view here.
OK so now let's actually find the the id attribute 40s edit text textfield here.
OK.
So as you can see here this is the id attribute of this text here.
And this actually assign the value EDT puzzle for the idea of these Eadie takes here.
OK.
And as you can see here now the design of our user interface is actually finished.
So now let's actually go back and say this me an activity dojo over here.
Let's actually delete these lines of code and then let's actually delete this block of code that is
actually related to the floating action.
But OK.
And now we can actually start coding here.
So now let's actually create a class a Java class.
OK.
So just click on this file here new and then click on this Java class here.
OK.
And for the class name just type in here Company and device
OK.
And then click on OK here.
So as you can see here we have a class called Company and device in our project.
OK.
So let's just click on this view here tool windows and then project.
And here we can see inside this Java folder and inside this folder here we can see our class here.
OK.
Inside this package.
So let's go back inside this company and device class and inside of this class let's actually create
two constants of type stream.
OK.
So first of all I want to actually specify the axis modifier of my constants so the axis modifier of
my constant is private and are here because I want to actually create a constant.
I need to put the final keyword here and then I need to specify the type of my consonant and then I
need to actually specify a name for my constant.
OK so a company underline name.
OK.
Again I want to actually create another constant private final string.
And this time the name of our constant is company device company on the line device.
OK.
So now as you can see it is now showing us an error.
So because we didn't actually instantiate these objects we need to actually create a constructor here
in order to instantiate these objects inside the constructor for this class.
So I just need to type in here.
So I just need to type in here public.
So the access modified of my constructor is public and I need to actually refer to the name of this
class.
Remember that the constructor name must be the same as the name of the class.
Ok so here I just copy this name and then I just put it here.
Company and device and then here I want to actually specify that this class is going to actually accept
arguments.
So the first argument is of type strange and the name of my argument is company name.
OK come on.
Again the later type of my second argument is against stream.
And the name of my argument is company device.
OK.
And then I need to open and close this constructor by using these curly braces.
So inside of this constructor I want to instantiate these objects.
So I just need to type in here this.
OK.
So as you can see this keyboard actually refers to the specific object that is actually created from
this class.
OK.
Whenever we actually refer to this this refers to the specific object that is actually related to this
class.
OK so does that company name.
OK so here we are just referring to this actually object here.
OK.
And here I just need to put in an assignment operator here and here I want to refer to the name of this
argument company name.
Semicolon.
So again does that company device assignment operator company device.
OK semicolon this piece of code as you can see refers to this instance variable here.
And this piece of code refers to disparate instance variable.
And here as you can see it is company name here refers to this argument and this company device here
refers to this argument here.
OK.
So hopefully that makes sense.
And let's actually overwrite the two string method that you actually inherit implicitly flop from the
object class.
Remember that all classes in Java are by default inherit all the features and behaviors inside the object
class.
Ok so I just need to type in here too strange as you can see this is the method.
And this if it is inside the object class OK.
And then I just need to present Enter key on your on my keyboard and here we can actually overwrite
the Smurfette.
OK.
So I just need to delete this line of code here and we can actually put in our own implementations inside
of this to stream of it.
OK so I just need to type in here return and here.
I just want to put in OK two double quotes space plus company device.
OK.
Plus two double quotes space from space plus company name.
OK.
Plus And again let me ask you to create a new line here in order to show you what's going on here.
Two double quotes.
Space Company space plus two double quotes and inserted double quotes.
I just want to put in a thought here space and here I just want to create free new line characters so
back for Slash and backwards slash and and backward slash.
And so here I just created free new Live characters here.
OK.
I just put in free new line characters and then I just need to put in a semicolon at the end of my statement.
This is the two string method that is actually related to this class.
So when ever that actually creates an object from this class the thing Meffert that is related to that
specific object of this class.
This is going to be called this piece of code here is going to be executed here.
OK.
So hopefully that makes sense.
And now lets actually create another class OK file new double class and the name of our class is puzzle.
And then click on OK here.
So as you can see here this is our puzzle class.
OK now let's actually put some codes inside of this puzzle class.
So just typing here Private First of all we are actually specifying the access modifier of our valuable.
OK.
And here I want to actually create an array of type company and device class.
OK.
As you can see this is our class company and device.
And inside of this puzzle class I want to create an array of type company and device.
OK.
So I just need to refer to the name of my type company and device.
Okay.
And then here I want to specify that I want to actually create an array here.
So I just need to put in a pair of brackets after my type name.
And here I want to actually give a name to my arii so the name of my Arey is companies and devices and
semicolon at the end of my statement.
So as you can see here I didn't instantiate this Auret because I just wanted to declare this right here
and here let's actually declare another variable of type integer.
OK so first of all we need to actually specify the access modifier of our valuable private ain't the
data type of the above is it.
And here I want to specify the name of my variable current device model OK and put a semicolon at the
end of your statement.