Saturday, September 28, 2019

Application of Statistics in Daily Life Report Essay Example for Free

Application of Statistics in Daily Life Report Essay Inheritance is the process of creating new classes from the existing class or classes. In  C++  and  C,  classes  can be defined as deriving from a  base class. A  derived class  inherits all of the ancestors protected and public  methods  and data  members. With inheritance if a method is made virtual in the base class then the derived class can override it with different behaviour. This makes possible  polymorphism. Types of classes: Definition:  In  C++  and  C#  OOP, a derived  class  is any class that  inherits  from any other derived class or  base class. Definition:  In  C++  and  C#  OOP, the base  class  is the highest class and does not  inherit  from any other class. Other classes can inherit from a base class. They are called  derived  classes. Forms of Inheritance: Single Inheritance: If a class is derived from a single base class, it is called as single inheritance. Multiple Inheritance: If a class is derived from more than one base class, it is known as multiple inheritance Multilevel Inheritance: The classes can also be derived from the classes that are already derived. This type of inheritance is called multilevel inheritance. Hierarchical Inheritance: If a number of classes are derived from a single base class, it is called as hierarchical inheritance Definition of class:When you define a class, you define a blueprint for a data type. This doesn’t actually define any data, but it does define what the class name means, that is, what an object of the class will consist of and what operations can be performed on such an object. Classes ;amp; Objects in Detail Class member functions: A member function of a class is a function that has its definition or its prototype within the class definition like any other variable. Class access modifiers: A class member can be defined as public, private or protected. By default members would be assumed as private Constructor ;amp; destructor: A class constructor is a special function in a class that is called when a new object of the class is created. A destructor is also a special function which is called when created object is deleted. | | | C++ copy constructor: The copy constructor is a constructor which creates an object by initializing it with an object of the same class, which has been created previously A  friend   function is permitted full access to private and protected members of a class. | C++ inline functions| With an inline function, the compiler tries to expand the code in the body of the function in place of a call to the function. | The this pointer in C++| Every object has a special pointer  this  which points to the object itself. | Pointer to C++ classes| A pointer to a class is done exactly the same way a pointer to a structure is. In fact a class is really just a structure with functions in it. | Static members of a class| Both data members and function members of a class can be declared as static. ENCAPSULATION Definition:  In  Object Oriented Programming,  encapsulation is an attribute of  object  design. It means that all of the object’s data is contained and hidden in the object and access to it restricted to members of that class. C Programming| C++ Programming| C follows the procedural programming paradigm| C++ is a multi-paradigm langua ge(procedural as well as object oriented)| In C language focus on procedure and steps. | C++ focuses on the data rather than the process| In C data hiding and data security is not possible. Data hiding and data security is present. | C uses Top-Down approch| C++ uses Bottom-Up approach| C is a function driven programming language| C++ is a object driven programming language| C does not support overloading concept| C++ supports overloading concepts like operator overloading and function overloading| C does not support namespaces concept| CPP supports Namespaces concept. | C not support exception handling| C++ supports Exception Handling| C is structured programming language| C++ is object oriented programming language. C does not support inheritance, reusability, polymorphism, data abstraction| CPP supports inheritance, reusability, polymorphism, data abstraction. | C language only support Early binding| CPP supports both Early and Late binding| C uses standard input, output functions like scanf and printf. | C++ uses input fu nction cin and output function is cout. | There are all data is available to end user. No data security| There is data abstraction. Not complete data is available to End user| Application of Statistics in Daily Life Report. (2018, Nov 01).

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.