Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous 10 20 30 40 50.

Slides:



Advertisements
Similar presentations
Java Control Statements
Advertisements

STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
CS-1010 Dr. Mark L. Hornick 1 Selection Statements and conditional expressions.
Data Types in Java Data is the information that a program has to work with. Data is of different types. The type of a piece of data tells Java what can.
5/17/ Programming Constructs... There are several types of programming constructs in JAVA. - If-else construct or ternary operator - while - do-while.
Constants and Variables  Memory cells used in program  Called constants and variables  Identifiers for constants and variables should be declared before.
Computer Science 1620 Loops.
Introduction to Computers and Programming Lecture 7:
Chapter 4 - Control Structures: Part 1 Outline 4.4Control Structures 4.5The if Selection Structure 4.6The if/else Selection Structure 4.7The while Repetition.
1 10/20/08CS150 Introduction to Computer Science 1 do/while and Nested Loops Section 5.5 & 5.11.
Switch structure Switch structure selects one from several alternatives depending on the value of the controlling expression. The controlling expression.
Logical Operators Java provides two binary logical operators (&& and ||) that are used to combine boolean expressions. Java also provides one unary (!)
© 2004 Pearson Addison-Wesley. All rights reserved5-1 Iterations/ Loops The while Statement Other Repetition Statements.
Agenda Review User input Scanner Strong type checking Other flow-control structures switch break & continue Strings Arrays 2.
DAT602 Database Application Development Lecture 5 JAVA Review.
Chapter 2: Basic Elements of Java J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Chapter 3:Decision Structures.  3.1 The if Statement  3.2 The if-else Statement  3.3 The if-else-if Statement  3.4 Nested if Statements  3.5 Logical.
Integer numerical data types. The integer data types The integer data types use the binary number system as encoding method There are a number of different.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
Lec 4: while loop and do-while loop. Review from last week if Statements if (num < 0.5){...println("heads"); } if –else Statements if (num < 0.5){...println("heads");
Java development environment and Review of Java. Eclipse TM Intergrated Development Environment (IDE) Running Eclipse: Warning: Never check the “Use this.
 The if statement and the switch statement are types of conditional/decision controls that allow your program.  Java also provides three different looping.
Repetition Structures Repetition Structures allow you to write programs that will repeat program steps multiple times. –Also called Loops –Counter controlled.
Chapter 4: Control Structures II
LOOP & Type Conversion. do – while Loop In the while loop, the test expression is evaluated at the beginning of the loop. If the test condition is false.
Apr, 2011 Dating with Java Larry Li. Objective Hello world program Setup development environment Data types and variables Operators and Expressions Control.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
C++ Basics. Compilation What does compilation do? g++ hello.cpp g++ -o hello.cpp hello.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
Sections © Copyright by Pearson Education, Inc. All Rights Reserved.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Control statements Mostafa Abdallah
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
CS-1010 Dr. Mark L. Hornick 1 Selection and Iteration and conditional expressions.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Expressions Methods if else Statements Loops Potpourri.
Chapter 2: Fundamental Programming Structures in Java Adapted from MIT AITI Slides Control Structures.
Instructor: Alexander Stoytchev CprE 185: Intro to Problem Solving (using C)
Control structures in C by Dr P.Padmanabham Professor (CSE)&Director Bharat Institute of Engineering &Technology Hyderabad Mobile
Java Programming: From Problem Analysis to Program Design, 4e Chapter 5 Control Structures II: Repetition.
Java Programming: From Problem Analysis to Program Design, Second Edition 1 Lecture 1 Objectives  Become familiar with the basic components of a Java.
Session 2 Operators, Decisions and Loops. Objectives Operators Casting data Decision marking structures Loops break, continue, return.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
General Condition Loop A general condition loop just loops while some condition remains true. Note that the body of the loop should (eventually) change.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
CPSC 233 Tutorial January 21 st /22 nd, Linux Commands.
Topics introduced today (these topics would be covered in more detail in later classes) – Primitive Data types Variables Methods “for” loop “if-else” statement.
Information and Computer Sciences University of Hawaii, Manoa
Chapter 7: Expressions and Assignment Statements
The switch Statement, and Introduction to Looping
Chapter 7: Expressions and Assignment Statements
Java Programming: From Problem Analysis to Program Design, 4e
An Introduction to Java – Part I, language basics
Chapter 2: Basic Elements of Java
Lec 4: while loop and do-while loop
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
CS 200 Primitives and Expressions
2. Second Step for Learning C++ Programming • Data Type • Char • Float
Fundamental Programming
Controlling Program Flow
Presentation transcript:

Final Jeopardy Fundamen tal Java Numerical Data type Boolean Expressi on If/THEN/ WHILE Miscellan eous

Java fundamental for 10 Q: How to compile and run a Java program? OL 10 A

Java fundamental– 10 points A: What is Javac and Java? Table

Java fundamental for 20 Q: A Java program contains one or more of this? Q: A Java program contains one or more of this? OL 20 A

Java fundamental for 20 A: What is CLASS? Table

Java fundamental for 30 Q: This is needed to run the same Java program on different Operating Systems without having to recompile? Q: This is needed to run the same Java program on different Operating Systems without having to recompile? OL 30 A

Java Fundamental for 30 A: What is Java Virtual Machine (JVM) ? Table

Java fundamental for 40 Q: The name of this tree has been used as another name for Java ? Q: The name of this tree has been used as another name for Java ? OL 40 A

Java fundamental for 40 A: What is “OAK”? Table

Java fundamental for 50 Q: This used to be the best selling point for Java (hint: refer to its portability with 4 words) OL 50 A

Java fundamental for 50 A: What is “Write ONCE Run EVERYWHERE”? Table

Numerical Data type 10 Numerical Data type 10 Q: Data types used to represent integer values? CF 10 A

Numerical Data for 10 A: What are byte, short, int, long? Table

Numerical Data for 20 Q: Data types to represent real values. Q: Data types to represent real values. CF 20 A

Numerical data types for 20 A: What are float and double? Table

Numerical data type for 30 Q: These symbols are allowed in a valid identifier? CR 30 A

Numerical data type for 30 A: What are $ and _? Table

Numerical Data type for 40 Q: Suppose we have: int x, y; x = 40; y = x / 6 What is the value of y? CF 40 A

Numerical Data for 40 A: What is 6? Table

Numerical data for 50 Q: The values of this can not be changed in the entire program? CF 50 A

Numerical data for 50 A: What is constant? Table

Boolean expression for 10 Q: Boolean expressions are evaluated to one of these values? IS 10 A

Boolean expression for 10 A: What is true or false? Table

Boolean expression for 20 Q: These are boolean operators in Java? IS 20 A

Boolean Expression for 20 A: What are AND, OR, NOT? Table

Boolean expression for 30 Q: Which are the six relational operators used in boolean expressions? A. < B. >= C. <= D. > E. == F. && G. != H. ! IS 30A

Boolean expression for 30 A: What are A,B,C,D,E,and G? Table

Boolean Expression for 40 Q: Evaluate this boolean expression: (1<2 || 4 <=3) IF 40 A

Boolean expression for 40 A: What is true? Table

Boolean expression for 50 Q:Evaluate this expression: (60%3 == 0) && (50%9 != 0) IF 50 A

Boolean expression for 50 A: What is true? Table

If/then/while/for for 10 Q: What is the output from the following code?. int number = 45; if (number != 45) { System.out.println(“Hello”);} else { System.out.println(“Bye”);} A. Hello B. Bye T10 A

If/Then/While for 10 A: What is B? Table

If/Then/While for 20 Q: What is the result of this switch statement: int number = 45; switch (number) { case 35: System.out.println(“Good”); case 45: System.out.println(“Fair”); case 55: System.out.println(“None”); } A. Good B. Fair C. None T20 A

If/Then/While for 20 A: What is Fair? Table

If/Then/While for 30 Q: What is this code doing? if (num1 * num2 * num3 < 0) { System.out.println(“This is good”); } else { System.out.println(“This is bad”); } T30 A

If/Then/While for 30 A: What is “if products of these three numbers (num1,num2,num3) are negative, print out “This is good”. Otherwise, print out “This is bad” ? Table

If/Then/While for 40 Q: These symbols are always found in an if statement T40 A

If/Then/While for 40 A: What are ( and )? Table

T50 A It/Then/While for 50 Q: The statements in the body of this loop must be executed at least ONCE

If/Then/While for 50 A: What is DO-WHILE loop? Table

Miscellaneous for 10 Q: Switch only support these data types ?. DM 10 A

Miscellaneous for 10 A: What are char and integer (byte, short, int)? Table

Miscellaneous for 20 Q: Operand is converted from a lower to a higher precision DM 20 A

Miscellaneous for 20 A: What is implicit casting? Table

Miscellaneous for 30 Q: How can we say 2 3 in Java. DM 30 A

Miscellaneous for 30 A: What is Math.pow(2,3) ? Table

Miscellaneous for 40 Q: JOptionPane.showInputDialog gets input from a user and return this data type DM 40 A

Miscellaneous for 40 A: What is String? Table

Miscellaneous for 50 Q: The value of this component can be changed in a Java program DM 50 A

Miscellaneous for 50 A: What is variable? Table