So does that name assignment operator name.
OK the start screen assignment operator screen the start keyboard assignment operator keyboard.
OK.
So now it's actually adding some more lines of code here.
So here I'm going to pasting some lines of code and then I'm going to explain to you what's going on
here.
OK.
So here as you can see these are the lines of code that they actually pasted here.
First of all I actually created a get here good name for this unnamed instance variable.
And then I actually created a getter again for this screen instance variable.
OK.
And finally I created a get keyboard Moffit get here for these keyboard instance variable and notice
that I didn't actually create setters for this instance variables because these instance variables are
actually declared as actually final.
And these are constants.
OK so once we assign a value to these instance variables we cannot change that value later.
OK so we don't need to actually create setters for these instance variables that are actually declared
as final.
OK so now let's actually override the two string Meffert that we actually inherit from the Object class.
OK.
So this computer class implicitly inherits all of the features and behaviors that are inside of the
inside of the Object class.
So if we can access the string method here two string and now as you can see we can overwrite these
two string Meffert.
OK.
So let's actually delete this line of code here that says Return a super.
That was strange.
And now we can actually put in our own implementations inside of this method.
So here I'm going to actually paste in a line of code here and then I'm going to explain to you what's
going on here.
So here I am saying that the return string data format and here in say that these double quotes I am
actually specifying the format of my string value OK person s.
So this person is talking is actually referring to this gets named argument.
OK.
And here I have a person and this is actually a newline character space per cent.
It's again this token here dispersant S is actually for this screen Meffert OK and person.
And this is actually a newline character space.
And I have a person here that is actually referring to this keyboard Meffert here.
OK.
So hopefully that makes sense.
And now let's actually create an abstract method.
So as you can see here I actually created this abstract method here and I notice that I actually didn't
are actually putting curly braces after this MF at name in order to put in our own implementations because
abstract methods cannot be actually cannot have body.
OK so if we're actually putting in curly braces here as you can see it's non-chain as an error and it
says that abstract methods can not have a body.
OK so we cannot actually create a body for this abstract Meffert.
And the access modifier of this method is public.
And as you can see it is if it is actually abstract the return type of this Meffert is double and the
name of this method is evaluates per performance.
OK.
And this method actually is an abstract method.
And the other classes that actually inherit from the computer class need to actually create a body for
this method.
OK.
Otherwise with what those classes of would wind up with actually a compilation error and I'll show you
in a second how you can actually use this method.
But because I told you that a computer by itself is actually an abstract concept.
OK.
We declared this class as as an abstract class.
OK.
And this class has actually an abstract method evaluates performance.
If I ask you to evaluate the performance of computer you may ask me that what kind of computer are this
computer or laptop computer or a smart phone computer or a tablet computer.
So this Meffert is actually an abstract benefit.
OK.
And the other classes that are actually called concrete classes such as this thub computer laptop laptop
computer as you can see smartphone computer tablet computer These glasses are concretes glasses.
OK.
And if these glasses actually extend from this computer class as you can see they need to actually they
need to actually create a body for the Smurfit they need to actually override this Meffert and create
a body for this effect and specify what's the evaluate what's the actually performance or how how they
can actually evaluate the performance of two of those specific computers.
OK.
So hopefully that makes sense.
And remember that you cannot create an object from an abstract class OK.
So let's actually go back go inside that inside of this top computer that have a fight here and now
let's actually after the class name just typing here extends OK Computer and now it is now showing us
an error.
OK.
And let's actually hover our mouse pointer over the whole area and see what happens.
Class desktop computer must either be declared up.
Abstract OK or implied or implement abstract method evaluates performance in computer.
OK.
So because you are actually saying that this computer extends computer we either need to actually declare
this class as an abstract class or we must actually override the abstract Meffert that is actually inside
of there are actually computer class.
OK so that is actually putting some lines of code.
And then I explain to you what's going on here.
So first of all let's actually do declare some instance variables here inside of this stop computer.
And as you can see here every desktop computer has a mouse every desktop computer has a super power
and every desktop computer has a ram key.
And as you can see here in my first instance variable is a private stream mouse.
My second instance variable is private double Sibiu power.
And my first instance variable is private double RAM.
OK so now let's actually create a constructor for this desktop computer class.
So here I'm going to actually pasting this constructor here.
OK.
And as you can see this is my constructor for this this computer class and the access modifier of this
constructor is public.
The name of this constructor is desktop computer.
And this construct that actually accepts some arguments.
OK.
And the first argument as against is of type String name.
The second argument against is of types 3 inch screen and the first argument as against C is again of
type String keyboard.
And here this fourth argument is of type String mouse here as you can see this fefe argument is actually
of type double Sibiu CPO power.
And here these six are argument as you can see is after double and the name of this argument is that
I'm so here because we are actually inheriting all of the features and behaviors that are actually inside
of this computer class.
We need to initialize the constructor of the superclass.
So as you can see inside of this computer class we have this constructor here and inside of this desktop
computer I need to initialize the constructor of the superclass by just typing super name screen keyboard.
OK as you can see this computer class as you can see this construct it actually accepts free arguments
name screen keyboard and inside of this desktop computer.
As you can see here these are super.
He actually accepts free arguments name screen keyboard.
OK.
Now and here as you can see I am actually instantiating at my instance variables that I actually declared
in this class the start mouse assignments operator mouse.
Ok this that C-p a power assignment operator CPQ power.
Does that RAM assignment operator.
OK so now I'm going to actually pasting some lines of code here and then I'm going to actually explain
to you what's going on here.
OK.
So as you can see here first of all I actually pasted this line of code here this method.
OK.
And the Axis modifier of this method is public.
The return type of this method is three gets mouse.
OK this is actually to get here for this mouse instance variable.
OK.
And here I actually created a set here for this mouse instance variable.
Ok public it says mouse.
OK.
And then I actually created a getter for a super power instance variable gets you power.
And then I created a setter for the spew power instance variable.
And as you can see here inside of the Smurfette I actually created an if statement if the value of this
argument.
Ok so your power is less than or equal to number 0 then fro new legal argument exception.
So if Sibiu power must be greater than zero.
OK.
And then here I am actually assigning the value of this argument to this spew power instance valuable
and that I created a guitar for this Ahram instance variable and here I created a set here for this
of an instance variable.
And as you can see here inside of the setter I actually created an if statement if the value of this
instance value bet is less than or equal to number zero then fro new illegal X argument exception RAM
must be greater than number zero.
And then here I am assigning the value of this argument to this instance variable does that from an
assignment operator.
OK.