Friday, April 12, 2019

Application of Statistics in Daily Life Report Essay Example for Free

Application of Statistics in Daily Life state EssayInheritance is the process of creating new descriptores from the existing menage or contoures. InC++andC, breakes tolerate be defined as deriving from abase word form. Aderived classinherits each(prenominal) of the ancestors protected and publicmethodsand selective information pieces. With inheritance if a method is made virtual in the base class then the derived class provide override it with different behaviour. This makes possiblepolymorphism. Types of classes interpretationInC++andCOOP, a derivedclassis whatsoever class thatinheritsfrom any otherwise derived class orbase class. DefinitionInC++andCOOP, the baseclassis the highest class and does notinheritfrom any other class. Other classes put up inherit from a base class. They are calledderivedclasses. 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 deriv ed from more than one base class, it is known as multiple inheritance Multilevel Inheritance The classes gage 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 classWhen you define a class, you define a blueprint for a data type. This doesnt actually define any data, but it does define what the class name means, that is, what an aim of the class will consist of and what operations can be performed on such an aspiration. Classes amp disapproves 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 identical any other variable.Class annoy modifiers A class member can be defined as public, head-to-head or protected. By default members would be assumed as private Constructor amp destruc tor A class constructor is a e special(prenominal)(a) 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 previouslyAfriend 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 pointerthiswhich points to the object itself. Pointer to C++ classes A pointer to a class is done but 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. EN CAPSULATION DefinitionInObject Oriented Programming,encapsulation is an attribute ofobjectdesign. It means that all of the objects 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 lyric(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 secrecy 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 riddance handling C++ supports Exception Handling C is structured programming langu age 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 bill input, output functions like scanf and printf. C++ uses input function cin and output function is cout. There are all data is available to end user. No data security There is data abstraction. Not nab data is available to End user

No comments:

Post a Comment

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