Clicker quiz 10/15/13 CSE 1102 Fall 2013.

Slides:



Advertisements
Similar presentations
Control Structures.
Advertisements

Program Looping EE2372 Software Design I Dr. Gerardo Rosiles.
For(int i = 1; i
Pass by Value. COMP104 Pass by Value / Slide 2 Passing Parameters by Value * A function returns a single result (assuming the function is not a void function)
CS 101 Computer Programming Statements Review++. Reviewed so far.. Variables Constants Order of Execution Boolean expressions and variables if statements,
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
CSCI 160 Midterm Review Rasanjalee DM.
Discussion1 Quiz. Q1 Which of the following are invalid Java identifiers (variable names)? a) if b) n4m3 c) Java d) e) DEFAULT_VALUE f) bad-choice.
CSE 12 – Basic Data Structures Cynthia Bailey Lee Some slides and figures adapted from Paul Kube’s CSE 12 CS2 in Java Peer Instruction Materials by Cynthia.
The Application of Graph Criteria: Source Code  It is usually defined with the control flow graph (CFG)  Node coverage is used to execute every statement.
5/17/ Programming Constructs... There are several types of programming constructs in JAVA. - If-else construct or ternary operator - while - do-while.
1 Financial Mathematics Clicker review session, Midterm 01.
Classes and Objects: Recap A typical Java program creates many objects which interact with one another by sending messages. Through the objects interactions,
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
1 Financial Mathematics Clicker review session, Midterm 01.
Classes and Objects  A typical Java program creates many objects which interact with one another by sending messages. Through the objects interactions,
Chapter 4: Control Structures II
Recursion Concepts Implementation Data Structures and Algorithms in Java, Third EditionCh05 – 1.
Current Assignments Homework 3 is due tonight. Iteration and basic functions. Exam 1 on Monday.
A Revamping Of our skills so far. Our Tools so Far Variable - a placeholder for a value Method - a set of code which accomplishes a task Class - a mold.
CS 100Lecture 131 Announcements Exam stats P3 due on Thursday.
BallWorld.java A structured walkthrough. Key Features: 2 classes are created Execution is done through the procedure called “main” which are decleared.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Overview Go over parts of quiz? Another iteration structure for loop.
Review TEST 2 Chapters 4,5,7. QUESTION For which type of operands does the == operator always work correctly: (a) int, (b) double, or (c) String?
CS100A, Fall 1998 Key Concepts 1 These notes contain short definitions of the basic entities that make up a Java program, along with a description of the.
Clicker quiz 10/8/13 CSE 1102 Fall 2013 (E-30 reminder!)
1 CS 177 Week 6 Recitation Slides Review for Midterm Exam.
1 CSC 221: Computer Programming I Fall 2005 simple conditionals and expressions  if statements, if-else  increment/decrement, arithmetic assignments.
Classes and Objects - Part I. What is an Object? An Object has two primary components: state – properties of the object behavior – operations the object.
1 Advanced Programming Examples Output. Show the exact output produced by the following code segment. char[,] pic = new char[6,6]; for (int i = 0; i
Midterm 2 Review. Stars and why we use nested loops  Matrix problems (stars)  Other problems involving multiple dimensions  Loops within a process.
Classes - Intermediate
Quick topix 11/7/13 CSE 1102 Fall previous statement Execute rest of program Is true? yes no This flowchart illustrates the logic of a _________.
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
Methods.
Algorithms JPC and JWD © 2002 McGraw-Hill, Inc. 2 Algorithms 2 An Algorithm is a finite set of precise instructions for performing a computation or for.
CS 100Lecture71 CS100J Lecture 7 n Previous Lecture –Computation and computational power –Abstraction –Classes, Objects, and Methods –References and aliases.
Chapter#7 Problem Set.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Clicker quiz 9/17/13 CSE 1102 Fall // In Blob: public void mousePressed(MouseEvent e){ this.setFillColor(java.awt.Color.blue); } // in WinkingBlob.
Quick topix 11/7/13 CSE 1102 Fall previous statement Execute rest of program Is true? yes no This flowchart illustrates the logic of a _________.
Clicker quiz 10/29/13 CSE 1102 Fall __________ is visible to code in the inner class (at ????, say): A.All protected methods and protected instance.
Clicker quiz 10/1/13 CSE 1102 Fall public class Sun extends Ellipse { 2. public Sun(Color c) { 3. super(c); 4. … 5. } 6. public Sun() { 7. this(Color.yellow);
LESSON 5 Loop Control Structure. Loop Control Structure  Operation made over and over again.  Iterate statement.
Infinite for Loop If you omit the test condition, the value is assumed to be TRUE so the loop will continue indefinitely unless you provide some other.
Copyright © Cengage Learning. All rights reserved. Section 3.1 Measures of Central Tendency: Mode, Median, and Mean.
Clicker quiz 10/22/13 CSE 1102 Fall 2013.
Unit-1 Introduction to Java
Lecture 2: Data Types, Variables, Operators, and Expressions
Announcements Quiz 1 Posted on blackboard
Mid Term Review Advanced Programming Ananda Gunawardena
Clicker quiz 10/1/13 CSE 1102 Fall 2013.
Computing Adjusted Quiz Total Score
null, true, and false are also reserved.
Stack Memory 2 (also called Call Stack)
محاضرة 1: مقدمة للمسـاق و مراجعـة للأساسيـات
Implementing Classes Chapter 3.
CS100J Lecture 7 Previous Lecture This Lecture Java Constructs
class PrintOnetoTen { public static void main(String args[]) {
while while (condition) { statements }
CS2011 Introduction to Programming I Selections (I)
Philip Bernhard, PhD Spring 2018
Program Flow.
Java Programming with BlueJ Objectives
Final Exam Review CSE113.
Programming with inheritance Based on slides by Alyssa Harding
Building Java Programs
A couple of practice problems as a class
CSC 205 Java Programming II
Presentation transcript:

Clicker quiz 10/15/13 CSE 1102 Fall 2013

What output will the following method produce? public void sillyMethod(){ int grade = 91; int level = 5; if (grade >= 90) if (level <= 2) System.out.println("Alevel"); else System.out.println("Bstatus"); } Alevel Bstatus "Alevel" "Bstatus" No output is produced

public class Summer { public Summer(){ } public int getSum(int m, int n){ int sum = 0; for (int i=m;i<m+n;i++) sum = sum + i; return sum; Suppose donna is an instance of Summer. What does donna.getSum(1,4) evaluate to? 4 5 10 15

public class BallFrame extends Frame { private Ball[] _balls; public BallFrame(){ _balls = new Ball[20]; for (int i=0;i<10;i++) _balls[i] = new Ball(); } After I have constructed a BallFrame, which of the following Java statements would work (if executed in some method of BallFrame)? Assume Ball has a public getColor() method. _balls[20] = new Ball(); _balls[10].getColor(); _balls[0] = _balls[15]; Both A and C work Both B and C work

The midterm exam mean = 73.6 median = 76

Clicker questions 10/8/13 CSE 1102 Fall 2013