Review for Midterm Exam

Slides:



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

Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
COSC 120 Computer Programming
1 Lecture 6: Input/Output (II) Introduction to Computer Science Spring 2006.
Computer Science 1620 Accumulators. Recall the solution to our financial program: #include using namespace std; int main() { double balance = ;
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
Wednesday, 10/9/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 10/9/02  QUESTIONS ??  Today:  Discuss HW #02  Discuss test question types  Review 
How to Program in C++ CHAPTER 3: INPUT & OUTPUT INSTRUCTOR: MOHAMMAD MOJADDAM.
CSCI/CMPE 4341 Topic: Programming in Python Chapter 3: Control Structures (Part 1) – Exercises 1 Xiang Lian The University of Texas – Pan American Edinburg,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 3: Input/Output.
Chapter 3: Input/Output
Program Input and the Software Design Process ROBERT REAVES.
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Chapter 5: Control Structures II (Repetition)
CHAPTER 5: CONTROL STRUCTURES II INSTRUCTOR: MOHAMMAD MOJADDAM.
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
Due Dates Quiz 1, 2 : Friday September 11 th Quiz 3 : Friday September 18 th Quiz 4 : Monday September 28 th Lab 1, 2 and 3 : Friday Sep 11 th Project.
Selection Statements in C++ If Statement in C++ Semantics: These statements have the same meaning as in the algorithmic language. 2- Two way selection:
C++ Programming: Program Design Including Data Structures, Fifth Edition Chapter 3: Input/Output.
Instructor - C. BoyleFall Semester
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
File Input and Output in C++. Keyboard and Screen I/O #include cin (of type istream) cout (of type ostream) Keyboard Screen executing program input data.
Chapter 5: Control Structures II (Repetition). Objectives In this chapter, you will: – Learn about repetition (looping) control structures – Learn how.
CSC1201: PROGRAMMING LANGUAGE 2 Aseel Al Hadlaq 2nd Term
Lecture #6 OPERATORS AND ITS TYPES By Shahid Naseem (Lecturer)
Lecture #5: iostream functions دوال الإدخال والإخراج Dr. Hmood Al-Dossari King Saud University Department of Computer Science 4 March 2012.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan (C) CSC 1201 Course at KSU1.
Control Structures (B) Topics to cover here: Sequencing in C++ language.
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.
1 For Loops l From Chapter 9 l A shorthand way of coding count loops.
Chapter 3: Input/Output. Objectives In this chapter, you will: – Learn what a stream is and examine input and output streams – Explore how to read data.
CS 1428 Exam I Review. Exam Format 130 Total Points – 40 Points Writing Programs – 30 Points Tracing Algorithms and determining results – 20 Points Short.
Introduction to Programming By: Prof. Muhammad Abu Baker Siddique 2 nd Lecture 1.
Chapter 3: Input/Output. Objectives In this chapter, you will: – Learn what a stream is and examine input and output streams – Explore how to read data.
Chapter 3 Selection Statements
Topic 2 Input/Output.
CS Computer Science IA: Procedural Programming
Exam 1 Review.
Test Review Computer Science History
EGR 2261 Unit 3 Input/Output Read Malik, Chapter 3.
CS 1428 Exam I Review.
Chapter 1. Introduction to Computers and Programming
I Know What I Want to Do – Now What??
Input/Output Handouts: Quiz 2, Unit 3 practice sheets.
CS 1428 Exam I Review.
Programming Funamental slides
Review for Midterm Exam
CSCI 3328 Object Oriented Programming in C# Chapter 4: C# Control Statement – Part I – Exercises UTPA – Fall 2012 This set of slides is revised from lecture.
CSCI 3328 Object Oriented Programming in C# Review: Exam I
Review for Final Exam.
Programming Funamental slides
CSCI 3327 Visual Basic Review: Final Exam
CSCI 3328 Object Oriented Programming in C# Review: Exam I
CS 1428 Final Exam Review.
CSCI 3328 Object Oriented Programming in C# Review: Final Exam
Chapter 3: Input/Output
Chapter 3 Input output.
CSCI 3328 Object Oriented Programming in C# Review: Final Exam
Review for Midterm Exam
Chapter 3: Expressions and Interactivity
CS 1428 Final Exam Review.
Review for Final Exam.
Review for Midterm Exam
CSCI 3328 Object Oriented Programming in C# Review: Final Exam
Review for Midterm Exam
Review of C++ Language Basics
Fundamental Programming
CS 1428 Exam I Review.
CSCI 3328 Object Oriented Programming in C# Review: Exam I
Presentation transcript:

Review for Midterm Exam

Contents 5 questions (20 points each) + 1 bonus question (20 points) Chapters 1~4 Bonus: Chapter 5 Question types Write down the output of the code Write the code Debug errors in the code Review Lecture slides Exercises (1)~(7) in class (on the course Web page)

Time & Place & Event 9:45am ~ 10:35am, Oct. 12, Wednesday ENGR 1.272 Closed-book exam You can take a piece of cheating paper with A4 size Write down whatever that you think is important (on both sides) with any font size

Chapter 1: An Overview of Computers and Programming Languages Computer system has hardware and software Various kinds of languages, such as machine language, assembly, high-level Algorithm: step-by-step problem-solving process; solution in finite amount of time Object-oriented design (OOD): a program is a collection of interacting objects C++ is an object-oriented programming language

Chapter 2: Basic Elements of C++ Special symbols, keywords, rules of identifiers Basic data types int, float, double, char, string Operators Arithmetic operators and their precedence +, -, *, /, %, +=, -=, *=, /= Increment/decrement operator ++, -- Declaration of variables int first=13, second=10; char ch=' '; Input/Output statement cin and cout

Chapter 3: Input/Output Declaration of input/output stream Usage of cin and cout (as well as other istream/ostream variables) The stream extraction operator, cin>> Syntax and meaning of functions cin.get(varChar); cin.ignore(intExp, chExp); cin.putback(ch) cin.peek(ch) getline(cin, str); See examples in lecture slides

Chapter 3: Input/Output (cont'd) The stream insertion operator, cout<< endl setprecision, showpoint, setw, setfill File stream Header: fstream

Chapter 4: Control Structures I (Selection) Relational operators and precedence Comparison operators <, <=, >, >=, ==, != String comparison Logical operators &&, | | Evaluation of logical expression See examples in lecture slides

Chapter 4: Control Structures I (Selection, cont'd) Syntax and usage of the selection structure One-way selection: if () { } Compound statements Two-way selection: if () { } else { } Multi-way selection: switch () { } Nested if statement See examples in lecture slides

Chapter 5: Control Structures II (Repetition) Repetition structure count-controlled sentinel-controlled flag-controlled EOF-controlled Syntax and usage of the while statement

Good Luck! Q/A