CS116 2010-2011 SUMMER LECTURE 1 by İlker Korkmaz.

Slides:



Advertisements
Similar presentations
Introduction to C++ An object-oriented language Unit - 01.
Advertisements

A C++ Crash Course Part II UW Association for Computing Machinery Questions & Feedback.
Senem Kumova Metin Spring2009 STACKS AND QUEUES Chapter 10 in A Book on C.
Senem KUMOVA METİN CS FALL 1 ARRAYS && SORTING && STRINGS CHAPTER 6 cont.
By Senem Kumova Metin 1 POINTERS + ARRAYS + STRINGS REVIEW.
Chapter 7: User-Defined Functions II
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 7: User-Defined Functions II.
CS 117 Spring 2002 Classes Hanly: Chapter 6 Freidman-Koffman: Chapter 10, intro in Chapter 3.7.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
Introduction to Classes and Objects CS-2303, C-Term Introduction to Classes and Objects CS-2303 System Programming Concepts (Slides include materials.
CS-2303 System Programming Concepts
1 Classes and Objects. 2 Outlines Class Definitions and Objects Member Functions Data Members –Get and Set functions –Constructors.
C FAQ’S Collected from the students who attended technical round in TCS recruitment.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Review of C++ Programming Part II Sheng-Fang Huang.
Introduction to C++. Overview C++? What are references Object orientation Classes Access specifiers Constructor/destructor Interface-implementation separation.
PART I CHAPTER 16 CS116 SENEM KUMOVA METİN 1. Structures Structures : Aggregate data types built using elements of other types struct Time { int hour;
Pointer Data Type and Pointer Variables
CSIS 123A Lecture 6 Strings & Dynamic Memory. Introduction To The string Class Must include –Part of the std library You can declare an instance like.
CS212: Object Oriented Analysis and Design Lecture 6: Friends, Constructor and destructors.
Object Oriented Programming Elhanan Borenstein copyrights © Elhanan Borenstein.
 2006 Pearson Education, Inc. All rights reserved Operator Overloading; String and Array Objects.
CS 11 C++ track: lecture 4 Today: More on memory management the stack and the heap inline functions structs vs. classes.
Chapter 12: Pointers, Classes, Virtual Functions, and Abstract Classes.
UFS003C3 Lecture 15 Data type in C & C++ Using the STL.
Chapter 10: Classes and Data Abstraction. Objectives In this chapter, you will: Learn about classes Learn about private, protected, and public members.
CS415 C++ Programming Takamitsu Kawai x4212 G11 CERC building WV Virtual Environments Lab West Virginia University.
 2003 Prentice Hall, Inc. All rights reserved. 1 IS 0020 Program Design and Software Tools Preprocessor Midterm Review Lecture 7 Feb 17, 2004.
CS-1030 Dr. Mark L. Hornick 1 Basic C++ State the difference between a function/class declaration and a function/class definition. Explain the purpose.
C++ Programming Lecture 13 Functions – Part V The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
1 Classes II Chapter 7 2 Introduction Continued study of –classes –data abstraction Prepare for operator overloading in next chapter Work with strings.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
EEL 3801 C++ as an Enhancement of C. EEL 3801 – Lotzi Bölöni Comments  Can be done with // at the start of the commented line.  The end-of-line terminates.
Chapter 10: Classes and Data Abstraction. Classes Object-oriented design (OOD): a problem solving methodology Objects: components of a solution Class:
C++ Programming Lecture 14 Arrays – Part I The Hashemite University Computer Engineering Department (Adapted from the textbook slides)
1 Introduction to Object Oriented Programming Chapter 10.
1 8/30/06CS150 Introduction to Computer Science 1 Your First C++ Program.
C++ Programming Lecture 13 Functions – Part V By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
A First Book of C++ Chapter 12 Extending Your Classes.
CSE 374 Programming Concepts & Tools
EGR 2261 Unit 13 Classes Read Malik, Chapter 10.
Eine By: Avinash Reddy 09/29/2016.
Linked Lists Chapter 6 Section 6.4 – 6.6
Chapter 13: Pointers, Classes, Virtual Functions, and Abstract Classes
Chapter 5 Classes.
Chapter 10: Pointers Starting Out with C++ Early Objects Ninth Edition
Data Structures and Abstract Data Types
Primitive Types Vs. Reference Types, Strings, Enumerations
group work #hifiTeam
Dynamic Memory Allocation Reference Variables
Chapter 12: Pointers, Classes, Virtual Functions, and Abstract Classes
Array Lists Chapter 6 Section 6.1 to 6.3
Object Oriented Programming COP3330 / CGS5409
C Stuff CS 2308.
CS212: Object Oriented Analysis and Design
Operator Overloading; String and Array Objects
Pointers, Dynamic Data, and Reference Types
Review for Final Exam.
CSCI 3328 Object Oriented Programming in C# Chapter 9: Classes and Objects: A Deeper Look – Exercises UTPA – Fall 2012 This set of slides is revised from.
Strings and Streams Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2nd edition,
Classes, Constructors, etc., in C++
Review for Final Exam.
Recitation Course 0603 Speaker: Liu Yu-Jiun.
CS410 – Software Engineering Lecture #5: C++ Basics III
A Deeper Look at Classes
Today’s Objectives 28-Jun-2006 Announcements
Video: The Sound of Raining
CECS 130 Final Exam Review Session
Introduction to Classes and Objects
Presentation transcript:

CS116 2010-2011 SUMMER LECTURE 1 by İlker Korkmaz

Review on C Reminder notes on some concepts of C algorithm, pseudocode, implementation source code, object code, executable code preprocessor, compiler, linker declaration, definition, initialization keywords of C, reserved words in C function prototype, signature storage classes static versus dynamic memory allocation struct / data structure all above are well-defined in “wikipedia”

How to shift from C to C++ 1-> You might remember how to implement a code using the concepts of programming with C, which is an imperative language together with the methods of a procedural programming paradigm. 2-> Try to understand the concepts of object oriented programming paradigm.

from C to C++ The main textbook is “C How to Program, 6th Edition” by Deitel and Deitel. This presentation covers the subjects given in Chapter 15 of the textbook.

from C to C++ Namespaces C++ provides namespaces to prevent name conflicts Example:

using namespaces explicitly usage of the variables:

cin / cout scanf --> cin printf --> cout

A New Type: string string is an alternative type to C's null terminated arrays of char

string length string st= “Hello”; cout << “Length of st is ” <<st.length(); Length of st is 5

string operations concatenation, modifying, extracting a substring, searching, comparing...

function concepts FUNCTIONS prototype ... call by reference (&)... inline functions... default arguments... overloading functions... function signatures...

dynamic storage allocation in C++ new, new[ ] The new operator is used to allocate storage dynamically. The new[ ] operator is used to allocate an array dynamically. delete, delete[ ] The delete operator is used to free storage allocated by new. The delete [ ] operator is used to free storage allocated by new [ ]. “new” and “delete” keywords will also be used with constructors and destructors.

examples to allocate storage int * number_ptr; ....... number_ptr= new int ; delete number_ptr; // alternatively, array allocation approach is as follows: number_ptr=new int[100 ] ; delete [ ] number_ptr;

struct/class relation in C : “struct”s are the basic structures.. in C++ : “class”es are the basic structures..

More slides ?? You may also dissect the slides offered by Ufuk Çelikkan and Senem Kumova Metin. All those slides are conceptually similar.