Semester Review. As we have discussed, Friday we will have in class time for you to work on a program, this program will come with instructions and you.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
True or false A variable of type char can hold the value 301. ( F )
CIS 234: Using Data in Java Thanks to Dr. Ralph D. Westfall.
Additional control structures. The if-else statement The if-else statement chooses which of two statements to execute The if-else statement has the form:
Announcements The first graded lab will be posted Sunday 2/15 and due Friday 2/27 at midnight It is brand new, so please don’t hand in last semester’s.
Switch structure Switch structure selects one from several alternatives depending on the value of the controlling expression. The controlling expression.
Program Design and Development
If Statements Sections 1.25, Control Structures o All code thus far executes every line of code sequentially o We want to be able to repeat,
Lecture 1 The Basics (Review of Familiar Topics).
Computer Science 1620 Programming & Problem Solving.
General Computer Science for Engineers CISC 106 Lecture 33 Dr. John Cavazos Computer and Information Sciences 05/11/2009.
Control Structures Control structures control the flow of program execution. 3 types of control structures: sequence, selection.
The If/Else Statement, Boolean Flags, and Menus Page 180
Libraries Programs that other people write that help you. #include // enables C++ #include // enables human-readable text #include // enables math functions.
Quiz 1 Exam 1 Next Week. Nested if Statements if (myGrade >= 80) if (myGrade >= 90) cout
Section 3 - Selection and Repetition Constructs. Control Structures 1. Sequence 2. Selection 3. Repetition.
C++ Programming Language Day 1. What this course covers Day 1 – Structure of C++ program – Basic data types – Standard input, output streams – Selection.
CIS3931 – Intro to JAVA Lecture Note Set 3 19-May-05.
True or False Unit 3 Lesson 7 Building Blocks of Decision Making With Additions & Modifications by Mr. Dave Clausen True or False.
More on Input Output Input Stream : A sequence of characters from an input device (like the keyboard) to the computer (the program running). Output Stream.
Control Structures Week Introduction -Representation of the theory and principles of structured programming. Demonstration of for, while,do…whil.
Decision II. CSCE 1062 Outline  Boolean expressions  switch statement (section 4.8)
1 Advanced Programming IF. 2 Control Structures Program of control –Program performs one statement then goes to next line Sequential execution –Different.
CONTROLLING PROGRAM FLOW
CPS120: Introduction to Computer Science Decision Making in Programs.
Chapter 4 Loops Write code that prints out the numbers Very often, we want to repeat a (group of) statement(s). In C++, we have 3 major ways of.
Chapter 5 Loops. Overview u Loop Statement Syntax  Loop Statement Structure: while, for, do-while u Count-Controlled Loops u Nested Loops u Loop Testing.
Lecture 4 Looping. Building on the foundation Now that we know a little about  cout  cin  math operators  boolean operators  making decisions using.
1 COMS 261 Computer Science I Title: C++ Fundamentals Date: September 21, 2005 Lecture Number: 10.
CSC 107 – Programming For Science. The Week’s Goal.
Computer Science 1620 boolean. Types so far: Integer char, short, int, long Floating Point float, double, long double String sequence of chars.
Operators Precedence - Operators with the highest precedence will be executed first. Page 54 of the book and Appendix B list C's operator precedence. Parenthesis.
C++ Lecture 1 Friday, 4 July History of C++ l Built on top of C l C was developed in early 70s from B and BCPL l Object oriented programming paradigm.
CSC1201: Programming Language 2 Lecture 1 Level 2 Course Nouf Aljaffan (C) CSC 1201 Course at KSU1.
1-Dec-15 Additional control structures. 2 The if-else statement The if-else statement chooses which of two statements to execute The if-else statement.
1 CS161 Introduction to Computer Science Topic #8.
1 10/3/05CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
Fundamental Programming Fundamental Programming More on Repetition.
Fundamental Programming Fundamental Programming More Expressions and Data Types.
2: Basics Basics Programming C# © 2003 DevelopMentor, Inc. 12/1/2003.
Variables  A piece of memory set aside to store data  When declared, the memory is given a name  by using the name, we can access the data that sits.
 2003 Prentice Hall, Inc. All rights reserved. 1 Basic C++ Programming.
Operators A binary operator combines two values to get one result: x OP y where OP is any binary operators such as +, -, *, /, ==, !=, >, &&, or even =.
CSE202: Lecture 5The Ohio State University1 Selection Structures.
 By the end of this section you should be able to: ◦ Differentiate between sequence, selection, and repetition structure. ◦ Differentiae between single,
Selection (if-then-else) Programming Has 3 Types of Control: Sequential (normal): Control of Execution Proceeds One after the Other Selection (if-then-else):
 2006 Pearson Education, Inc. All rights reserved if…else Double-Selection Statement if – Performs action if condition true if…else – Performs.
CHAPTER 2.2 CONTROL STRUCTURES (ITERATION) Dr. Shady Yehia Elmashad.
Bill Tucker Austin Community College COSC 1315
Branching statements.
Introduction to Computer Programming
REPETITION CONTROL STRUCTURE
Control Structures Combine individual statements into a single logical unit with one entry point and one exit point. Used to regulate the flow of execution.
Variables A piece of memory set aside to store data
Introduction to C++ October 2, 2017.
Control Statements Kingdom of Saudi Arabia
Expressions and Control Flow in JavaScript
JavaScript: Control Statements I
TOPIC 4: REPETITION CONTROL STRUCTURE
TIPS: How to Be Successful
We’re moving on to more recap from other programming languages
3 Control Statements:.
Flow Control Statements
Summary Two basic concepts: variables and assignments Basic types:
Chapter 4: Control Structures I (Selection)
2.6 The if/else Selection Structure
Fundamental Programming
Life is Full of Alternatives
(Dreaded) Quiz 2 Next Monday.
Presentation transcript:

Semester Review

As we have discussed, Friday we will have in class time for you to work on a program, this program will come with instructions and you will place it in the N: Drive, and name it as indicated on Friday, this will be for bonus points on the final. Along with the best presentation bonus. There will be 2 Parts to the test, Knowledge of the Semester, there will be a question where you will apply critical thinking and create a solution to the given problem, and a logic problem along with it. Another portion of the test will be coding by hand. This section is not 100% accurate, so in this portion you can in fact use some psuedocode if you don’t exactly know how to code this section. These will be the two graded portions for the final. If you wish, we will take a grade from the presentation, and weight it as 20 points worth of the final exam. This is something as a class, we will discuss. FORMAT FOR THE TEST

This is the portion where we have invested the majority of our time this year. Logic is and isn’t the most important topic we will discuss this year, so having said this, I will say this. You need to know AND OR NOT XOR And the properties defined through DeMorgan’s Law You also need to know how to use these properties in your code. LOGIC

“for” loops – give the computer repetitive instructions as long as the iteration growth is within size of the condition, this either increases or decreases upon every repetition “while” loops – give the computer repetitive instructions as long as the condition is true, however if the condition is not initially true, the computer skips this section of code entirely. “do-while” loops – give the computer repetitive instructions if the condition is met, however, this loop structure differs from the while loop because specifically the loop runs a single iteration even if the condition is not true. LOOPS

Name – reserved word in C++ ~ Examples / More Examples Boolean – bool ~ True / False Double – double ~ 3.2 / Float – float ~ 3.2 / Integer – int ~ 3 / 4 Character – char ~ ‘a’ / ‘3’ / ‘b’ String – string ~ “a” / “word” / “a phrase” DATA TYPES

int a = 2; a++; // a now equals 3 cout << a++ << endl; // would see out 3, and a now equals 4 cout << ++a << endl; // would see out 5, and a now equals 5 a--; is the decrement and is the same just opposite of the ++ Pre-increment ++a; Post-increment a++; a + = 1; // increases a by 1 a +=5; //increases a by 5 INCREMENTING VARIABLES

+ Adds / Divides - Subtract * Multiplies % Modulus TYPES OF MATH

ONE Way – If statement TWO Way – If – else statement MULTIPLE Way – Switch statement & If – else if - …. – else statement SELECTION

Libraries iostream, iomanip ctime string REVIEW THESE

Match cout ___ and cin ____ with a & b a. << b. >> KNOW WHICH WAY

Approach a problem by breaking it into its parts, Remember your machine cant solve the problem after you’ve coded it, if you remember something else as your putting in your data. You have to make sure from the moment you turn in your assignment, that you have done your best, and completed the assigned task. That you don’t have to make modifications. Think ahead, take things one step at a time, and don’t be afraid to have your approach fail, just be willing to try a new way once that way proves not to work. PROBLEM SOLVING SKILLS

??????? We will have this, and Friday, before the Bonus we will spend some time going over any last minute questions. Good Luck! QUESTIONS