25-01-2013, 11:53 AM
Project on- TELEPHONE BILLING SYSTEM
TELEPHONE BILLING.docx (Size: 158.77 KB / Downloads: 105)
About C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. Developed by Bjarne Stroustrup starting in 1979 at Bell Labs, it adds object oriented features, such as classes, and other enhancements to the C programming language. Originally named C with Classes, the language was renamed C++ in 1983, as a pun involving the increment operator. C++ is one of the most popular programming languages and is implemented on a wide variety of hardware and operating system platforms. As an efficient compiler to native code, its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel and Embarcadero Technologies. C++ has greatly influenced many other popular programming languages, most notably C# and Java. Other successful languages such as Objective-C use a very different syntax and approach to adding classes to C.
Introduction to OOPs
Objects
Object is the basic unit of object-oriented programming. Objects are
identified by its unique name. An object represents a particular instance
of a class. There can be more than one instance of an object. Each
instance of an object can hold its own relevant data. An Object is a
collection of data members and associated member functions also known
as methods.
For example whenever a class name is created according to the class an
object should be created without creating object can’t able to use
class. The class of Dog defines all possible dogs by listing the
characteristics and behaviors they can have; the object Lassie is one
particular dog, with particular versions of the characteristics. A Dog has
fur; Lassie has brown-and-white fur.
Classes
Classes are data types based on which objects are created. Objects with
similar properties and methods are grouped together to form a Class.
Thus a Class represents a set of individual objects. Characteristics of an
object are represented in a class as Properties. The actions that can be
performed by objects become functions of the class and is referred to as
Methods.
For example consider we have a Class of Cars under which Santro Xing, Alto and WaganR represents individual Objects. In this context each Car Object will have its own, Model, Year of Manufacture, Colour, Top Speed, Engine Power etc., which form Properties of the Car class and the associated actions i.e., object functions like Start, Move, Stop form the Methods of Car Class. No memory is allocated when a class is created. Memory is allocated only when an object is created, i.e., when an instance of a class is created
Data abstraction
Data Abstraction increases the power of programming language by
creating user defined data types. Data Abstraction also represents the
needed information in the program without presenting the details.
Abstraction refers to the act of representing essential features without
including the background details or explanation between them.
For example, a class Car would be made up of an Engine, Gearbox,
Steering objects, and many more components. To build the Car class,
one does not need to know how the different components work
internally, but only how to interface with them, i.e., send messages to
them, receive messages from them, and perhaps make the different
objects composing the class interact with each other.
Encapsulation
Encapsulation is the grouping together of data and functionality. C++ implements encapsulation by allowing all members of a class to be declared as either public, private, or protected. A public member of the class is accessible to any function. A private member is accessible only to functions that are members of that class and to functions and classes explicitly granted access permission by the class ("friends"). A protected member is accessible to members of classes that inherit from the class in addition to the class itself and any friends.
The OO principle is that all of the functions (and only the functions) that access the internal representation of a type should be encapsulated within the type definition. C++ supports this (via member functions and friend functions), but does not enforce it: the programmer can declare parts or all of the representation of a type to be public, and is also allowed to make public entities that are not part of the representation of the type. Because of this, C++ supports not just OO programming but other weaker decomposition paradigms, like modular programming.
Polymorphism:
Polymorphism allows routines to use variables of different types at different
times. An operator or function can be given different meanings or functions.
Polymorphism refers to a single function or multi-functioning operator
performing in different ways.
Poly a Greek term ability to take more than one form. Overloading is one type
of Polymorphism. It allows an object to have different meanings, depending
on its context. When an exiting operator or function begins to operate on new
data type, or class, it is understood to be overloaded.
Function overloading
Function overloading allows programs to declare multiple functions having
the same name (but with different arguments). The functions are
distinguished by the number and/or types of their formal parameters. Thus,
the same function name can refer to different functions depending on the
context in which it is used. The type returned by the function is not used to
distinguish overloaded functions.
Standard Library
The C++ standard library incorporates the C standard library with some small modifications to make it work better with the C++ language. Another large part of the C++ library is based on the STL. This provides such useful tools as containers (for example vectors and lists), iterators to provide these containers with array-like access and algorithms to perform operations such as searching and sorting. Furthermore (multi)maps (associative arrays) and (multi)sets are provided, all of which export compatible interfaces. Therefore it is possible, using templates, to write generic algorithms that work with any container or on any sequence defined by iterators. As in C, the features of the library are accessed by using the #include directive to include a standard header. C++ provides 69 standard headers, of which 19 are deprecated.
The STL was originally a third-party library from HP and later SGI, before its incorporation into the C++ standard. The standard does not refer to it as "STL", as it is merely a part of the standard library, but many people still use that term to distinguish it from the rest of the library (input/output streams, internationalization, diagnostics, the C library subset, etc.).
Most C++ compilers provide an implementation of the C++ standard library, including the STL. Compiler-independent implementations of the STL, such as STL Port, also exist. Other projects also produce various custom implementations of the C++ standard library and the STL with various design goals.