CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.

Slides:



Advertisements
Similar presentations
Chapter 2: Basic Elements of C++
Advertisements

COSC 120 Computer Programming
Chapter 2: Basic Elements of C++
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Topic R3 – Review for the Final Exam. CISC 105 – Review for the Final Exam Exam Date & Time and Exam Format The final exam is 120-minutes, closed- book,
Chapter 2: Basic Elements of C++
Chapter 2: Basic Elements of C++
Chapter 2: Basic Elements of C++
Introduction To C++ Programming 1.0 Basic C++ Program Structure 2.0 Program Control 3.0 Array And Structures 4.0 Function 5.0 Pointer 6.0 Secure Programming.
Basic Elements of C++ Chapter 2.
C++ Programming Language Day 1. What this course covers Day 1 – Structure of C++ program – Basic data types – Standard input, output streams – Selection.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Introduction to programming Language C, Data Types, Variables, Constants. Basics of C –Every program consists of one or more functions and must have main.
Section 2 - More Basics. The char Data Type Data type of a single character Example char letter; letter = 'C';
High-Level Programming Languages: C++
CIS Computer Programming Logic
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 2: Basic Elements of C++
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Chapter 3 Assignment, Formatting, and Interactive Input C++ for Engineers and Scientists Third Edition.
Beginning C++ Through Game Programming, Second Edition
C++ Programming: Basic Elements of C++.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Introduction to C++ Basic Elements of C++. C++ Programming: From Problem Analysis to Program Design, Fourth Edition2 The Basics of a C++ Program Function:
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 5P. 1Winter Quarter C Programming Basics.
Chapter 3: Assignment, Formatting, and Interactive Input.
C++ for Engineers and Scientists Second Edition Chapter 3 Assignment, Formatting, and Interactive Input.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 2: Basic Elements of C++
CS241 PASCAL I - Control Structures1 PASCAL Control Structures Modified Slides of Philip Fees.
C++ / G4MICE Course Session 1 - Introduction Edit text files in a UNIX environment. Use the g++ compiler to compile a single C++ file. Understand the C++
Review for Final Exam. Contents 5 questions (20 points each) + 1 bonus question (20 points) – Basic concepts in Chapters 1-4 – Chapters 5-9 – Bonus: Chapter.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 2: Basic Elements of C++
Programming Fundamentals with C++1 Chapter 3 COMPLETING THE BASICS.
Recap……Last Time [Variables, Data Types and Constants]
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 2: Basic Elements of C++
Chapter 3 Assignment, Formatting, and Interactive Input C++ for Engineers and Scientists Third Edition.
2: Basics Basics Programming C# © 2003 DevelopMentor, Inc. 12/1/2003.
Programming Fundamentals. Summary of Previous Lectures Phases of C++ Environment Data Types cin and cout.
Chapter 2: Basic Elements of C++. Introduction Computer program – Sequence of statements whose objective is to accomplish a task Programming – Process.
C++ Programming: Program Design Including Data Structures, Fifth Edition Chapter 2: Basic Elements of C++
Computer Programming in C++ 黃鐘揚 教授 Prof. Chung-Yang (Ric) Huang Department of Electrical Engineering National Taiwan University 2007/06/26.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 2: Basic Elements of C++
C++ Lesson 1.
Chapter 2: Basic Elements of C++
Chapter Topics The Basics of a C++ Program Data Types
Computer Programming BCT 1113
Introduction to the C Language
Basic Elements of C++.
Chapter 2 Assignment and Interactive Input
Test Review Computer Science History
Introduction to C++.
Chapter 3: Understanding C# Language Fundamentals
Chapter 2: Basic Elements of C++
Basic Elements of C++ Chapter 2.
Introduction to the C Language
C++ fundamentals Lecture 1, Chapter 2 – pp /22/2018 Y K Choi.
Programming Funamental slides
Review for Midterm Exam
Programming Funamental slides
Review for Midterm Exam
Review for Midterm Exam
Review for Final Exam.
Review for Midterm Exam
Review for Midterm Exam
Engineering Problem Solving with C++ An Object Based Approach
Engineering Problem Solving with C++ An Object Based Approach
C++ Programming Basics
C++ for Engineers and Scientists Second Edition
Presentation transcript:

CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal

Course Content 1. Introduction to Hardware and Software. 2. Program development. 3. Interaction with the Computer system. 4. Identifier Tables 5. Program Structure: heading Section and Declaration section 6. Program Structure : Input Section.

Course Content 7. Program Structure: Output Section. 8. Program Structure: Process Section. 9. Formatted Output. 10. Conditions and Boolean Expressions. 11. Selection Control Structures. 12. Repetitions Control Structure (do-While and for statements. 13. Repetitions Control Structure (While Statement).

Course Content 14. Structured Data Types (One- dimensional Arrays) 15. Processing One dimensional Arrays.

1.Introduction to Hardware and Software. Hardware Components of a computer. Systems software and applications software. Programming languages.

2. Program development. Overview of the program development Process. Problem Specification. Algorithm design and presentation. Source code, object code and the Compiler.. Syntax Errors, run time errors, logic.

3. Interaction with the Computer system. Formatting a disk. Sign on and sign off procedures. Creating, editing, and saving a source code file. Compiling, debugging and executing a program. Printing a text file.

4.Identifier Tables Keywords, standard identifiers and programmer-defined identifiers. Variables and symbolic constants. Standard scalar data types. String data type. Literal constants. Contents of an identifier table

5.Program Structure: heading Section and Declaration section General Structure of a C++ program Heading section. Comment statement Declaration statement. typedef. The main() function.

6. Program Structure : Input Section. System routines, the preprocessor and the Linker. Streams and the iostream. Manipulators. String input.

7. Program Structure: Output Section. Unformatted output. fstream library and file I/O. Writing a program output to a disk file.

8.Program Structure: Process Section. Operator terminology. Arithmetic operators. Increment and decrement operators. Side effects and sequence points. Implicit and explicit type conversions. Assignment operator and assignment statement. String copy function Std Math. Library functions.

9.Formatted output. Manipulators with arguments. ios format flags. Output design. Creating a program template.

10.Conditional and Boolean Expressions. Simple conditions and compound conditions. Relational, equality, negation and logical operators. Precedence and associatively of operators. String compare function. Representing conditions by Boolean expressions

11. Selection control structure. if statement and nested if statement. Compound statement. Conditional operator. Switch statement. Break statement. Program testing and debugging- structured walk through.

12.Repetition Control Structures: do while statement. Input validation. For statement. Table generation.

13. Repetition Control Structures While statement. Continue statement. Program testing and debugging- structured walk through.

14.Structured data Types: one D Arrays. Terminology and storage. Declaration form – use of typedef. Array input. Array output

15.Processing One- dimensional Arrays Mean component of an array. Maximum and Minimum component of an array. Storing array component. Searching an array. Other fundamental array processing algorithms.

Note !! Slide one 1-15 demonstrated the general contents of the CIS-165 Course in “plain English” What does that mean in C++ ??

C++ UP_FRONT NO Surprises !! Data types: integers, real (float), long, short, char, string. Declaration: int var1 float var2 Char z..

C++ Library functions such as: sqrt( ), pow( ). Input such as : cin >>, cin.getline( ) Output such as: cout << Formatted output setw( )

Operators: >, <, =, != … Logical : and &&, or || Boolean (True and False) if else statement if (x > y) z=0; else z=1;

C++ Switch and case: switch(var) { case 1: codes to execute. break; case 2: codes to execute. break; }

Do while do { stat1; stat n; } while (condition true);

While stat. While (condition true) { stat 1; stat n; }

Input validation if(cin.fail()) For stat. For (i=0; I < 100; i++) { stat 1; stat n; }

One D Array int MyArray[5]= {1,2, 4, 6,8} Char My_Chr_Array [ ]={‘a’, ‘b’, ‘g’,’\0’} typedef typedef unsigned short int USHORT; USHORT width, height, length;

Constants (also called literals) Defining constants with const: const unsigned short int Stu_Per_Class =10; Defining constants in traditional way: #define studentsPerClass = 10; Symbolic Const. students = classes *15; Enumerated const: enum Color {Red, Blue, White, Black};

White space X= a + b; Or as X=a +b;