Friday, November 2, 2018

Youtube daily report Nov 2 2018

OOP Constructor function.

Notice here that a class is like a blue print, we can re-use this datatype multiple times

trough the program by simply placing s2 s3 like so, here I created 3 absolutely independent

instances of this class.

And each of them contains their own attributes.

Name and GPA.

Every time I create an instance of this class, the default value is assigned to the variables.

So if I need to update the values for the 2nd and 3rd instances here I will have to

write functions like this, so will say s2 provide some different gpa, 3.5 and inside

here another instance 3.7.

And this not very practical approach, since we might have many attributes of the class

we have to call each function for each instance of the class.

In order to have a custom variables inside each object of this class, we have to use

a constructor function.

let's delete these functions here.

Let's write a constructor.

Student.

This function is the constructor.

Notice it does not have a datatype, no return, also it has the same name as our class.

This is the requirement for the constructor.

Additionally. in here I can now pass different variables for each instance of this class,

so here I say 4.0, next one I say Mary 3.5, and here John 3.7.

Now with this statement I will have individual instances set unique values we can even provide

the default values write n/a here and gpa = 0. this will allow us aslo create another

instance with the default student values.In here we can remove the assignment statements.

SO in this constructor here serves 2 purposes.

It allows us to create instances of this class with custom values provided but it also allows

us to have the default values set, so I do not provide any values for the student attributes,

I will have the default values assigned to the instance of this s4.

Let's run this program with the debugger, so we can see it in action.And click f5 and

here it's.

Individual instances of this class were created with the values with the values assigned to

it.

The constructor is a special function that is called each time when object is created.

And now here, all of these variables have unique values inside attributes.

And it's a good programming practice to define a constructor, but if you do not define it

C++ will create an object for you.

For example here, if comment out this part of the constructor definition, stop this.

notice how this statement is no longer allowed, because there is no logic defined of how to

set the values variables with custom parameters.

But this statement is s4 works just fine.

with out constructor definition it still works.

And this concludes constructor presentation.

For more infomation >> Constructor - Duration: 5:05.

-------------------------------------------

ESSAS 3 Sopas Milagrosas Emagrecem em 7 dias🍵 - Duration: 4:19.

For more infomation >> ESSAS 3 Sopas Milagrosas Emagrecem em 7 dias🍵 - Duration: 4:19.

-------------------------------------------

Gerry Anderson's Firestorm

For more infomation >> Gerry Anderson's Firestorm

-------------------------------------------

H «εκδίκηση» της Μπέλλα! Guest κριτής απόψε στο «My Style Rocks» - Duration: 1:13.

 ❱❱ Η Σταρ Ελλάς 2018 Ιωάννα Μπέλλα, που πληγώθηκε από την κριτική της επιτροπής του «Greece's Next Top Model», με σχόλια που έγιναν viral στο διαδίκτυο, θα πάρει την

εκδίκησή της, καθώς θα βρεθεί απόψε η ίδια σε ρόλο κριτή

 Η πιο όμορφη Ελληνίδα για το 2018 θα κρίνει το στιλ των διαγωνιζομένων στο Gala του «My Style Rocks», το οποίο έχει ως θέμα (τι άλλο;) τα καλλιστεία! Και μπορεί άλλη να έχει το όνομα -βλέπε Queen Dina-, το στέμμα της bella Ιωάννας, όμως, είναι αυτό που έκλεψε τις εντυπώσεις στη βραδιά

 Φυσικά, η λαμπερή παρουσιάστρια του reality μόδας φωτογραφήθηκε δίπλα στην εκλεκτή καλεσμένη της, που ήταν απαστράπτουσα μέσα στο βραδινό -και αποκαλυπτικό- φόρεμά της και το κάδρο γέμισε

λάμψη! Απόψε η guest της βραδιάς αναμένεται να κρίνει με επιείκεια τις διαγωνιζόμενες

Σε καμία περίπτωση δεν θα ήθελε να περάσουν τα κορίτσια όσα έζησε εκείνη στο πλατό του «GNTM» και την έκαναν να δακρύσει on air

Αλλωστε, το μήνυμα που θέλει να περάσει στις διαγωνιζόμενες είναι ότι η καριέρα δεν σταματά με μια συμμετοχή σε reality παιχνίδι!  ΤΕΡΙΑΝΝΑ ΠΑΠΠΑ  

For more infomation >> H «εκδίκηση» της Μπέλλα! Guest κριτής απόψε στο «My Style Rocks» - Duration: 1:13.

-------------------------------------------

Nordic Discus Show: 100 discus show fishs in a fantastic atmosphere!!! - Duration: 10:13.

On the road to Northern Europe

On the road to Sweden...

I'm in the plane for Zurich

After Zurich, Göteborg

And then, I will join Ullared city

The flight is going very well

The weather is very nice

There is an amazing view

I'm hurry to arrive in the contest

Some already told me there are very nice fishs there

I have to do my conference

I'm hurry to know how Swedish will welcomed it

Follow me on Fanatik-Discus

I'm going to send you pictures, videos

I hope you will enjoy this moment

For my part I already enjoy! Hurry to arrive!

I share the view...... just amazing!

L'Italie en Suède? Est ce possible???

Bienvenue en Italie...

La meilleurs plats au monde!

Here we are...

Arrived in Ullared

After 2 planes

then 2 hours driving

the place is very nice

Sweden is really beautiful

And now we are going to discover the show

Get an overview...

The area is very nice... in a village

it attract many people

thanks to a huge commercial center!!!

I invite you to follow me

Let's have a look!!!

Information importante...

Aucune bière n'a été maltraitée durant le tournage...

Ou peut être quelques unes....

The week-end is finished

We spent a good time

with many nationalities

We arrived with the sun...

We come back.... under the rain

but with many good memories

with great guys, it was really nice!!!

See you soon for new adventures!!!

Déjà fini???

Donnez moi une bière!!!

For more infomation >> Nordic Discus Show: 100 discus show fishs in a fantastic atmosphere!!! - Duration: 10:13.

-------------------------------------------

Virgo a quien conocerás en Noviembre? Nuevo Amor + Consejo - Duration: 13:10.

For more infomation >> Virgo a quien conocerás en Noviembre? Nuevo Amor + Consejo - Duration: 13:10.

-------------------------------------------

Libra a quien conocerás en Noviembre? Nuevo Amor + Consejo - Duration: 12:16.

For more infomation >> Libra a quien conocerás en Noviembre? Nuevo Amor + Consejo - Duration: 12:16.

-------------------------------------------

The Best Car to Drive If You Want to Attract a Woman - Duration: 5:23.

Rev up your engines, sam 101 asks what's the best kind of car to

drive to attract a woman, ok here's something that might go over some guys heads, but for

the smart guys it isn't, you don't want a high end luxury car, because

really high end cars like Lambos or Ferraris, from my customers who have owned them over

the years have told me, they only attract young boys and old men, not beautiful women,

so if you're attracted to old men, that has nothing to do with women and that's not something

I'm going to get involved in here, but you basically don't want a real high end

car because the only thing it's going to attract is young boys, old men, or gold diggers who

don't care about the car, the just see, oh he's got money if he can afford this so I

want him, now if you want to find a good woman, find

a beater or just a plain old reliable car and the woman is looking at you and not the

car, take a look at my life when we were dating

before we got married, I had a 1970 Ford Maverick with the 3 speed, I pain $500 for it, but

I do have to say I had a Norton motorcycle too, which was the fastest motorcycle in the

world at the time, so she kind of liked that but hey speed and

money, they can be different things, if you want to take my advice about cars, find a

reliable old beater car if you want to find a good woman, I've been married for 40 years

to the same woman, it worked for me, it can work for you too,

avast says scotty I have a nissan maxima 2013 when should I change the CVT oil and when

should I change the timing chain, the CVT oil, those have one of the weakest

CVT transmissions out there, I would change that, I don't care what anybody says, I would

religiously change it every 30,000-40,000 miles, do that,

now the timing chain, theoretically they can last forever if you change your oil all the

time and they get lubrication, if you start to hear a rattling noise, or if it's running

poorly and somebody puts a timing light on it and checks the timing and it says the timing

is all of because the chain is stretched, then you'd want to change it then, to keep

those chains lasting the only thing you have do it is change the engine oil and filter

a lot, so don't listen to any of the garbage that

people give you, with that engine I would religiously change the engine oil and filter,

and I'd change it every 5,000-6,000 miles period,

and that will keep the chain from wearing, the problem is a lot of these guys believe

this nonsense of changing the oil every 10-15,000 miles with synthetic oil, it will get dirty

and it will wear things more, oil is cheap, engines are expensive,

Wynn says scotty is a 2011 automatic corolla s any good, I'm thinking about buying one

with 100,000 miles for $8,000, the truth of the matter is, toyota doesn't make transmissions

as well as they used to, that's a fact, and that particular car is a 2011, I got a customer

that's got one, his went out, and it cost him $5,500 just to have a used transmission

put in, so I wouldn't buy that particular one,

I just wouldn't because they had some problems with some of those automatic transmissions,

and why gamble, I would get an older one or I would get a newer one, I wouldn't buy that

particular year, day fan says hey scotty what's your opinion

of the toyota aisin CVT transmission and the new toyota corolla, I was talking about the

automatic one earlier, I'm not a CVT transmission fan, but their all starting to go that way,

the best ones in the world are the ones made by Aisin, now aisin is owned I believe 30%

by toyota but it's an independent company, where a lot of these CVT transmissions are

made by Nissan, and they sell them to all different companies, but their nissan based

transmissions, and their terrible, I was talking to my transmission expert this week and I

said, what's the worst CVT transmission out there, he didn't even think, he just said,

nissan by far I work on tons of them, their terrible,

the toyotas no, CVT transmissions from what I've seen the aisin are the best in the world,

now a lot of people are using them now, I saw that the big chrysler trucks now switched

to the aisin transmissions, so the aisins are pretty good transmissions, I personally

just don't like CVT transmissions, but I can see for the future that, that's the only thing

their going to have is either the CVT or manual transmissions, and if was me, I would then

get a manual transmission, z says scotty I got a 2009 F150 sometimes

when I go to open the drivers door it sticks and I have to re-lock it and unlock the door

again with the key, what do you think, since it's sticks, the first thing you want

to do, the easiest thing is just get yourself a can of the modern wd40 not the old stuff

but the new stuff which is a new formula, spray the key and spray it in the lock hole

like mad, it doesn't hurt anything if you get a little overspray, just wipe it off with

a paper towel, a lot of times it's just old age and it needs

a little lubrication and it works fine, if that doesn't fix it,

that generally means, that your actual latch assembly is starting to wear out, and you're

probably going to have to replace it, now if you have a remote too and you hit the remote

and it doesn't do it, then it's the key assembly, but if it does it even with the remote, then

year you're going to need a new latch assembly because that would be wearing out on it, that's

how I test them, if they have a remote key too to check it with,

so if you never want to miss another one of my new car repair videos, remember to ring

that bell!

For more infomation >> The Best Car to Drive If You Want to Attract a Woman - Duration: 5:23.

-------------------------------------------

ArrayIO - Duration: 8:31.

Array input and output operations.

Here we have a size variable declared as a constant integer and assigned value 5 to it.

We are also using some array that is defined using the assigned size data of the integer.

We also assign 0's to individual cell index of this array.

And here is the for look, the for look is the typical way, the most common way, how

you would access individual elements of the array.

Notice the for look is controlled by the size of our array.

So it is (Pause).

And notice the for look is controlled by the variable size.

The same as the size of our array.

So we use it 3 times.

We would use during declaration of this constant, we will use it—we are using it to declare

this array and we also using it in the for look to traverse individual elements of the

array.

So here, there is also variable I that in here there is also variable I, that is used

to access individual index of the array.

Each time the loop iterates the I value will be different.

So different array index will be accessed.

Because of this for look, initialize is the i=0, the first time this loop iterates, we

will access index 0.

That is first element of this array.

In the next time, loop iterates, this I value will be updated to 1 and we will place the

second and the second time this loop iterates, this I value will be updated to 1, so we will

be accessing index 1 that the 2nd array index.

(Pause) And this continues until the last iteration, when the size—and this continues

until the last iteration, when the I value is equal to 5 and when at this, this expression

will be false, so we will skip out the body of the for look in the program will continue

further.

So now, let's—and now let's—and now let's—and now—and now let's place

the break point here, so we can see the –and now let's—and now let's run this program

so we can see this in action.

Place a break point here and click start debugging at 5.

(Pause) And now notice the data of this array is all 0's inside the individual cells,

this is due to this statement where we assign the values by using these initialization list,

so each cell contains 0 and now in a console, we can enter some values.

First we need to click continue, and now we will say 76.89, 67.45, 34.56, 77.88, and 99.12.

And click enter.

Notice how the data here populated with the same variables, to be inserted from the console.

So all our variables are in here, the inputs from the user keyboard.

And now we can terminate this program.

And in order to do output, it is very simple.

You simply copy the same for look and instead of doing the cin, we will do the cout.

So in similar fashion, we will individually traverse the array elements, starting from

the index 0 because here again, I am reusing the same variable I, I stands for the just

index.

In here individual values will be placed and we will access individual elements and let's—(Pause)

So let's test this again.

This f5, so we can see them.

And now let's test that again, click control f5, so we can see the outputs.

And now let's test that again but now we can just do control f5, so we can see the

outputs.

Control f5 like so, then we place some values.

(Pause) Like this and click enter.

In here is the same values.

So after I enter them into our array, use another for look, very much the same function.

Instead of cin, I am using cout.

And that will iterate individual elements of the array and display the values.

And we can use the while loop in order to show the array, but the for look is more common.

So here is an example of while loop.

Notice that the syntax is exactly the same as the for loop, but the for loop looks more

elegant than the while loop.

I personally prefer the for loop.

So for here it is the same statement, also the same here.

Be starting from the index 0, we have this expression.

We have this expression also here, I<size, we also have this here, the cin, we also place

the cin or cout.

And we use this variable I to traverse individual index variable.

In here we increment the I variable just like here inside the forloop in order to access

the next element.

So we will increase it by 1. in another popular way how we can access array elements is the

following 4 range loop.

Here for example, maybe have a different syntax, we will say auto, in here we place some data,

name of the array, and inside here, we will use cout statement.

So this loop is the new syntax for c++11, but the syntax here is very simple, so notice

here there is also a keyword auto.

That will allow us to work with any type of data array.

In this case that is a double.

So here, if I place an integer, it will also work or I can place an integer here, it will

work with integer array.

So this int item is just a temporary variable that will access individual array subscript.

Notice here, the only thing is needed here is the array name.

No square bracket is required.

Now let's run this program so we can test the output, for these both loops.

In here we will place cout and let's also add "and" line here.

So we can test which control at 5.

We enter some integers since we changed he data type for the array.

Now we enter a 5, 6, 7, 8, 9.

And click enter.

In here we see, absolutely the same output.

And this concludes array input and output operation.

No comments:

Post a Comment