So analysis actually put in some more lines of code here.
So now want to actually implement the evaluates performance method that we actually inherit from this
computer class here.
As you can see.
OK.
So here I just need to type in evaluate performance and now as you can see we are writing dismay for
the public double evaluate performance.
And now as you can see the edit is gone.
OK.
So now inside of this Meffert as you can see it says returns 0.
So just delete this line of code here.
And now if want to actually put in our own implementations.
That is actually specific only to this.
There's a computer class.
OK.
So just so inside of this method here I can just type in return.
You power multiplied by them.
OK.
And semicolon.
So here I am actually returning the result of this multiplication to the color of the Smurfette.
OK.
So because this mirror actually needs to return a value of type double.
Here I am actually returning the multiplication the result of multiplication of these two values.
OK.
So remember that we declared these two instance variables as you can see double.
OK.
That type of this instance variables are double is double OK.
And here we are actually turning up the result of multiplication of these two values.
OK let's actually overwrite the two string method that we actually inherit from this computer class.
So as you can see here inside this computer class if you have these are two string method.
OK.
Now I want to actually overwrite this method inside of this this computer class.
So as you can see here this is our two string Meffert.
And here inside this MFA as you can see I am saying that return string data format and inside of these
codes I am specifying the format of my string value.
So this person is actually for this Super two string here.
So this Super 8 actually refers to the name of this superclass computer.
OK.
And Dot 2st and here I am calling this Smurfette restraint on the super.
So it's going to go inside of the superclass and then it's going actually execute this line of code
that is inside of these two string Meffert.
So it's going to return a string.
Right.
OK names.
Get screen and keyboard.
OK.
So here is this person this is for this value super.
That was three.
OK.
Percent and a your lead character.
And we have another person here.
This is for people power here as you can see in space.
And we have a percent here.
OK.
So person F is for actually small values.
OK.
So Seip get CPR power as you can see a super power instance valuable is actually of type double 71st
Taipan percent.
And we have a new line character and we have our person is here again.
So this is for RAM Colan space precent.
If so this person is for this get RAM here OK.
So hopefully that makes sense.
And now let's take you to go inside this laptop computer.
OK.
And here after the class name here just typing that extends computer.
So here you are actually inheriting all of the features and behaviors that are actually inside of this
computer class.
OK.
So here again it says class.
Laptop computer must either be declared abstract or implement abstract Meffert evaluates performance
in computer.
OK so now let's actually create some instance variables inside of this laptop computer.
So as you can see here I declare these instance variables here.
OK.
Private stream touchpad.
So every laptop actually has a touchpad private double super power and Praimnath double RAM.
OK so now it's actually create a constructor inside of this laptop computer class.
So as you can see here this is my constructor for this laptop computer class.
So the access modifier of my constructor is public.
The name of this constructed is a laptop computer so remember that the name of your constructor must
be the same as the name of your class.
Ok laptop computer and this construct invites you to accepts some arguments.
OK.
String name string screen and string keyboard.
OK string and mouse double C.P.R. power double RAM and strange touchback.
OK.
So because we are inheriting all of the features and behaviors that are inside of this computer class.
OK.
We need to actually initialize the constructor of the superclass.
So that's why we actually typed here super.
And inside of the parenthesis of the super I just initialized the constructor of this of the superclass
name screen keyboard.
And here I am a the instantiating my instance variables as you can see here they start CPR power assignment
operator Sibiu power.
OK.
Does that RAM assignment operator RAM.
Does the touchpad assignment operator touchpad.
OK so now let's actually create some getters and Jet and actually our setters for this instance variables.
So here inside of this class just right click here and then click and generate and then get her and
setter and then select all of these instance variables here and then click on OK.
So as you can see here now these are setters and getters that are actually generated automatically by
the android did you eat.
OK so now let's actually implement the evaluates performance Smurfit that we actually inherit from the
computer class.
OK.
So here in this class I can just putting this effort here.
So at sign over right public double evaluates performance and inside of this Meffert I am just saying
that return the result of multiplication of this superpower and this slam.
OK and now let's actually overwrite the two string method.
And now let's actually delete this line of code that is inside of these two string Muffet here.
And now we can actually put in our own implementations inside of this method.
OK.
So inside of these two string Meffert actually putting on when pasting a line of code here.
OK.
So as you can see here it says Return string data formats and in say that the double quotes I am specifying
the format of my string value.
So this percent is here as actually is for this supertax is to string here.
So super refers to the name of the superclass.
So this superclass is computer and this 2st is actually this is with string method here.
OK.
So it's going to actually execute this line of code and it's going to return the string value here.
OK gets named its screen and get keyboard.
So inside of this laptop computer as you can see this person is for this super that in here.
If you have a newline character a person and space person is again here.
So this person is for this touchpad and we have another person here and this person is for this method.
Get touchpads.
OK.
So hopefully that makes sense.
And now it's actually go inside these smart phone computer that job file here.
And now after the class think smartphone computer just typing here extends computer OK.
And here inside of this class let's actually declared some instance variables.
So as you can see here the first instance variable is actually private stream operating system.
The second instance variable is private double Sibiu power.
And the first instance where the event is private.
Double ram OK.
So now let's actually create a constructor for this smart phone computer class here.
So as you can see here this is my constructor for this class.
OK.
And the access modifier of this class is public.
The name of this constructor is smart one computer and this constructor actually accepts some arguments.
OK so the first argument as against the name of type strength.
The second argument is screen of type string again.
And the first argument is actually again a keyboard of types three in.
OK.
So as you can see the fourth argument is operating system strange.
And here the argument is C.P.R. power is actually of type double.
And this argument as you can see RAM is actually of type double here.
OK.
And now because we are actually inheriting all of the features and behaviors that are inside of this
computer class we need to initialize the constructor of the superclass so super name ok.
Screen keyboard.
OK.
And here as you can see I created two if statements here.
So if the value of these Sibiu power argument as you can see here is less than or equal to number 0
then float new illegal are the argument exception.
The value of the CPO power must be greater than zero.
OK.
So if the user of this class mistakenly assign a value that is equal to number 0 or less and the number
0 or replicate their application is going to actually crash.
Crash.
OK.
And here I actually created another if statement.
If the value of this actually Lamhe valuable as you can see here is less than or equal to number 0.
OK.
If the value of this argument is less than or equal to number 0 for you illiquid argument exception
the value of the RAM must be greater than number 0.
OK.
And here I am actually then shading my instance variables.