C++ & Java Dick Steflik CS-248. Similarities Syntax - almost identical Object Model - very similar Stream based I/O.

Slides:



Advertisements
Similar presentations
C++ Language Fundamentals. 2 Contents 1. Introduction to C++ 2. Basic syntax rules 3. Declaring and using variables.
Advertisements

Lecture 10: Part 1: OO Issues CS 540 George Mason University.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
June 1, 2000 Object Oriented Programming in Java (95-707) Java Language Basics 1 Lecture 6 Object Oriented Programming in Java Language Basics Objects.
Chapter 3 Loaders and Linkers
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Jerry Lebowitz. Topics  Provides a facility for a systematic object oriented approach to handling runtime errors ◦ Can also handle runtime errors.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
JETT 2003 Java.compareTo(C++). JAVA Java Platform consists of 4 parts: –Java Language –Java API –Java class format –Java Virtual Machine.
20-Jun-15 Eclipse. Most slides from: 2 About IDEs An IDE is an Integrated Development Environment.
Session 1 CS-240 Data Structures Binghamton University Dick Steflik.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
C++ vs. Java: Similiarities & Differences Dr. Jeyakesavan Veerasamy Director of CS UTDesign program & CS Teaching Faculty University.
Abstract Data Types and Encapsulation Concepts
Object Oriented Programming C++. ADT vs. Class ADT: a model of data AND its related functions C++ Class: a syntactical & programmatic element for describing.
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
A First Program Using C#
Comparison of OO Programming Languages © Jason Voegele, 2003.
Programming Languages and Paradigms Object-Oriented Programming.
Java. Why Java? It’s the current “hot” language It’s almost entirely object-oriented It has a vast library of predefined objects It’s platform independent.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Chapter 11: Inheritance and Composition. Objectives In this chapter, you will: – Learn about inheritance – Learn about derived and base classes – Redefine.
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
Intro to C++ And Some Tools Opening Discussion zHave any questions come up since last class? Have you had a chance to look over the project.
COMP25212: Virtualization Learning Objectives: a)To describe aims of virtualization - in the context of similar aims in other software components b)To.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
May 9, 2002Serguei A. Mokhov, 1 Kickstart Intro to Java Part I COMP346/ Operating Systems Revision 1.6 February 9, 2004.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Copyright © 2012 Pearson Education, Inc. Chapter 13: Introduction to Classes.
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.
Data Structures Using C++ 2E1 Inheritance An “is-a” relationship –Example: “every employee is a person” Allows new class creation from existing classes.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
CSE 341, S. Tanimoto Java brief review - 1 Java Brief Review Java’s strengths Object-oriented terminology Inheritance Interfaces An example with inheritance.
Java: An Overview John R Durrett Texas Tech University.
Object-Oriented Programming Chapter Chapter
Java JDBC API. A Java API To Access almost any kind of tabular data To Access almost any kind of tabular data Trademarked (not an acronym) Trademarked.
OOP in C++ CS 124. Program Structure C++ Program: collection of files Source (.cpp) files be compiled separately to be linked into an executable Files.
Java Software Solutions Lewis and Loftus Chapter 9 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Enhanced Class Design -- Introduction.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Object Oriented programming Instructor: Dr. Essam H. Houssein.
Chapter 11: Inheritance and Composition. Introduction Two common ways to relate two classes in a meaningful way are: – Inheritance (“is-a” relationship)
Announcements Assignment 1 due Wednesday at 11:59PM Quiz 1 on Thursday 1.
Java Script. What is JavaScript ? It is an scripting language, developed by Netscape Navigator. It can be used to replace CGI scripts for client-side.
FASTFAST All rights reserved © MEP Make programming fun again.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing.
CS-140 Dick Steflik Lecture 3. Java C++ Interpreted optimized for the internet Runs on virtual ized machine Derived from C++ Good object model Widely.
Java Methods and Applications CSIS 3701: Advanced Object Oriented Programming.
Object Oriented Programming in
Lecture 1: Introduction to JAVA
Object-Oriented Databases
Basic C++ What’s a declaration? What’s a definition?
Java Programming Language
Support for Object-Oriented Programming in Ada 95
From C++ to Java Java history: Oak, toaster-ovens, internet language, panacea What it is O-O language, not a hybrid (cf. C++) compiled to byte-code, executed.
topics object oriented design objects and classes properties
CSE 303 Concepts and Tools for Software Development
Chapter 11: Inheritance and Composition
Chapter 2. Problem Solving and Software Engineering
Chap 1. Getting Started Objectives
Presentation transcript:

C++ & Java Dick Steflik CS-248

Similarities Syntax - almost identical Object Model - very similar Stream based I/O

Philosophically C/C++ were both developed for building desktop applications (an OS is a desktop application) and as such have the goal of fast desktop applications with reasonable network performance Java was developed for building network applications and as such goes to great lengths to minimize network transmission times with reasonable desktop performance and good built-in security

Differences Java - no pointers Java - no destructors Java - automatic garbage collection Java - no linkage editor, all linking is dynamic at run time Java - fully object oriented, cannot write procedurally Java - no header files

#include –C/C++ compiler directive for an external file to be included, inline with the source prior to compiling –#included code is compiled along with the source code

#import –Java compiler directive to make available to the compiler Java packages and/or class files –#imported code is separately compiled and linked dynamically at run time –#imported code doesn’t affect the size of the compiled class file

Object Model Java - all objects are subclasses of class Object, a single root to the class hierarchy C++ - there is no single root to the class hierarchy

Inheritance Java - single inheritance only –make things simpler, due to single root of object hierarchy C++ - single and multiple inheritance –because there is no common root to the class hierarchy multiple inheritance is sometime required –complex to code and debug