20
COMPUTER PROJECT Made by Rishav Pandey and Amit Pandey

ppt

Embed Size (px)

DESCRIPTION

ppt

Citation preview

Page 1: ppt

COMPUTER PROJECT

• Made by• Rishav Pandey and

• Amit Pandey

Page 2: ppt

BJARNE STROUSTRUP

Page 3: ppt

Paradigm(s)

Multi-paradigm:[1] procedural, functional, object-oriented, generic

Appeared in 1983

Designed by Bjarne Stroustrup

Developer

•Bjarne Stroustrup•Bell Labs•ISO/IEC JTC1/SC22/WG21

Stable release ISO/IEC 14882:2011 (2011)

Typing discipline Static, unsafe, nominative

Major implementations

C++ Builder, clang, Comeau C/C++,GCC, Intel C++ Compiler, Microsoft Visual C++, Sun Studio

DialectsEmbedded C++, Managed C++,C++/CLI, C++/CX

Page 4: ppt

• Bjarne Stroustrup began his work on "C with Classes" in 1979.[4] The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that Simulate had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. When Stroustrup started working in AT&T Bell Labs, he had the problem of analysing the UNIX kernel with respect to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance the C language with Simula-like features.

History Bjarne Stroustrup, creator of C++

Page 5: ppt

• C was chosen because it was general-purpose, fast, portable and widely used. Besides C and Simulate, some other languages that inspired him were ALGOL 68, Ada, CLU and ML. At first, the class, derived class, strong type checking, inclining, and default argument features were added to C via Stroustrup's C++ to C compiler, Front. The first commercial implementation of C++ was released on 14 October 1985.[4]

Page 7: ppt

• Bjarne Stroustrup (born 30 December 1950 in Aarhus, Denmark) is a Danish computer scientist, most notable for the creation and the development of the widely used C++ programming language. He is currently Professor and holder of the College of Engineering Chair in Computer Science at Texas A&M University.

Page 8: ppt

DIFFERENT EVENTS

• 1992 – ACM Grace Murray Hopper Award• 2004 – IEEE Computer Society 2004

Computer Entrepreneur Award• 2005 – William Procter Prize for Scientific

Achievement• 2008 – Dr. Dobb's Excellence in

Programming award.

Page 9: ppt
Page 10: ppt

BOOKS AND LITERATURE• Programming: Principles and Practice Using C+

+ by Bjarne Stroustrup – Addison-Wesley Professional; 1 edition (29 December 2008); ISBN 0-321-54372-1

• The C++ Programming Language by Bjarne Stroustrup – Addison-Wesley Pub Co; 3rd edition (15 February 2000); ISBN 0-201-70073-5

• The Design and Evolution of C++ by Bjarne Stroustrup – Addison-Wesley Pub Co; 1st edition (29 March 1994); ISBN 0-201-54330-3

• The Annotated C++ Reference Manual by Margaret A. Ellis & Bjarne Stroustrup – Addison-Wesley Pub Co; (1 January 1990); ISBN 0-201-51459-1

Page 11: ppt

• In The Design and Evolution of C++ (1994), Bjarne Stroustrup describes some rules that he used for the design of C++:[page needed]

• C++ is designed to be a statically typed, general-purpose language that is as efficient and portable as C

• C++ is designed to directly and comprehensively support multiple programming styles (procedural programming, data abstraction, object-oriented programming, and generic programming)

• C++ is designed to give the programmer choice, even if this makes it possible for the programmer to choose incorrectly

• C++ is designed to be compatible with C as much as possible, therefore providing a smooth transition from C

• C++ avoids features that are platform specific or not general purpose

Evolution of C++

Page 12: ppt

GOLDEN HISTORY• The 1998 ANSI/ISO C++ standard consists of two parts: the core language

 and the C++ Standard Library; the latter includes most of the Standard Template Library (STL) and a slightly modified version of the C standard library. Many C++ libraries exist that are not part of the standard, and, using linkage specification, libraries can even be written in languages such as BASIC, C, Fortran, or Pascal. Which of these are supported is compiler-dependent.

• The C++ standard library incorporates the C standard library with some small modifications to make it optimized 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 105 standard headers, of which 27 are deprecated.

Page 13: ppt

 Parsing and processing C++ source codeIt is relatively difficult to write a good C++ parser with classic parsing algorithms such as LALR(1).[32]

 This is partly the result of the C++ grammar not being LALR. Because of this, there are very few tools for analysing or performing non-trivial transformations (e.g., refactoring) of existing code. One way to handle this difficulty is to choose a different syntax. More powerful parsers, such as GLR parsers, can be substantially simpler (though slower).Parsing (in the literal sense of producing a syntax tree) is not the most difficult problem in building a C++ processing tool. Such tools must also have the same understanding of the meaning of the identifiers in the program as a compiler might have. Practical systems for processing C++ must then not only parse the source text, but be able to resolve for each identifier precisely which definition applies (e.g., they must correctly handle C++'s complex scoping rules) and what its type is, as well as the types of larger expressions.

Page 14: ppt

C++

• C++ is often considered to be a superset of C, but this is not strictly true.[37] Most C code can easily be made to compile correctly in C++, but there are a few differences that cause some valid C code to be invalid or behave differently in C++.

• One commonly encountered difference is that C allows implicit conversion from void* to other pointer types, but C++ does not. Another common portability issue is that C++ defines many new keywords, such as new andclass, that may be used as identifiers (e.g., variable names) in a C program.

Page 15: ppt

• Encapsulation is the hiding of information to ensure that data structures and operators are used as intended and to make the usage model more obvious to the developer. C++ provides the ability to define classes and functions as its primary encapsulation mechanisms. Within a class, members can be declared as either public, protected, or private to explicitly enforce encapsulation. 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.

Encapsulation

Page 16: ppt

INHERITENCE• Inheritance allows one data type to

acquire properties of other data types. Inheritance from a base class may be declared as public, protected, or private. This access specifier determines whether unrelated and derived classes can access the inherited public and protected members of the base class. Only public inheritance corresponds to what is usually meant by "inheritance". The other two forms are much less frequently used. If the access specifier is omitted, a "class" inherits privately, while a "struct" inherits publicly. Base classes may be declared as virtual; this is called virtual inheritance. Virtual inheritance ensures that only one instance of a base class exists in the inheritance graph, avoiding some of the ambiguity problems of multiple inheritance.

Page 17: ppt

Multiple inheritance is a C++ feature not found in most other languages, allowing a class to be derived from more than one base classes; this allows for more elaborate inheritance relationships. For example, a "Flying Cat" class can inherit from both "Cat" and "Flying Mammal". Some other languages, such as C# or Java, accomplish something similar (although more limited) by allowing inheritance of multiple interfaces while restricting the number of base classes to one (interfaces, unlike classes, provide only declarations of member functions, no implementation or member data). An interface as in C# and Java can be defined in C++ as a class containing only pure virtual functions, often known as an abstract base class or "ABC". The member functions of such an abstract base class are normally explicitly defined in the derived class, not inherited implicitly. C++ virtual inheritance exhibits an ambiguity resolution feature called dominance.

Page 18: ppt
Page 19: ppt

• ] Function overloading allows programs to declare multiple functions having the same name (but with different arguments). The functions are distinguished by the number 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 and would result in a compile-time error message.

Static polymorphism

Page 20: ppt

• When declaring a function, a programmer can specify for one or more parameters a default value. Doing so allows the parameters with defaults to optionally be omitted when the function is called, in which case the default arguments will be used. When a function is called with fewer arguments than there are declared parameters, explicit arguments are matched to parameters in left-to-right order, with any unmatched parameters at the end of the parameter list being assigned their default arguments. In many cases, specifying default arguments in a single function declaration is preferable to providing overloaded function definitions with different numbers of parameters.

• .[