
Evolution of Programming Languages
Explore the evolution of programming languages from machine code to high-level procedural and object-oriented languages like C++ and Java. Learn about the transition from numeric operations to encapsulating data and functions into objects, making programming more readable and efficient.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Introduction to OO Programming Andy Wang Object Oriented Programming in C++ COP 3330
Programming Program A list of instructions for a computer to execute
Evolution of Programming Languages Machine languages Numeric operations 0100 0101 0111 1111 0100 0110 0100 1100 0000 0001 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 0000 0000 0000 0011
Evolution of Programming Languages Assembly languages Human readable shorthand for operations .file .section test.c .rodata .LC0: .string .text hello\n .globl main .type main: push1 movl sub1 main, @function %ebp %esp, %ebp %8, %esp
Evolution of Programming Languages High-level procedural languages More readable Can divide the work into actions, represented by procedures and functions E.g., C, Pascal main() { int x = 1; int y = 1; int r = 1; DrawCircle(x, y, r); }
butcomputers only understand machine languages A compiler (e.g., g++) translates programs written in high-level languages to machine code instructions An interpreter translates and executes programs on the fly High level languages Compiler / interpreter Machine languages
Evolution of Programming Languages Object-oriented languages Also high-level Encapsulate or group data and procedures into objects E.g., C++, Java class Circle { public: private: }; SetCenter(int x, int y); SetRadius(int r); Draw(); int x, y, radius;
Thus, C is a high-level procedural programming language C++ is an object-oriented language based on C
Object Encapsulation of data and functions that act upon that data An object consists of Name (variable name) Attributes (member data) that describe what the object is Behavior (member functions) that describes what the object does
Class A blueprint for objects A user-defined type, consists of Declaration (typically in .h files) Definition (typically in .cc files) An object is an instance of a class Can create many objects from the same class Can build many houses from the same blueprint
Whats special about objects? In C, a struct consists of a name (variable) and attributes (data inside the struct) Data and functions are separate In C++ Can build objects that encapsulate data and functions Can use classes as reusable program building blocks