Thursday 18 June 2020
Thursday, June 18, 2020
SVR ENGINEERING COLLEGE OFFERING ARTIFICIAL INTELLIGENCE NEW B.TECH PROGRAM
http://avrcse.blogspot.com/
No comments
Thursday 14 May 2020
Thursday, May 14, 2020
AP State -Ebooks upto intermediate(free)
http://allebooks.in/apstate.html
ఆంధ్రప్రదేశ్ స్కూల్ బుక్స్ అన్నీ కూడా పిడిఎఫ్ రూపంలో ఈ యొక్క వెబ్ సైట్ లో విద్యార్థుల కోసం అప్లోడ్ చేయబడినది ఇంటర్మీడియట్ వరకు books ప్రతి ఒక్కరు కూడా డౌన్లోడ్ చేసుకోవచ్చు.
Sunday 26 April 2020
Sunday, April 26, 2020
Udemy free courses - Enroll to Udemy Free Online Courses
http://avrcse.blogspot.com/
No comments
#Hello_All : #Freshers as well exp techies.. Use below UDEMI Courses to learn / update / upgrade yourskills in this lock down period!
#Note : Enroll yourself ASAP before its getting as paid! As of now giving FREE course! ( No need to pay)
https://www.udemy.com/share/101tmCAkAcdV5VQX4=/
https://www.udemy.com/share/101uNuAkAcdV5VQX4=/
https://www.udemy.com/course/comprehensive-guide-for-resume-writing/
https://www.udemy.com/course/learn-bigdata-hadoop-with-practical/
https://www.udemy.com/course/complete-java-for-selenium-appium/
https://www.udemy.com/course/istqb-certified-tester-foundation-level-training-ctfl/
https://www.udemy.com/course/selenium-testng-learn-with-java/
https://www.udemy.com/course/bdd-with-cucumber-using-java/
https://www.udemy.com/course/learn-jira-complete-from-scratch-to-expert/
https://www.udemy.com/course/api-rest-soap-testing-using-jmeter-with-real-examples/
https://www.udemy.com/course/performance-testing-hp-loadrunner-updated/
https://www.udemy.com/course/selenium-webdriver-with-java/
https://www.udemy.com/course/master-jmeter-from-basics-performance-load-api-testing/
https://www.udemy.com/course/automate-webservices-rest-api-testing-using-java/
https://www.udemy.com/course/sql-mysql-database-sql/
https://www.udemy.com/course/python-core-and-advanced/
https://www.udemy.com/course/exception-handling-in-python-3-try-except-else-finally-raise/
https://www.udemy.com/course/java-tutorial/
https://www.udemy.com/course/learn-python-language-fundamentals-in-simple-way/
https://www.udemy.com/course/jmeter-step-by-step-for-beginners/
#Note : Enroll yourself ASAP before its getting as paid! As of now giving FREE course! ( No need to pay)
https://www.udemy.com/share/101tmCAkAcdV5VQX4=/
https://www.udemy.com/share/101uNuAkAcdV5VQX4=/
https://www.udemy.com/course/comprehensive-guide-for-resume-writing/
https://www.udemy.com/course/learn-bigdata-hadoop-with-practical/
https://www.udemy.com/course/complete-java-for-selenium-appium/
https://www.udemy.com/course/istqb-certified-tester-foundation-level-training-ctfl/
https://www.udemy.com/course/selenium-testng-learn-with-java/
https://www.udemy.com/course/bdd-with-cucumber-using-java/
https://www.udemy.com/course/learn-jira-complete-from-scratch-to-expert/
https://www.udemy.com/course/api-rest-soap-testing-using-jmeter-with-real-examples/
https://www.udemy.com/course/performance-testing-hp-loadrunner-updated/
https://www.udemy.com/course/selenium-webdriver-with-java/
https://www.udemy.com/course/master-jmeter-from-basics-performance-load-api-testing/
https://www.udemy.com/course/automate-webservices-rest-api-testing-using-java/
https://www.udemy.com/course/sql-mysql-database-sql/
https://www.udemy.com/course/python-core-and-advanced/
https://www.udemy.com/course/exception-handling-in-python-3-try-except-else-finally-raise/
https://www.udemy.com/course/java-tutorial/
https://www.udemy.com/course/learn-python-language-fundamentals-in-simple-way/
https://www.udemy.com/course/jmeter-step-by-step-for-beginners/
Wednesday 1 August 2018
Wednesday, August 01, 2018
OOPS : Abstraction, Encapsulation, Inheritance, Polymorphism (OOPS Features)
http://avrcse.blogspot.com/
No comments
OOPS : Abstraction, Encapsulation, Inheritance, Polymorphism
OOPS Features
* The object oriented programming (OOP) is a programming model
where Programs are organized around object and data rather than
action and logic.
* OOP allow decomposition of a problem into a number of entities called
Object and then builds data and function around these objects.
The Program is divided into number of small units called Object. The data and function are build around these objects.
The data of the objects can be accessed only by the functions associated with that object.
The functions of one object can access the functions of other object.
OOP has the following important features.
Class:
A class is the core of any modern Object Oriented Programming language such as C#.
In OOP languages it is must to create a class for representing data.
Class is a blueprint of an object that contains variables for storing data and functions to performing operations on these data.
Class will not occupy any memory space and hence it is only logical
representation of data.
To create a class, you simply use the keyword "class" followed by the class name:
class Employee
{
}
Object:
Objects are the basic run-time entities in an object oriented system.They may represent a person,a place or any item that the program has to handle.
"Object is a Software bundle of related variable and methods. "
“Object is an instance of a class”
Class will not occupy any memory space. Hence to work with the data represented by the class you must create a variable for the class, which is called as an object.
When an object is created by using the keyword new, then memory will be allocated for the class in heap memory area, which is called as an instance and its starting address will be stored in the object in stack memory area.
When an object is created without the keyword new, then memory will not be allocated in heap I.e. instance will not be created and object in the stack contains the value null.
When an object contains null, then it is not possible to access the members of the class using that object.
class Employee
{
}
Syntax to create an object of class Employee:-
Employee objEmp = new Employee();
All the programming languages supporting object oriented Programming will be supporting these three main concepts:
Encapsulation
Inheritance
Polymorphism
Abstraction:
Abstraction is "To represent the essential feature without representing the back ground details."
Abstraction lets you focus on what the object does instead of how it does it.
Abstraction provides you a generalized view of your classes or object by providing relevant information.
Abstraction is the process of hiding the working style of an object, and showing the information of an object in understandable manner.
Real world Example of Abstraction: -
Suppose you have an object Mobile Phone.
Suppose you have 3 mobile phones as following:-
Nokia 1400 (Features:- Calling, SMS)
Nokia 2700 (Features:- Calling, SMS, FM Radio, MP3, Camera)
Black Berry (Features:-Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails)
Abstract information (Necessary and Common Information) for the object "Mobile Phone" is make a call to any number and can send SMS."
so that, for mobile phone object you will have abstract class like following:-
abstract class MobilePhone
{
public void Calling();
public void SendSMS();
}
public class Nokia1400 : MobilePhone
{
}
public class Nokia2700 : MobilePhone
{
public void FMRadio();
public void MP3();
public void Camera();
}
public class BlackBerry : MobilePhone
{
public void FMRadio();
public void MP3();
public void Camera();
public void Recording();
public void ReadAndSendEmails();
}
Abstraction means putting all the variables and methods in a class which are necessary.
For example: - Abstract class and abstract method.
Abstraction is the common thing.
example:
If somebody in your collage tell you to fill application form, you will fill your details like name, address, data of birth, which semester, percentage you have got etc.
If some doctor gives you an application to fill the details, you will fill the details like name, address, date of birth, blood group, height and weight.
See in the above example what is the common thing?
Age, name, address so you can create the class which consist of common thing that is called abstract class.
That class is not complete and it can inherit by other class.
Encapsulation:
Wrapping up data member and method together into a single unit (i.e. Class) is called Encapsulation.
Encapsulation is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.
Encapsulation is like your bag in which you can keep your pen, book etc. It means this is the property of encapsulating members and functions.
class Bag
{
book;
pen;
ReadBook();
}
Encapsulation means hiding the internal details of an object, i.e. how an object does something.
Encapsulation prevents clients from seeing its inside view, where the behaviour of the abstraction is implemented.
Encapsulation is a technique used to protect the information in an object from the other object.
Hide the data for security such as making the variables as private, and expose the property to access the private data which would be public.
So, when you access the property you can validate the data and set it.
Example:
class Demo
{
private int _mark;
public int Mark
{
get { return _mark; }
set { if (_mark > 0) _mark = value; else _mark = 0; }
}
}
Real world Example of Encapsulation:-
Let's take example of Mobile Phone and Mobile Phone Manufacturer
Suppose you are a Mobile Phone Manufacturer and you designed and developed a Mobile Phone design(class), now by using machinery you are manufacturing a Mobile Phone(object) for selling, when you sell your Mobile Phone the user only learn how to use the Mobile Phone but not that how this Mobile Phone works.
This means that you are creating the class with function and by making object (capsule) of it you are making availability of the functionality of you class by that object and without the interference in the original class.
Example-2:
TV operation
It is encapsulated with cover and we can operate with remote and no need to open TV and change the channel.
Here everything is in private except remote so that anyone can access not to operate and change the things in TV.
Inheritance:
When a class acquire the property of another class is known as inheritance.
Inheritance is process of object reusability.
For example, A Child acquire property of Parents.
public class ParentClass
{
public ParentClass()
{
Console.WriteLine("Parent Constructor.");
}
public void print()
{
Console.WriteLine("I'm a Parent Class.");
}
}
public class ChildClass : ParentClass
{
public ChildClass()
{
Console.WriteLine("Child Constructor.");
}
public static void Main()
{
ChildClass child = new ChildClass();
child.print();
}
}
Output:
Parent Constructor.
Child Constructor.
I'm a Parent Class.
Polymorphism:
Polymorphism means one name many forms.
One function behaves different forms.
In other words, "Many forms of a single object is called Polymorphism."
Real World Example of Polymorphism:
Example-1:
A Teacher behaves to student.
A Teacher behaves to his/her seniors.
Here teacher is an object but attitude is different in different situation.
Example-2:
Person behaves SON in house at the same time that person behaves EMPLOYEE in office.
Example-3:
Your mobile phone, one name but many forms
As phone
As camera
As mp3 player
As radio
To Read Polmorphism in Detail click following link:-
Polymorphism in .Net
Difference between Abstraction andEncapsulation :-
For Example:-
Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number.
4. Encapsulation- Inner layout, used in terms of implementation.
For Example:- Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connect with each other using circuits.
The easier way to understand Abstraction and encapsulation is as follows:-
Real World Example:-
Take an example of Mobile Phone:-
You have a Mobile Phone, you can dial a number using keypad buttons. Even you don't know how these are working internally. This is called Abstraction. You have the only information that is needed to dial a number. But not its internal working of mobile.
But how the Mobile Phone internally working?, how keypad buttons are connected with internal circuit? is called Encapsulation.
Summary:
"Encapsulation is accomplished by using Class. - Keeping data and methods that accesses that data into a single unit"
"Abstraction is accomplished by using Interface. - Just giving the abstract information about what it can do without specifying the back ground details"
"Information/Data hiding is accomplished by using Modifiers - By keeping the instance variables private or protected."
Constructor types with example programs in C#.NET
Definition:
In simple terms, Constructor is a special kind of method with class name as method name and gets executed when its (class) object is created.
This article will give you a detailed explanation on C# constructors and its types.
Now, when we look at the above definition in a broader sense, a constructor is a class method that gets automatically executed whenever class’s object is created.
A special method of the class that will be automatically invoked when an instance of the class is created is called as constructor.
Constructors can be classified into 5 types
Default Constructor
Parameterized Constructor
Copy Constructor
Static Constructor
Private Constructor
Default Constructor : A constructor without any parameters is called as default constructor. Drawback of default constructor is every instance of the class will be initialized to same values and it is not possible to initialize each instance of the class to different values.
Example for Default Constructor
Parameterized Constructor : A constructor with at least one parameter is called as parameterized constructor. Advantage of parameterized constructor is you can initialize each instance of the class to different values.
Example for Parameterized Constructor
using System;
namespace ProgramCall
{
class Test1
{
//Private fields of class
int A, B;
//default Constructor
public Test1()
{
A = 10;
B = 20;
}
//Paremetrized Constructor
public Test1(int X, int Y)
{
A = X;
B = Y;
}
//Method to print
public void Print()
{
Console.WriteLine("A = {0}\tB = {1}", A, B);
}
}
class MainClass
{
static void Main()
{
Test1 T1 = new Test1(); //Default Constructor is called
Test1 T2 = new Test1(80, 40); //Parameterized Constructor is called
T1.Print();
T2.Print();
Console.Read();
}
}
}
Output
A = 10 B = 20
A = 80 B = 40
Copy Constructor : A parameterized constructor that contains a parameter of same class type is called as copy constructor. Main purpose of copy constructor is to initialize new instance to the values of an existing instance.
Example for Copy Constructor
using System;
namespace ProgramCall
{
class Test2
{
int A, B;
public Test2(int X, int Y)
{
A = X;
B = Y;
}
//Copy Constructor
public Test2(Test2 T)
{
A = T.A;
B = T.B;
}
public void Print()
{
Console.WriteLine("A = {0}\tB = {1}", A, B);
}
}
class CopyConstructor
{
static void Main()
{
Test2 T2 = new Test2(80, 90);
//Invoking copy constructor
Test2 T3 = new Test2(T2);
T2.Print();
T3.Print();
Console.Read();
}
}
}
Output
A = 80 B = 90
A = 80 B = 90
Static Constructor : You can create a constructor as static and when a constructor is created as static, it will be invoked only once for any number of instances of the class and it is during the creation of first instance of the class or the first reference to a static member in the class. Static constructor is used to initialize static fields of the class and to write the code that needs to be executed only once.
Example for Static Constructor
using System;
namespace ProgramCall
{
class Test3
{
public Test3()
{
Console.WriteLine("Instance Constructor");
}
static Test3()
{
Console.WriteLine("Static Constructor");
}
}
class StaticConstructor
{
static void Main()
{
//Static Constructor and instance constructor, both are invoked for first instance.
Test3 T1 = new Test3();
//Only instance constructor is invoked.
Test3 T2 = new Test3();
Console.Read();
}
}
}
Output
Static Constructor
Instance Constructor
Instance Constructor
Private Constructor : You can also create a constructor as private. When a class contains at least one private constructor, then it is not possible to create an instance for the class. Private constructor is used to restrict the class from being instantiated when it contains every member as static.
Some unique points related to constructors are as follows
A class can have any number of constructors.
A constructor doesn’t have any return type even void.
A static constructor can not be a parameterized constructor.
Within a class you can create only one static constructor.
Note
Ø A static constructor should not be declared with any access modifier.
Ø A static constructor does not accept parameters
Ø A static constructor is called automatically.
Ø There is no way to call a static constructor directly.
Ø Can’t stop the execution of Static constructor
Points to Remember
Ø Constructor is nothing but a special method, which initializes the class or its task to initialize the object of it class.
Ø Its name must be same as the name of class
Ø This is a special method as constructors do not have return types, not even void
Ø Constructor cannot return any value because they didn’t have any return type.
Ø Constructor can’t be get inherited, although a derived class can class the base class constructor.
Ø A class has atleast one constructor also known as default constructor [a constructor without parameter]
Ø You have to explicitly write a default constructor while overloading constructors.
Ø Concept declaring multiple constructors of a class with different sets of parameters known as Constructor overloading.
Ø A constructor can be called another constructor using this()
OOPS Features
* The object oriented programming (OOP) is a programming model
where Programs are organized around object and data rather than
action and logic.
* OOP allow decomposition of a problem into a number of entities called
Object and then builds data and function around these objects.
The Program is divided into number of small units called Object. The data and function are build around these objects.
The data of the objects can be accessed only by the functions associated with that object.
The functions of one object can access the functions of other object.
OOP has the following important features.
Class:
A class is the core of any modern Object Oriented Programming language such as C#.
In OOP languages it is must to create a class for representing data.
Class is a blueprint of an object that contains variables for storing data and functions to performing operations on these data.
Class will not occupy any memory space and hence it is only logical
representation of data.
To create a class, you simply use the keyword "class" followed by the class name:
class Employee
{
}
Object:
Objects are the basic run-time entities in an object oriented system.They may represent a person,a place or any item that the program has to handle.
"Object is a Software bundle of related variable and methods. "
“Object is an instance of a class”
Class will not occupy any memory space. Hence to work with the data represented by the class you must create a variable for the class, which is called as an object.
When an object is created by using the keyword new, then memory will be allocated for the class in heap memory area, which is called as an instance and its starting address will be stored in the object in stack memory area.
When an object is created without the keyword new, then memory will not be allocated in heap I.e. instance will not be created and object in the stack contains the value null.
When an object contains null, then it is not possible to access the members of the class using that object.
class Employee
{
}
Syntax to create an object of class Employee:-
Employee objEmp = new Employee();
All the programming languages supporting object oriented Programming will be supporting these three main concepts:
Encapsulation
Inheritance
Polymorphism
Abstraction:
Abstraction is "To represent the essential feature without representing the back ground details."
Abstraction lets you focus on what the object does instead of how it does it.
Abstraction provides you a generalized view of your classes or object by providing relevant information.
Abstraction is the process of hiding the working style of an object, and showing the information of an object in understandable manner.
Real world Example of Abstraction: -
Suppose you have an object Mobile Phone.
Suppose you have 3 mobile phones as following:-
Nokia 1400 (Features:- Calling, SMS)
Nokia 2700 (Features:- Calling, SMS, FM Radio, MP3, Camera)
Black Berry (Features:-Calling, SMS, FM Radio, MP3, Camera, Video Recording, Reading E-mails)
Abstract information (Necessary and Common Information) for the object "Mobile Phone" is make a call to any number and can send SMS."
so that, for mobile phone object you will have abstract class like following:-
abstract class MobilePhone
{
public void Calling();
public void SendSMS();
}
public class Nokia1400 : MobilePhone
{
}
public class Nokia2700 : MobilePhone
{
public void FMRadio();
public void MP3();
public void Camera();
}
public class BlackBerry : MobilePhone
{
public void FMRadio();
public void MP3();
public void Camera();
public void Recording();
public void ReadAndSendEmails();
}
Abstraction means putting all the variables and methods in a class which are necessary.
For example: - Abstract class and abstract method.
Abstraction is the common thing.
example:
If somebody in your collage tell you to fill application form, you will fill your details like name, address, data of birth, which semester, percentage you have got etc.
If some doctor gives you an application to fill the details, you will fill the details like name, address, date of birth, blood group, height and weight.
See in the above example what is the common thing?
Age, name, address so you can create the class which consist of common thing that is called abstract class.
That class is not complete and it can inherit by other class.
Encapsulation:
Wrapping up data member and method together into a single unit (i.e. Class) is called Encapsulation.
Encapsulation is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.
Encapsulation is like your bag in which you can keep your pen, book etc. It means this is the property of encapsulating members and functions.
class Bag
{
book;
pen;
ReadBook();
}
Encapsulation means hiding the internal details of an object, i.e. how an object does something.
Encapsulation prevents clients from seeing its inside view, where the behaviour of the abstraction is implemented.
Encapsulation is a technique used to protect the information in an object from the other object.
Hide the data for security such as making the variables as private, and expose the property to access the private data which would be public.
So, when you access the property you can validate the data and set it.
Example:
class Demo
{
private int _mark;
public int Mark
{
get { return _mark; }
set { if (_mark > 0) _mark = value; else _mark = 0; }
}
}
Real world Example of Encapsulation:-
Let's take example of Mobile Phone and Mobile Phone Manufacturer
Suppose you are a Mobile Phone Manufacturer and you designed and developed a Mobile Phone design(class), now by using machinery you are manufacturing a Mobile Phone(object) for selling, when you sell your Mobile Phone the user only learn how to use the Mobile Phone but not that how this Mobile Phone works.
This means that you are creating the class with function and by making object (capsule) of it you are making availability of the functionality of you class by that object and without the interference in the original class.
Example-2:
TV operation
It is encapsulated with cover and we can operate with remote and no need to open TV and change the channel.
Here everything is in private except remote so that anyone can access not to operate and change the things in TV.
Inheritance:
When a class acquire the property of another class is known as inheritance.
Inheritance is process of object reusability.
For example, A Child acquire property of Parents.
public class ParentClass
{
public ParentClass()
{
Console.WriteLine("Parent Constructor.");
}
public void print()
{
Console.WriteLine("I'm a Parent Class.");
}
}
public class ChildClass : ParentClass
{
public ChildClass()
{
Console.WriteLine("Child Constructor.");
}
public static void Main()
{
ChildClass child = new ChildClass();
child.print();
}
}
Output:
Parent Constructor.
Child Constructor.
I'm a Parent Class.
Polymorphism:
Polymorphism means one name many forms.
One function behaves different forms.
In other words, "Many forms of a single object is called Polymorphism."
Real World Example of Polymorphism:
Example-1:
A Teacher behaves to student.
A Teacher behaves to his/her seniors.
Here teacher is an object but attitude is different in different situation.
Example-2:
Person behaves SON in house at the same time that person behaves EMPLOYEE in office.
Example-3:
Your mobile phone, one name but many forms
As phone
As camera
As mp3 player
As radio
To Read Polmorphism in Detail click following link:-
Polymorphism in .Net
Difference between Abstraction andEncapsulation :-
Abstraction
|
Encapsulation
|
1. Abstraction solves the problem in the design level.
|
1. Encapsulation solves the problem in the implementation level.
|
2. Abstraction is used for hiding the unwanted data and giving relevant data.
|
2. Encapsulation means hiding the code and data into a single unit to protect the data from outside world.
|
3. Abstraction lets you focus on what the object does instead of how it does it
|
3. Encapsulation means hiding the internal details or mechanics of how an object does something.
|
4. Abstraction- Outer layout, used in terms of design.
For Example:-
Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number.
|
4. Encapsulation- Inner layout, used in terms of implementation.
For Example:- Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connect with each other using circuits.
|
Outer Look of a Mobile Phone, like it has a display screen and keypad buttons to dial a number.
4. Encapsulation- Inner layout, used in terms of implementation.
For Example:- Inner Implementation detail of a Mobile Phone, how keypad button and Display Screen are connect with each other using circuits.
The easier way to understand Abstraction and encapsulation is as follows:-
Real World Example:-
Take an example of Mobile Phone:-
You have a Mobile Phone, you can dial a number using keypad buttons. Even you don't know how these are working internally. This is called Abstraction. You have the only information that is needed to dial a number. But not its internal working of mobile.
But how the Mobile Phone internally working?, how keypad buttons are connected with internal circuit? is called Encapsulation.
Summary:
"Encapsulation is accomplished by using Class. - Keeping data and methods that accesses that data into a single unit"
"Abstraction is accomplished by using Interface. - Just giving the abstract information about what it can do without specifying the back ground details"
"Information/Data hiding is accomplished by using Modifiers - By keeping the instance variables private or protected."
Constructor types with example programs in C#.NET
Definition:
In simple terms, Constructor is a special kind of method with class name as method name and gets executed when its (class) object is created.
This article will give you a detailed explanation on C# constructors and its types.
Now, when we look at the above definition in a broader sense, a constructor is a class method that gets automatically executed whenever class’s object is created.
A special method of the class that will be automatically invoked when an instance of the class is created is called as constructor.
Constructors can be classified into 5 types
Default Constructor
Parameterized Constructor
Copy Constructor
Static Constructor
Private Constructor
Default Constructor : A constructor without any parameters is called as default constructor. Drawback of default constructor is every instance of the class will be initialized to same values and it is not possible to initialize each instance of the class to different values.
Example for Default Constructor
Parameterized Constructor : A constructor with at least one parameter is called as parameterized constructor. Advantage of parameterized constructor is you can initialize each instance of the class to different values.
Example for Parameterized Constructor
using System;
namespace ProgramCall
{
class Test1
{
//Private fields of class
int A, B;
//default Constructor
public Test1()
{
A = 10;
B = 20;
}
//Paremetrized Constructor
public Test1(int X, int Y)
{
A = X;
B = Y;
}
//Method to print
public void Print()
{
Console.WriteLine("A = {0}\tB = {1}", A, B);
}
}
class MainClass
{
static void Main()
{
Test1 T1 = new Test1(); //Default Constructor is called
Test1 T2 = new Test1(80, 40); //Parameterized Constructor is called
T1.Print();
T2.Print();
Console.Read();
}
}
}
Output
A = 10 B = 20
A = 80 B = 40
Copy Constructor : A parameterized constructor that contains a parameter of same class type is called as copy constructor. Main purpose of copy constructor is to initialize new instance to the values of an existing instance.
Example for Copy Constructor
using System;
namespace ProgramCall
{
class Test2
{
int A, B;
public Test2(int X, int Y)
{
A = X;
B = Y;
}
//Copy Constructor
public Test2(Test2 T)
{
A = T.A;
B = T.B;
}
public void Print()
{
Console.WriteLine("A = {0}\tB = {1}", A, B);
}
}
class CopyConstructor
{
static void Main()
{
Test2 T2 = new Test2(80, 90);
//Invoking copy constructor
Test2 T3 = new Test2(T2);
T2.Print();
T3.Print();
Console.Read();
}
}
}
Output
A = 80 B = 90
A = 80 B = 90
Static Constructor : You can create a constructor as static and when a constructor is created as static, it will be invoked only once for any number of instances of the class and it is during the creation of first instance of the class or the first reference to a static member in the class. Static constructor is used to initialize static fields of the class and to write the code that needs to be executed only once.
Example for Static Constructor
using System;
namespace ProgramCall
{
class Test3
{
public Test3()
{
Console.WriteLine("Instance Constructor");
}
static Test3()
{
Console.WriteLine("Static Constructor");
}
}
class StaticConstructor
{
static void Main()
{
//Static Constructor and instance constructor, both are invoked for first instance.
Test3 T1 = new Test3();
//Only instance constructor is invoked.
Test3 T2 = new Test3();
Console.Read();
}
}
}
Output
Static Constructor
Instance Constructor
Instance Constructor
Private Constructor : You can also create a constructor as private. When a class contains at least one private constructor, then it is not possible to create an instance for the class. Private constructor is used to restrict the class from being instantiated when it contains every member as static.
Some unique points related to constructors are as follows
A class can have any number of constructors.
A constructor doesn’t have any return type even void.
A static constructor can not be a parameterized constructor.
Within a class you can create only one static constructor.
Note
Ø A static constructor should not be declared with any access modifier.
Ø A static constructor does not accept parameters
Ø A static constructor is called automatically.
Ø There is no way to call a static constructor directly.
Ø Can’t stop the execution of Static constructor
Points to Remember
Ø Constructor is nothing but a special method, which initializes the class or its task to initialize the object of it class.
Ø Its name must be same as the name of class
Ø This is a special method as constructors do not have return types, not even void
Ø Constructor cannot return any value because they didn’t have any return type.
Ø Constructor can’t be get inherited, although a derived class can class the base class constructor.
Ø A class has atleast one constructor also known as default constructor [a constructor without parameter]
Ø You have to explicitly write a default constructor while overloading constructors.
Ø Concept declaring multiple constructors of a class with different sets of parameters known as Constructor overloading.
Ø A constructor can be called another constructor using this()
Friday 8 June 2018
Friday, June 08, 2018
Mathematical Symbols and signs - meanings
Mathematical Symbols
List of all mathematical symbols and signs - meaning and examples.
- Basic math symbols
- Geometry symbols
- Algebra symbols
- Probability & statistics symbols
- Set theory symbols
- Logic symbols
- Calculus & analysis symbols
- Number symbols
- Greek symbols
- Roman numerals
Basic math symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
= | equals sign | equality | 5 = 2+3 5 is equal to 2+3 |
≠ | not equal sign | inequality | 5 ≠ 4 5 is not equal to 4 |
≈ | approximately equal | approximation | sin(0.01) ≈ 0.01, x ≈ y means x is approximately equal to y |
> | strict inequality | greater than | 5 > 4 5 is greater than 4 |
< | strict inequality | less than | 4 < 5 4 is less than 5 |
≥ | inequality | greater than or equal to | 5 ≥ 4, x ≥ y means x is greater than or equal to y |
≤ | inequality | less than or equal to | 4 ≤ 5, x ≤ y means x is less than or equal to y |
( ) | parentheses | calculate expression inside first | 2 × (3+5) = 16 |
[ ] | brackets | calculate expression inside first | [(1+2)×(1+5)] = 18 |
+ | plus sign | addition | 1 + 1 = 2 |
− | minus sign | subtraction | 2 − 1 = 1 |
± | plus - minus | both plus and minus operations | 3 ± 5 = 8 and -2 |
± | minus - plus | both minus and plus operations | 3 ∓ 5 = -2 and 8 |
* | asterisk | multiplication | 2 * 3 = 6 |
× | times sign | multiplication | 2 × 3 = 6 |
⋅ | multiplication dot | multiplication | 2 ⋅ 3 = 6 |
÷ | division sign / obelus | division | 6 ÷ 2 = 3 |
/ | division slash | division | 6 / 2 = 3 |
— | horizontal line | division / fraction | |
mod | modulo | remainder calculation | 7 mod 2 = 1 |
. | period | decimal point, decimal separator | 2.56 = 2+56/100 |
ab | power | exponent | 23 = 8 |
a^b | caret | exponent | 2 ^ 3 = 8 |
√a | square root |
√a ⋅ √a = a
| √9 = ±3 |
3√a | cube root | 3√a ⋅ 3√a ⋅ 3√a = a | 3√8 = 2 |
4√a | fourth root | 4√a ⋅ 4√a ⋅ 4√a ⋅ 4√a = a | 4√16 = ±2 |
n√a | n-th root (radical) | for n=3, n√8 = 2 | |
% | percent | 1% = 1/100 | 10% × 30 = 3 |
‰ | per-mille | 1‰ = 1/1000 = 0.1% | 10‰ × 30 = 0.3 |
ppm | per-million | 1ppm = 1/1000000 | 10ppm × 30 = 0.0003 |
ppb | per-billion | 1ppb = 1/1000000000 | 10ppb × 30 = 3×10-7 |
ppt | per-trillion | 1ppt = 10-12 | 10ppt × 30 = 3×10-10 |
Geometry symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
∠ | angle | formed by two rays | ∠ABC = 30° |
measured angle | ABC = 30° | ||
spherical angle | AOB = 30° | ||
∟ | right angle | = 90° | α = 90° |
° | degree | 1 turn = 360° | α = 60° |
deg | degree | 1 turn = 360deg | α = 60deg |
′ | prime | arcminute, 1° = 60′ | α = 60°59′ |
″ | double prime | arcsecond, 1′ = 60″ | α = 60°59′59″ |
line | infinite line | ||
AB | line segment | line from point A to point B | |
ray | line that start from point A | ||
arc | arc from point A to point B | = 60° | |
⊥ | perpendicular | perpendicular lines (90° angle) | AC ⊥ BC |
| | | parallel | parallel lines | AB | | CD |
≅ | congruent to | equivalence of geometric shapes and size | ∆ABC≅ ∆XYZ |
~ | similarity | same shapes, not same size | ∆ABC~ ∆XYZ |
Δ | triangle | triangle shape | ΔABC≅ ΔBCD |
|x-y| | distance | distance between points x and y | | x-y | = 5 |
π | pi constant | π = 3.141592654...
is the ratio between the circumference and diameter of a circle
| c = π⋅d = 2⋅π⋅r |
rad | radians | radians angle unit | 360° = 2π rad |
c | radians | radians angle unit | 360° = 2π c |
grad | gradians / gons | grads angle unit | 360° = 400 grad |
g | gradians / gons | grads angle unit | 360° = 400 g |
Algebra symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
x | x variable | unknown value to find | when 2x = 4, then x = 2 |
≡ | equivalence | identical to | |
≜ | equal by definition | equal by definition | |
:= | equal by definition | equal by definition | |
~ | approximately equal | weak approximation | 11 ~ 10 |
≈ | approximately equal | approximation | sin(0.01) ≈ 0.01 |
∝ | proportional to | proportional to |
y ∝ x when y = kx, kconstant
|
∞ | lemniscate | infinity symbol | |
≪ | much less than | much less than | 1 ≪ 1000000 |
≫ | much greater than | much greater than | 1000000 ≫ 1 |
( ) | parentheses | calculate expression inside first | 2 * (3+5) = 16 |
[ ] | brackets | calculate expression inside first | [(1+2)*(1+5)] = 18 |
{ } | braces | set | |
⌊x⌋ | floor brackets | rounds number to lower integer | ⌊4.3⌋ = 4 |
⌈x⌉ | ceiling brackets | rounds number to upper integer | ⌈4.3⌉ = 5 |
x! | exclamation mark | factorial | 4! = 1*2*3*4 = 24 |
| x | | single vertical bar | absolute value | | -5 | = 5 |
f (x) | function of x | maps values of x to f(x) | f (x) = 3x+5 |
(f ∘ g) | function composition | (f ∘ g) (x) = f (g(x)) | f (x)=3x,g(x)=x-1 ⇒(f ∘ g)(x)=3(x-1) |
(a,b) | open interval | (a,b) = {x | a < x < b} | x∈ (2,6) |
[a,b] | closed interval | [a,b] = {x | a ≤ x ≤ b} | x ∈ [2,6] |
∆ | delta | change / difference | ∆t = t1 - t0 |
∆ | discriminant | Δ = b2 - 4ac | |
∑ | sigma | summation - sum of all values in range of series | ∑ xi= x1+x2+...+xn |
∑∑ | sigma | double summation | |
∏ | capital pi | product - product of all values in range of series | ∏ xi=x1∙x2∙...∙xn |
e | e constant / Euler's number | e = 2.718281828... | e = lim (1+1/x)x , x→∞ |
γ | Euler-Mascheroni constant | γ = 0.5772156649... | |
φ | golden ratio | golden ratio constant | |
π | pi constant | π = 3.141592654...
is the ratio between the circumference and diameter of a circle
| c = π⋅d = 2⋅π⋅r |
Linear Algebra Symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
· | dot | scalar product | a · b |
× | cross | vector product | a × b |
A⊗B | tensor product | tensor product of A and B | A ⊗ B |
inner product | |||
[ ] | brackets | matrix of numbers | |
( ) | parentheses | matrix of numbers | |
| A | | determinant | determinant of matrix A | |
det(A) | determinant | determinant of matrix A | |
|| x || | double vertical bars | norm | |
AT | transpose | matrix transpose | (AT)ij = (A)ji |
A† | Hermitian matrix | matrix conjugate transpose | (A†)ij = (A)ji |
A* | Hermitian matrix | matrix conjugate transpose | (A*)ij = (A)ji |
A -1 | inverse matrix | A A-1 = I | |
rank(A) | matrix rank | rank of matrix A | rank(A) = 3 |
dim(U) | dimension | dimension of matrix A | dim(U) = 3 |
Probability and statistics symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
P(A) | probability function | probability of event A | P(A) = 0.5 |
P(A ∩ B) | probability of events intersection | probability that of events A and B | P(A∩B) = 0.5 |
P(A ∪ B) | probability of events union | probability that of events A or B | P(A∪B) = 0.5 |
P(A | B) | conditional probability function | probability of event A given event B occured | P(A | B) = 0.3 |
f (x) | probability density function (pdf) | P(a ≤ x ≤ b) = ∫ f (x) dx | |
F(x) | cumulative distribution function (cdf) | F(x) = P(X≤ x) | |
μ | population mean | mean of population values | μ = 10 |
E(X) | expectation value | expected value of random variable X | E(X) = 10 |
E(X | Y) | conditional expectation | expected value of random variable X given Y | E(X | Y=2) = 5 |
var(X) | variance | variance of random variable X | var(X) = 4 |
σ2 | variance | variance of population values | σ2 = 4 |
std(X) | standard deviation | standard deviation of random variable X | std(X) = 2 |
σX | standard deviation | standard deviation value of random variable X | σX = 2 |
median | middle value of random variable x | ||
cov(X,Y) | covariance | covariance of random variables X and Y | cov(X,Y) = 4 |
corr(X,Y) | correlation | correlation of random variables X and Y | corr(X,Y) = 0.6 |
ρX,Y | correlation | correlation of random variables X and Y | ρX,Y = 0.6 |
∑ | summation | summation - sum of all values in range of series | |
∑∑ | double summation | double summation | |
Mo | mode | value that occurs most frequently in population | |
MR | mid-range | MR = (xmax+xmin)/2 | |
Md | sample median | half the population is below this value | |
Q1 | lower / first quartile | 25% of population are below this value | |
Q2 | median / second quartile | 50% of population are below this value = median of samples | |
Q3 | upper / third quartile | 75% of population are below this value | |
x | sample mean | average / arithmetic mean | x = (2+5+9) / 3 = 5.333 |
s 2 | sample variance | population samples variance estimator | s 2 = 4 |
s | sample standard deviation | population samples standard deviation estimator | s = 2 |
zx | standard score | zx = (x-x) / sx | |
X ~ | distribution of X | distribution of random variable X | X ~ N(0,3) |
N(μ,σ2) | normal distribution | gaussian distribution | X ~ N(0,3) |
U(a,b) | uniform distribution | equal probability in range a,b | X ~ U(0,3) |
exp(λ) | exponential distribution | f (x) = λe-λx , x≥0 | |
gamma(c, λ) | gamma distribution | f (x) = λ c xc-1e-λx / Γ(c), x≥0 | |
χ 2(k) | chi-square distribution | f (x) = xk/2-1e-x/2 / ( 2k/2 Γ(k/2) ) | |
F (k1, k2) | F distribution | ||
Bin(n,p) | binomial distribution | f (k) = nCk pk(1-p)n-k | |
Poisson(λ) | Poisson distribution | f (k) = λke-λ / k! | |
Geom(p) | geometric distribution | f (k) = p(1-p) k | |
HG(N,K,n) | hyper-geometric distribution | ||
Bern(p) | Bernoulli distribution |
Combinatorics Symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
n! | factorial | n! = 1⋅2⋅3⋅...⋅n | 5! = 1⋅2⋅3⋅4⋅5 = 120 |
nPk | permutation | 5P3 = 5! / (5-3)! = 60 | |
nCk | combination | 5C3 = 5!/[3!(5-3)!]=10 |
Set theory symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
{ } | set | a collection of elements | A = {3,7,9,14}, B = {9,14,28} |
A ∩ B | intersection | objects that belong to set A and set B | A ∩ B = {9,14} |
A ∪ B | union | objects that belong to set A or set B | A ∪ B = {3,7,9,14,28} |
A ⊆ B | subset | A is a subset of B. set A is included in set B. | {9,14,28} ⊆ {9,14,28} |
A ⊂ B | proper subset / strict subset | A is a subset of B, but A is not equal to B. | {9,14} ⊂ {9,14,28} |
A ⊄ B | not subset | set A is not a subset of set B | {9,66} ⊄ {9,14,28} |
A ⊇ B | superset | A is a superset of B. set A includes set B | {9,14,28} ⊇ {9,14,28} |
A ⊃ B | proper superset / strict superset | A is a superset of B, but B is not equal to A. | {9,14,28} ⊃ {9,14} |
A ⊅ B | not superset | set A is not a superset of set B | {9,14,28} ⊅ {9,66} |
2A | power set | all subsets of A | |
power set | all subsets of A | ||
A = B | equality | both sets have the same members | A={3,9,14}, B={3,9,14}, A=B |
Ac | complement | all the objects that do not belong to set A | |
A \ B | relative complement | objects that belong to A and not to B | A = {3,9,14}, B = {1,2,3}, A-B = {9,14} |
A - B | relative complement | objects that belong to A and not to B | A = {3,9,14}, B = {1,2,3}, A-B = {9,14} |
A ∆ B | symmetric difference | objects that belong to A or B but not to their intersection | A = {3,9,14}, B = {1,2,3}, A ∆ B = {1,2,9,14} |
A ⊖ B | symmetric difference | objects that belong to A or B but not to their intersection | A = {3,9,14}, B = {1,2,3}, A ⊖ B = {1,2,9,14} |
a∈A | element of | set membership | A={3,9,14}, 3 ∈ A |
x∉A | not element of | no set membership | A={3,9,14}, 1 ∉ A |
(a,b) | ordered pair | collection of 2 elements | |
A×B | cartesian product | set of all ordered pairs from A and B | |
|A| | cardinality | the number of elements of set A | A={3,9,14}, |A|=3 |
#A | cardinality | the number of elements of set A | A={3,9,14}, #A=3 |
aleph-null | infinite cardinality of natural numbers set | ||
aleph-one | cardinality of countable ordinal numbers set | ||
Ø | empty set | Ø = { } | C = {Ø} |
universal set | set of all possible values | ||
0 | natural numbers / whole numbers set (with zero) | 0 = {0,1,2,3,4,...} | 0 ∈ 0 |
1 | natural numbers / whole numbers set (without zero) | 1 = {1,2,3,4,5,...} | 6 ∈ 1 |
integer numbers set | = {...-3,-2,-1,0,1,2,3,...} | -6 ∈ | |
rational numbers set | = {x | x=a/b, a,b∈} | 2/6 ∈ | |
real numbers set | = {x | -∞ < x <∞} | 6.343434∈ | |
complex numbers set | = {z | z=a+bi, -∞<a<∞, -∞<b<∞} | 6+2i ∈ |
Logic symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
⋅ | and | and | x ⋅ y |
^ | caret / circumflex | and | x ^ y |
& | ampersand | and | x & y |
+ | plus | or | x + y |
∨ | reversed caret | or | x ∨ y |
| | vertical line | or | x | y |
x' | single quote | not - negation | x' |
x | bar | not - negation | x |
¬ | not | not - negation | ¬ x |
! | exclamation mark | not - negation | ! x |
⊕ | circled plus / oplus | exclusive or - xor | x ⊕ y |
~ | tilde | negation | ~ x |
⇒ | implies | ||
⇔ | equivalent | if and only if (iff) | |
↔ | equivalent | if and only if (iff) | |
∀ | for all | ||
∃ | there exists | ||
∄ | there does not exists | ||
∴ | therefore | ||
∵ | because / since |
Calculus & analysis symbols
Symbol | Symbol Name | Meaning / definition | Example |
---|---|---|---|
limit | limit value of a function | ||
ε | epsilon | represents a very small number, near zero | ε → 0 |
e | e constant / Euler's number | e = 2.718281828... | e = lim (1+1/x)x, x→∞ |
y ' | derivative | derivative - Lagrange's notation | (3x3)' = 9x2 |
y '' | second derivative | derivative of derivative | (3x3)'' = 18x |
y(n) | nth derivative | n times derivation | (3x3)(3) = 18 |
derivative | derivative - Leibniz's notation | d(3x3)/dx = 9x2 | |
second derivative | derivative of derivative | d2(3x3)/dx2 = 18x | |
nth derivative | n times derivation | ||
time derivative | derivative by time - Newton's notation | ||
time second derivative | derivative of derivative | ||
Dx y | derivative | derivative - Euler's notation | |
Dx2y | second derivative | derivative of derivative | |
partial derivative | ∂(x2+y2)/∂x = 2x | ||
∫ | integral | opposite to derivation | ∫ f(x)dx |
∫∫ | double integral | integration of function of 2 variables | ∫∫ f(x,y)dxdy |
∫∫∫ | triple integral | integration of function of 3 variables | ∫∫∫ f(x,y,z)dxdydz |
∮ | closed contour / line integral | ||
∯ | closed surface integral | ||
∰ | closed volume integral | ||
[a,b] | closed interval | [a,b] = {x | a ≤ x ≤ b} | |
(a,b) | open interval | (a,b) = {x | a < x < b} | |
i | imaginary unit | i ≡ √-1 | z = 3 + 2i |
z* | complex conjugate | z = a+bi → z*=a-bi | z* = 3 - 2i |
z | complex conjugate | z = a+bi → z = a-bi | z = 3 - 2i |
∇ | nabla / del | gradient / divergence operator | ∇f (x,y,z) |
vector | |||
unit vector | |||
x * y | convolution | y(t) = x(t) * h(t) | |
Laplace transform | F(s) = {f (t)} | ||
Fourier transform | X(ω) = {f (t)} | ||
δ | delta function | ||
∞ | lemniscate | infinity symbol |
Numeral symbols
Name | European | Roman | Hindu Arabic | Hebrew |
---|---|---|---|---|
zero | 0 | ٠ | ||
one | 1 | I | ١ | א |
two | 2 | II | ٢ | ב |
three | 3 | III | ٣ | ג |
four | 4 | IV | ٤ | ד |
five | 5 | V | ٥ | ה |
six | 6 | VI | ٦ | ו |
seven | 7 | VII | ٧ | ז |
eight | 8 | VIII | ٨ | ח |
nine | 9 | IX | ٩ | ט |
ten | 10 | X | ١٠ | י |
eleven | 11 | XI | ١١ | יא |
twelve | 12 | XII | ١٢ | יב |
thirteen | 13 | XIII | ١٣ | יג |
fourteen | 14 | XIV | ١٤ | יד |
fifteen | 15 | XV | ١٥ | טו |
sixteen | 16 | XVI | ١٦ | טז |
seventeen | 17 | XVII | ١٧ | יז |
eighteen | 18 | XVIII | ١٨ | יח |
nineteen | 19 | XIX | ١٩ | יט |
twenty | 20 | XX | ٢٠ | כ |
thirty | 30 | XXX | ٣٠ | ל |
forty | 40 | XL | ٤٠ | מ |
fifty | 50 | L | ٥٠ | נ |
sixty | 60 | LX | ٦٠ | ס |
seventy | 70 | LXX | ٧٠ | ע |
eighty | 80 | LXXX | ٨٠ | פ |
ninety | 90 | XC | ٩٠ | צ |
one hundred | 100 | C | ١٠٠ | ק |
Greek alphabet letters
Upper Case Letter | Lower Case Letter | Greek Letter Name | English Equivalent | Letter Name Pronounce |
---|---|---|---|---|
Α | α | Alpha | a | al-fa |
Β | β | Beta | b | be-ta |
Γ | γ | Gamma | g | ga-ma |
Δ | δ | Delta | d | del-ta |
Ε | ε | Epsilon | e | ep-si-lon |
Ζ | ζ | Zeta | z | ze-ta |
Η | η | Eta | h | eh-ta |
Θ | θ | Theta | th | te-ta |
Ι | ι | Iota | i | io-ta |
Κ | κ | Kappa | k | ka-pa |
Λ | λ | Lambda | l | lam-da |
Μ | μ | Mu | m | m-yoo |
Ν | ν | Nu | n | noo |
Ξ | ξ | Xi | x | x-ee |
Ο | ο | Omicron | o | o-mee-c-ron |
Π | π | Pi | p | pa-yee |
Ρ | ρ | Rho | r | row |
Σ | σ | Sigma | s | sig-ma |
Τ | τ | Tau | t | ta-oo |
Υ | υ | Upsilon | u | oo-psi-lon |
Φ | φ | Phi | ph | f-ee |
Χ | χ | Chi | ch | kh-ee |
Ψ | ψ | Psi | ps | p-see |
Ω | ω | Omega | o | o-me-ga |
Roman numerals
Number | Roman numeral |
---|---|
0 | not defined |
1 | I |
2 | II |
3 | III |
4 | IV |
5 | V |
6 | VI |
7 | VII |
8 | VIII |
9 | IX |
10 | X |
11 | XI |
12 | XII |
13 | XIII |
14 | XIV |
15 | XV |
16 | XVI |
17 | XVII |
18 | XVIII |
19 | XIX |
20 | XX |
30 | XXX |
40 | XL |
50 | L |
60 | LX |
70 | LXX |
80 | LXXX |
90 | XC |
100 | C |
200 | CC |
300 | CCC |
400 | CD |
500 | D |
600 | DC |
700 | DCC |
800 | DCCC |
900 | CM |
1000 | M |
5000 | V |
10000 | X |
50000 | L |
100000 | C |
500000 | D |
1000000 | M |
Subscribe to:
Posts (Atom)