100 likes | 214 Views
C++. PRESENTATION ON C++. MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE. C++. INTRODUCTION.
E N D
C++ PRESENTATION ON C++ MADE BY :-- SHAHNAWAZ KHAN RAVINDER SINGH ABHIJEET AUGSTINE
C++ INTRODUCTION THE C++ PROGRAMMING LANGUAGE WAS DEVELOPED AT AT&TBELL LABORATORIES U.S.A IN THE EARLY 1990Ss BY BJARNE STROUSTRUP . HE FOUND `C` LACKING FOR SIMULATIONS AND DECIDED TO EXTEND THE LANGUAGE BY ADDING FUTURE FROM HIS FAVOURATE LANGUAGE, SIMULA 67. SIMULA 67 WAS ONE OF THE EARLIEST OBJECT –ORIENTED LANGUAGES. BJARNE STROUSTRUP CALLED IT “C WITH CLASSES” ORIGINALLY. THE NAME C++ WAS COINED BY RICK MASCITTI WHERE “ ++” IS THE `C` INCREMENT OPERATOR. EVER SINCE ITS BIRTH, C++ EVOLVED TO COPE WITH PROBLEMS ENCOUNTERED BY USERS, AND THROUGH DISCUSSIONS AT AT&T.
C++ FEATURES 1. DATA ABSTRACTION 2. DATA ENCAPSULATION 3. MODULARITY 4. INHERITANCE 5. POLYMORPHISM
DATA ABSTRACTION IT REFERS TO THE ACT OF REPRESENTING ESSENTIAL FEATURES WITHOUT INCLUDING THE BACKGROUND DETAILS OR EXPLANATION . EXAMPLE :- SWITCH BOARD- YOU ONLY PRESS CERTAIN SWITCHES ACCORDING TO YOUR REQUIREMENT. WHAT IS HAPPENING INSIDE, HOW IT IS HAPPENING, ETC. YOU NEED NOT KNOW. AGAIN THIS IS ABSTRACTION, YOU KNOW ONLY THE ESSENTIAL THINGS TO OPERATE ON SWITCH BOARD WITHOUT KNOWING THE BACKGROUND DETAILS OF THE SWITCH BOARD
DATA ENCAPSULATION THE WRAPPING UP OF DATA AND FUNCTIONS ( THAT OPERATE ON THE DATA ) INTO A SINGLE UNIT (CLASS) IS KNOWN AS ENCAPSULATION . EXAMPLE :- COMPANY – IN COMPANY, THE DEPARTMENTS ACCESS AND WORK WITH THEIR DATA ON THEIR OWN. ONE DEPARTMENT CAN NOT ACCESS DATA OF OTHER DEPARTMENT DIRECTLY. RATHER A REQUEST IS MADE FOR THE REQUIRED DATA AND THE DATA IS HANDED OVER BY THE MEMBERS OF THE REQUESTED DEPARTMENT. THUS, IT CAN BE SAID THAT DEPARTMENT DATA AND DEPARTMENT EMPLOYEES ARE ENCAPSULATED INTO A SINGLE ENTITY, THE DEPARTMENT.
MODULARITY MODULARITY IS PROPERTY OF THE SYSTEM THAT HAS BEEN DECOMPOSED INTO A SET OF COHESIVE AND LOOSELY COUPLED MODULES . EXAMPLE :- MUSIC SYSTEM - YOU MUST HAVE SEEN A COMPLETE MUSIC SYSTEM. LET US ASSUME THAT OUR PROGRAMME REPRESENT THE MUSIC SYSTEM. THE MUSIC SYSTEM COMPRISES OF SPEAKER, CASSETTE PLAYERS, RECORD PLAYER, CD PLAYERS,TUNNER ETC. SIMILARLY, OUR PROGRAMME CAN BE DIVIDED INTO VARIOUS MODUES EACH REPRESENTING SPEAKERS, CASSETTE PLAYERS, ETC SEE EACH MODUES IS A COMPLETE UNIT IN ITSELF YET IT WORKS IN ACCORDANCE WITH OTHER MODUES IN ORDER TO ACHIEVE ONE SINGLE GOAL i.e., MUSIC.
INHERITANCE INHERTANCE IS THE CAPABILITY OF ONE C LASS OF THINGS TO INHERIT CAPABILITY OR PROPERTIES FROM ANOTHER CLASS . EXAMPLE :: `AUTOMOBILES` AND `PULLED VEHICLES` ARE SUBCLASSES OF ` VEHICLES`. `VEHICLES` IS THE BASE CLASS OF `AUTOMOBILES` AND `PULLED VEHICLES` `CAR` AND `BUS` ARE SUB CLASSES OF `AUTOMOBILES` `AUTOMOBILES ` IS THE BASE GLASS OF CAR AND `BUS` . `
POLYMORPHISM POLYMORPHISM IS THE ABILITY FOR A MESSAGE OR DATA TO BE PROCESSED IN MORE THAN ONE FORM . EXAMPLE :: IF YOUR GIVE 5+7 , IT RESULTS INTO 12, THE SUM OF 5 & 7. IF YOU GIVE `A ` * `BC`, IT RESULTS INTO `ABC`, THE CONCATENATED STRINGS . THE SAME OPERATION SYMBOL `+` IS ABLE TO DISTINGUISH BETWEEN THE TWO OPERATIONS DEPENDING UPON THE DATA TYPE IT IS WORKING ON .
WITH OOP, PROGRAMS ARE EASY TO UNDERSTAND. • IT MODELS REAL WORLD WELL. • OOP OFFERS CLASSES’ REUSABILITY. ALREADY CREATED CLASSES • CAN BE REUSED WITHOUT HAVING TO WRITE THEM TO AGAIN. • OOP FACILITATE QUICK DEVELOPMENT AS PARALLEL DEVELOPMENT OF CLASSES IS POSSIBLE . • 5. WITH OOP, PROGRAMS ARE EASIER TO TEST MANAGE AND MAINTAIN. • ALTHOUGH OOP HAS PROVED REVOLUTIONARY IN SOFTWARE. • 1. WITH OOP, CLASSES TEND BE OVERLY GENERALISED. • THE RELATIONS AMONG CLASSES BECOME ARTIFICIAL AT TIMES. • THE OOP PROGRAMS’ DESIGN IS TRICKY. • ALSO ONE NEEDS TO DO PROPER PLANNING AND PROPER DESIGN FOR OOP P0ROGRAMMING. • 5. TO P0ROGRAM WITH OOP, PROGRAMMER NEED PROPER SKILLS SUCH AS DESIGN SKILLS, PROGRAMMING SKILLS, THINKING IN TERMS OF OBJECTS ETC. ADVANTAGE OF OOP DISADVANTAGE OF OOP
THANK'S TO ALL