Unit 1 Review By: Mr. Jacobs.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Chapter 3 Syntax, Errors, and Debugging
Types and Arithmetic Operators
 2005 Pearson Education, Inc. All rights reserved Introduction.
A Review. a review of lessons learned so far… ( 2 steps forward - 1 step back) Software Development Cycle: design, implement, test, debug, document Large.
COSC 120 Computer Programming
Introduction to Computers and Programming Lecture 4: Mathematical Operators New York University.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
JavaScript, Third Edition
Introduction to C Programming
1 MATERI PENDUKUNG OPERATOR Matakuliah: M0074/PROGRAMMING II Tahun: 2005 Versi: 1/0.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
Copyright 2003 Scott/Jones Publishing Brief Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
C++ Operators CS242 COMPUTER PROGRAMMING T.Banan Al-Hadlaq.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
CS107 Introduction to Computer Science Java Basics.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
Chapter 3: Data Types and Operators JavaScript - Introductory.
1 Do you have a CS account? Primitive types –“ building blocks ” for more complicated types Java is strongly typed –All variables in a Java program must.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
Lecture #5 Introduction to C++
BUILDING JAVA PROGRAMS CHAPTER 2 PRIMITIVE DATA TYPES AND OPERATIONS.
Constants Numeric Constants Integer Constants Floating Point Constants Character Constants Expressions Arithmetic Operators Assignment Operators Relational.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
Using Data Within a Program Chapter 2.  Classes  Methods  Statements  Modifiers  Identifiers.
 Pearson Education, Inc. All rights reserved Introduction to Java Applications.
Building Java Programs Primitive Data and Definite Loops.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
1 Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
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.
Java Programming, Second Edition Chapter Two Using Data Within a Program.
COMP Primitive and Class Types Yi Hong May 14, 2015.
Copyright 2010 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Java FilesOops - Mistake Java lingoSyntax
Chapter 1 Introduction. Components of a Computer CPU (central processing unit) Executing instructions –Carrying out arithmetic and logical operations.
1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
CHAPTER 2 PROBLEM SOLVING USING C++ 1 C++ Programming PEG200/Saidatul Rahah.
C++ for Engineers and Scientists Second Edition
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
CMSC 202 Java Primer 1. July 24, 2007 Copyright © 2008 Pearson Addison-Wesley 2 A Sample Java Application.
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.
CS0007: Introduction to Computer Programming Primitive Data Types and Arithmetic Operations.
1Object-Oriented Program Development Using C++ Built-in Data Types Data type –Range of values –Set of operations on those values Literal: refers to acceptable.
1 09/10/04CS150 Introduction to Computer Science 1 What Actions Do We Have Part 2.
Java Programming: Guided Learning with Early Objects Chapter 1 Basic Elements of Java.
Chapter 2 Variables.
Building Java Programs
Java Primer 1: Types, Classes and Operators
Expressions An expression is a portion of a C++ statement that performs an evaluation of some kind Generally requires that a computation or data manipulation.
Primitive Data, Variables, Loops (Maybe)
Building Java Programs Chapter 2
Building Java Programs
Building Java Programs
Building Java Programs Chapter 2
Chapter 2 Programming Basics.
Building Java Programs
Understand the interaction between computer hardware and software
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs Chapter 2
Building Java Programs
Chapter 2 Variables.
Building Java Programs
Building Java Programs
Building Java Programs
Presentation transcript:

Unit 1 Review By: Mr. Jacobs

True/False The first generation of programming language is assembly language. True

True/False Java is an example of a high level language. True

True/False Mistakes found early in the coding process are much more expensive to fix than mistakes found later in the process. False

True/False Byte Code is a program that behaves like a computer. False

True/False An arithmetic expression consists of operands and binary operators combined as in algebra. True

True/False Programs manipulate objects by sending them methods. False

True/False An integer is a positive or negative whole number. True

True/False Strings are objects, not primitive data types True

True/False Most, but not all, information in a computer is represented in binary form. False

Fill in the blank OOP stands for _______________. object-oriented programming

Fill in the blank The software responsible for translating a program in a high-level language to machine code is called a(n) ____________. compiler

Fill in the blank JVM stands for _______________. Java virtual machine

Fill in the blank Numbers with a fractional part are called _______________. doubles or floating-point numbers

Fill in the blank When an object receives a message, the object responds by running a block of code called a(n) _______________. methods

Fill in the blank When evaluating an expression, Java performs operations of higher ________ first unless overridden by ____________. precedence, parentheses

Fill in the blank Use the ___________ operator to create a new string out of the existing strings. +

Written Questions What is the purpose of a variable? The purpose of a variable is to store data that can be modified.

Written Questions What are three types of programming errors? The three types of programming errors are syntax errors, run-time errors, and logic errors. An example of a syntax error is the failure to include a semicolon at the end of a statement. An example of a run-time error is an attempt to divide by a variable whose current value is zero. An example of a logic error is a calculation that is off by a factor of 100.

Written Questions Describe the difference between the data types double and int? Type double refers to numbers that have a decimal point. Type int refers to whole numbers.

Assume x = 8 and y = 4 Solve x + y * 2 = 16

Assume x = 8 and y = 4 Solve (x + y) /3 = 4

Assume x = 8 and y = 4 Solve x - y * 3 = -4

Assume x = 8 and y = 4 Solve x + y * 1.5 = 14

Assume x = 8 and y = 4 Solve [(x - y)^(x-y)]/y 64

Write the code Ask the user for their name and enter into a String variable called name. name = reader.readLine(“What is your name?”); System.out.print(“What is your name?”); name = reader.readLine;

What shape is made? Pen.home(); Pen.setDirection(0); For (int i=0; i<5; i++) { Pen.move(100); Pen.turn(72); } Pentagon

Binary What is 10111 as a base 10 number? 23

Binary What is 110001 as a base 10 number? 49

Binary What is 173 as a base 2 number? 10101101