Haidong Xue Summer 2011, at GSU

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Control Structures.
Chapter 4 Decision Making Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E. Reingold.
Design and Analysis of Algorithms Review on time complexity, “in place”, “stable” Haidong Xue Summer 2012, at GSU.
5/17/ Programming Constructs... There are several types of programming constructs in JAVA. - If-else construct or ternary operator - while - do-while.
Principles of Computer Programming (using Java) Chapter 10 Subclasses Haidong Xue Summer 2011, at GSU.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie July 5, 2005.
Introduction to Computers and Programming Lecture 5 New York University.
COMP 14 Introduction to Programming Miguel A. Otaduy May 20, 2004.
Flow of Control Loops – Chapter 3.2. Java Loop Statements: Outline the while Statement the do-while Statement the for Statement.
COMP 110 Introduction to Programming Mr. Joshua Stough September 24, 2007.
Principles of Computer Programming (using Java) Haidong Xue Summer 2011, at GSU Copyright © 2000 W. W. Norton & Company. All rights reserved. 1.
Selection and Testing Shirley Moore CS 1401 Spring 2013 February 21 and 26,
Chapter 4: Control Structures II
TAKING AN ONLINE EXAM. Class website > Exams > Begin now Opens after class at 11:00 50 questions = 50 minutes About = # questions from each chapter You.
Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
CPS 2231 Computer Organization and Programming Instructor: Tian (Tina) Tian.
The Selection Control Structure Questions on Program 3? 1.Review. 2. Truth-tables. 3. Forms of the if statement. 4. The switch statement.
Agenda Do Now – Review vocabulary quiz Quiz Review Homework # 11 Class Activity Presentation Guidelines.
Conditionals & boolean operators
CS 2430 Day 1. Agenda Load NetBeans Introduction Syllabus Review some array operations.
CS 115 QUIZ # 1 INFORMATION Scheduled for TUESDAY 9/22/15 1.
Quiz Answers 1. Show the output from the following code fragment: int a = 5, b = 2, c = 3; cout
Lecture 3 Decisions (Conditionals). One of the essential features of computer programs is their ability to make decisions. Like a train that changes tracks.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Chapter 6. else-if & switch Copyright © 2012 Pearson Education, Inc.
Programming Perl in UNIX Course Number : CIT 370 Week 3 Prof. Daniel Chen.
The 9 th and 10 th tutoring session Fall, 2012 Haidong Xue 5:30pm—8:30pm 10/2/2012 and 10/3/2012 -Review loop structures and improve CheckISBN and CourseAverage.
8.4 Use Scientific Notation Algebra. Scientific Notation Numbers such as 1,000,000, 153,000 and are written in standard form. Another way to write.
Exponent Quiz Review. Evaluate the expression 4 2  Answer: 16.
Murach, Chapter 5. Common Control Structures Selection: The IF statement Case: The Select Case statement Iteration: Loops 9/28/20082.
Chapter 9 Control Structures.
Expressions and Order of Operations Operators – There are the standard operators: add, subtract, divide, multiply – Note that * means multiply? (No times.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 5 Control Structures II: Repetition.
The 7 th and 8 th tutoring session Fall, 2012 Haidong(Haydon) Xue 5:30pm—8:30pm 9/25/2012 and 9/26/ Review control structures - Improve CheckISBN.
Design and Analysis of Algorithms Introduction to graphs, representations of a graph Haidong Xue Summer 2012, at GSU.
Perl Chapter 3 Conditional statements. Control Expressions Control expressions – interpreted as T/F (evaluated as strings or numbers) – simple, relational,
JAVA PROGRAMMING Control Flow. Jeroo: Finish Activities 1-7 Finish InputTest program w/changes.
Chapter 7 Control Structures. Java has very flexible three looping mechanisms. You can use one of the following three loops:  while Loop  do...while.
Review for Test2. Scope 8 problems, 60 points. 1 Bonus problem (5 points) Coverage: – Test 1 coverage – Exception Handling, Switch Statement – Array of.
Haidong Xue Summer 2011, at GSU
Unit-1 Introduction to Java
Welcome to Computer Science Jeopardy
ASSIGNMENT NO.-2.
Make Your Own Quiz.
Haidong Xue Summer 2011, at GSU
Haidong Xue Summer 2011, at GSU
2.0 FUNDAMENTALS OF JAVA PROGRAMMING LANGUAGE
Final Grade Averages Weighted Averages.
© T Madas.
Principles of Computer Programming (using Java) Chapter 2, Part 1
Alice in Action with Java
Computers & Programming Languages
Review for Test1.
Week of March th grade.
  30 A 30 B 30 C 30 D 30 E 77 TOTALS ORIGINAL COUNT CURRENT COUNT
Summer Reading.
Summer Reading.
Review for Test1.
Seating “chart” Front Back 4 rows 5 rows 5 rows 4 rows 2 rows 2 rows
Introduction to Computer Science
Count on 2 (Over the bridge)
Chap 7. Advanced Control Statements in Java
Literary Theories Quiz Redo Option
Haidong Xue Summer 2011, at GSU
Flow of Control Flow of control is the order in which a program performs actions. Up to this point, the order has been sequential. A branching statement.
Principles of Computer Programming (using Java) Chapter 5 Arrays
CSS 290: Video Games and Computer Programming
G6DICP - Lecture 5 Control Structures.
Presentation transcript:

Haidong Xue Summer 2011, at GSU Principles of Computer Programming (using Java) Chapter 4 Basic Control Structures Haidong Xue Summer 2011, at GSU

Content Quiz2 Test1 Assignment4 boolean expression if structure while structure do-while structure

Quiz 2 Some numbers # of full grades: 3 Average: 78 Answers

Test 1 Some numbers Answers # of full grades: 1 # of grades in [90, 99]: 9 # of grades in [80, 89]: 3 # of grades in [70, 79]: 8 # of grades in [0, 69]: 8 Average: 79 Answers

Assignment 4 Review of the class mechanism The answers

Boolean Expression Literals Operators Examples == != > < >= <= ! && || Examples

if structure if ( boolean expression ) { … } else if( boolean expression) //optional, could be more than 1 else // optional

while structure while( boolean expression) { … break; //optional } The counting loop: for structure

do-while structure do { … break; //optional } while( boolean expression);

Assignment if ( Test1 <= 80 ){ redo assignments 3 and 4; } else{ no assignment;