C++ The reason why it is still in use. Table of Contents Disadvantages Disadvantages Advantages Advantages Compare with object-oriented programming language.

Slides:



Advertisements
Similar presentations
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Advertisements

Lecture 10: Part 1: OO Issues CS 540 George Mason University.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Object Oriented Programming in Java George Mason University Fall 2011
 In inheritance the child (subclass) chooses its parent (superclass)  Remember - only public or “protected” methods and variables are inherited  Should.
Principles of Object-Oriented Software Development The language Java.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
Trey Mack James Moore Osa Osar-Emokpae
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
1 A Short Introduction to (Object-Oriented) Type Systems Kris De Volder.
Object Oriented Paradigm Programming Paradigms En Mohd Norafizal A.Aziz.
Introduction to Java.
C++ fundamentals.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
Comparison of OO Programming Languages © Jason Voegele, 2003.
Programming Languages and Paradigms Object-Oriented Programming.
Java and C++, The Difference An introduction Unit - 00.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
“is a”  Define a new class DerivedClass which extends BaseClass class BaseClass { // class contents } class DerivedClass : BaseClass { // class.
Introduction to Programming Languages. Problem Solving in Programming.
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
EE4E. C++ Programming Lecture 1 From C to C++. Contents Introduction Introduction Variables Variables Pointers and references Pointers and references.
1 Chapter 10: Data Abstraction and Object Orientation Aaron Bloomfield CS 415 Fall 2005.
Object Oriented Programming: Java Edition By: Samuel Robinson.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
 OOPLs  Help companies reduce complexity  Increase competition in open markets  Speeds up development  Improves maintenance, resusability, modifiability.
Introduction to Object Oriented Programming CMSC 331.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
C# Versus Java Author: Eaddy, Marc Source: Software Tools for the Professional Programmer. Dr. Dobb's Journal. Feb2001, Vol. 26 Issue 2, p74 Hong Lu CS699A.
ILM Proprietary and Confidential -
Java for C++ Programmers Clint Jeffery University of Idaho
1 Chapter 8 – Classes and Object: A Deeper Look Outline 1 Introduction 2 Implementing a Time Abstract Data Type with a Class 3 Class Scope 4 Controlling.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
We will talking about story of JAVA language. By Kristsada Songpartom.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
C Sharp Web & Internet Programming Group Diana, Aren, Jeff, & Adam, Farrin 5/5/20081CS 311.
Lecture 10 Concepts of Programming Languages Arne Kutzner Hanyang University / Seoul Korea.
Object-Oriented Programming Chapter Chapter
CSE 1341 Honors Note Set 2 1. Overview  Java vs. C++  Functions in C++  First Programming Packet  Development Environment 2.
introductory lecture on java programming
Java & C++ Comparisons How important are classes and objects?? What mechanisms exist for input and output?? Are references and pointers the same thing??
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
ISBN Chapter 12 Support for Object-Oriented Programming.
Features of JAVA PLATFORM INDEPENDENT LANGUAGE JAVA RUNTIME ENVIRONMENT (JRE) JAVA VIRTUAL MACHINE (JVM) JAVA APP BYTE CODE JAVA RUNTIME ENVIRONMENT.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
Java 5 Class Anatomy. User Defined Classes To this point we’ve been using classes that have been defined in the Java standard class library. Creating.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
Chapter 15 - C++ As A "Better C"
JAVA MULTIPLE CHOICE QUESTION.
Classes and Objects in Java
Classes and Objects in Java
Classes and Objects in Java
CS360 Windows Programming
Object Oriented Analysis and Design
OOP’S Concepts in C#.Net
Names, Binding, and Scope
Interface.
class PrintOnetoTen { public static void main(String args[]) {
(Computer fundamental Lab)
Programming Languages and Paradigms
Lecture 10 Concepts of Programming Languages
ITE “A” GROUP 2 ENCAPSULATION.
Presentation transcript:

C++ The reason why it is still in use

Table of Contents Disadvantages Disadvantages Advantages Advantages Compare with object-oriented programming language Compare with object-oriented programming language Program example Program example Conclusion Conclusion

Disadvantages Complex structure, time consuming Complex structure, time consuming Difficult implementation of web architectures Difficult implementation of web architectures Softening of object-oriented ideas Softening of object-oriented ideas Multiple inheritance, global variables, precompiling Multiple inheritance, global variables, precompiling Many possibilities for “dirty programming” Many possibilities for “dirty programming” Jumps, addressing, overloading of operands, no automatic initializing of variables Jumps, addressing, overloading of operands, no automatic initializing of variables Garbage Collection is not handled automatically Garbage Collection is not handled automatically Error return code no enforced Error Error return code no enforced Error

Advantages Hybrid of procedure and object-oriented ideas Hybrid of procedure and object-oriented ideas Short syntax (brevity), portable Short syntax (brevity), portable Modular programming, speed Modular programming, speed ANSI/ISO standard ANSI/ISO standard Easy implementing of existing bytecode Easy implementing of existing bytecode

Compare with other languages Ideas of object-orientation Ideas of object-orientation Inheritance, Polymorphism, Encapsulation, Classes, Dynamic Binding Inheritance, Polymorphism, Encapsulation, Classes, Dynamic Binding Smalltalk complete Smalltalk complete C++, multiple inheritance, friends (no complete encapsulation) C++, multiple inheritance, friends (no complete encapsulation) Java, declaration of static Java, declaration of static C#, same as Java C#, same as Java

Compare with other languages Standard class libraries Standard class libraries Smalltalk Smalltalk C++, only few classes are defined in the standard library C++, only few classes are defined in the standard library Java, large variety Java, large variety JDK JDK C#, Standard library (supports: C#, C, C++, Jscript, Visual Basic) C#, Standard library (supports: C#, C, C++, Jscript, Visual Basic).NET Framework Class Library (FCL).NET Framework Class Library (FCL)

4 x ”Hello World” Smalltalk Smalltalk Transcript show: 'Hello, World!'; cr C++ C++ #include #include int main() { std::cout << "Hello World" << std::endl; std::cout << "Hello World" << std::endl; return 0; }

4 x ”Hello World” C# C# using System; class Hello { public static void Main() { Console.WriteLine("Hello World"); } }

4 x ”Hello World” Java Java public class Hello { public static void main(String [] args) { System.out.println("Hello World"); } }

Conclusion Each programming languages has its advantage Each programming languages has its advantage Useful for critical, high performance applications Useful for critical, high performance applications