Sunday 6 December 2020

OBJECT ORIENTED PROGRAMMING(OOP)


Mainly programming languages are divide to two programming paradigms there are,

  • Imperative 
  • Declarative

Object Oriented programming is a example for Imperative programming paradigm an object is a particular instance of a class and consists, essentially of data which defines its characteristics and current status together with procedures, or 'methods' ,which operate on the object.


Principles of object-oriented programming

These are the four main principles of the object-oriented programming paradigm.

1.Polymorphism.


It describes the concept that different classes can be used with the same interface and we can overload a method with different sets of parameters.

 



2.Inheritance.

Inheritance is a mechanism in which one class acquires the property of another class. For example, a child inherits the traits of his/her parents. With inheritance, we can reuse the fields and methods of the existing class.

 



3.Abstraction

Abstraction means displaying only essential information and hiding the details. Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation.

 

 

Imagine a guy want to save csv file on his database so he is coding "database.store(csv)" then he want save video file to his database then he have to type his code like "database.store(video)" so that guy have to type his code again to again but (OOP)abstraction method not like that .In abstraction we not care file type and code like above image. 

4.Encapsulation

Encapsulation is an Object Oriented Programming concept that binds together the data and functions that manipulate the data, and that keeps both safe from outside interference and misuse.

 


If we look above image we can see student's class and teacher's class and plenty of words, I divided those words to these two classes and you can see teachers name and students array belong to teacher's class like wise student name and teacher belong to student's classes that way we can use in programing that's called encapsulation ..

Wednesday 16 September 2020

MAKING A SECURITY ALARM SYSTEM USING ARDUINO


To do this scenario we have to find some components,there are                         
Arduino Uno Board


Bread Board


Ultrasonic Sensor


Buzzer


Jumper Cables


Connecting Cables


After find these things then we have to connect each other like below, As the first step we have to connect ultrasonic sensor to Uno board , If you look ultrasonic sensor you can see 4 Output pins in There, 
  1. VCC Pin
  2. Triger Pin
  3. Echo Pin
  4. Gnd Pin,
I am gonna connect with VCC Pin with 5V supplier in Uno Board & you know 13 digital Pins in Uno board So we can choose one of digital pin to connect Triger Pin & Echo Pin with Uno board ,As a example I choose Triger Pin to "8 digital Pin" and Echo Pin to "9 digital Pin" And final Pin to "Gnd Pin" in Uno board,

After that we have connect buzzer also ,In Buzzer you can see (+)Pin & (-)Pin , we want to connect (+)Pin with one of digital number like what we did in before so I choose "10 digital Pin" to that and (-)Pin to Gnd Pin, then we have connect this to computer by using connecting cable.

Now we connected with all the things with each other and you can see it in a image below

As the next step we have to code now , to do that open your Arduino software and then go to tool and check is it connect with our Uno board and check port also, after that we have to save that in prefer location what you want and the start your code ,
And I embedded my code in below as a image, If you want ,you can copy paste it but don't forget have you change something else like digital pins number ,you have to change it in code also .


Now we made it , If you want you can see it in a my you tube video please click the link below,



Tuesday 21 July 2020

VARIABLES

IF WE TALK ABOUT VARIABLES FIRST WE  EMERGE THE PROBLEM IS "WHAT IS A VARIABLE",


Actually Variables are used to store information to be referenced and manipulated and to pass information around in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their sole purpose is to label and store data in memory. This data can then be used throughout your program.


so now i'am going to focus about main usages in variables there are ,

  • To store information
  • To manipulate data
  • To pass information around in the program,
we can easily understand these ,using some prefer language, so i 'am going use python and scratch languages to describe usages of variables .

To store information



we can simply store data using variables giving the variable name to the left side and locate that store value or name to the right side like below.



Many variables store numbers and strings, like the ones above. Variables can also store other types of data, like lists, dictionaries, and Boolean values (true/false).


To manipulate data


Data manipulation is the process of changing data to make it easier to read or be more organized, Computers may also use data manipulation to display information to users in a more meaningful way, based on code in a software program, web page, or data formatting defined by a user.

as an example,



if you look at the first image of the scratch scenario it shows the score as zero because cat and mouse have some distance, so they are not touching each other though if you look at the second image of the scratch scenario it's showing score is "10" now the reason is whenever the cat is touching mouse score will change by "10", so you can easily understand how variables manipulate data 


To pass information around the program


You can choose among three ways of passing data between programs: By reference, By content, or By value. By reference. The subprogram refers to and processes the data items in the storage of the calling program rather than working on a copy of the data


now the position of the mouse was communicated to the cat using variables, so variables can be used to communicate also...







 

Wednesday 13 May 2020

LITTLE BIT ABOUT C#



C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented, and component-oriented programming disciplines. It was developed around 2000 by Microsoft as part of its .NET initiative and later approved as an international standard by Ecma and ISO. 

C# is one of the programming languages designed for the Common Language Infrastructure (CLI). C# was designed by Anders Hejlsberg, and its development team is currently led by Mads Torgersen. The most recent version is 8.0, which was released in 2019 alongside Visual Studio 2019 version 16.3.

If someone wants to learn c#, first they have to know a little bit about Basic queries about c# and how to manipulate using these queries, So today I am going to explain basic C# queries and mention topics under this passage.


Before do insert, update, search queries first we have to do is create a database, then we need to add functionality to connect to and save data, update data, search for them. to perform these functions first we have to create a SQL connection string .following step will help you to do ,

Step 1 -import the Sqlclient


Step 2 -Copy the connection string


Step 3 -create the connection object


Now we are done with creating the connection object .then we can code insert, update, search queries. let's see how it's happening.

Insert query
Double click on the save button.


Update query
Double click on the update button


Search query
Double click on the search button.


Beyond this blog I created a small video clip for more clarification, It anyone interest, you guys can watch it on my youtube channel, link is given below,





 

 
 

Tuesday 28 April 2020

NIGHT RIDER CIRCUIT BOARD

Today I'm going to describe how to make a night-rider circuit board using Arduino

First of all, we have to know a little bit about Arduino



Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.



We can create a NIGHT-RIDER circuit board using all the components which contain the above



Assemble the circuit according to the above figure, Code the circuit as follow



As the final step, you can upload the code to the Uno Arduino board more details you can watch my youtube video link is given below


Monday 20 January 2020

How to make a software using c#




Mainly we can use .Net framework & Vb to design a software in c# ,but  today i am going to use Vb only 


So lets see how to make a software in this videos









Thanks for watching my videos and if you want to download Vb software please you can click  the link below
https://microsoft-visual-basic.en.softonic.com/download