CSII Final Review. How many bits are in a byte? 8.

Slides:



Advertisements
Similar presentations
Chapter 1 Chapter 2 Chapter 3 Code Gone Wrong Random 5 pt 5 pt 5 pt
Advertisements

Local Variables and Scope Benjamin Fein. Variable Scope A variable’s scope consists of all code blocks in which it is visible. A variable is considered.
Programming with Java. Problem Solving The purpose of writing a program is to solve a problem The general steps in problem solving are: –Understand the.
Inheritance Inheritance Reserved word protected Reserved word super
Advanced Programming in Java
Sadegh Aliakbary Sharif University of Technology Fall 2010.
IntroductionIntroduction  Computer program: an ordered sequence of statements whose objective is to accomplish a task.  Programming: process of planning.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Introduction to Computers and Programming Lecture 4: Mathematical Operators New York University.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
UML Class Diagram: class Rectangle
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Java CourseWinter 2009/10. Introduction Object oriented, imperative programming language. Developed: Inspired by C++ programming language.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
220 FINAL TEST REVIEW SESSION Omar Abdelwahab. INHERITANCE AND POLYMORPHISM Suppose you have a class FunClass with public methods show, tell, and smile.
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
General Features of Java Programming Language Variables and Data Types Operators Expressions Control Flow Statements.
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
The Java Programming Language
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
College Board A.P. Computer Science A Topics Program Design - Read and understand a problem's description, purpose, and goals. Procedural Constructs.
Java Overview. Comments in a Java Program Comments can be single line comments like C++ Example: //This is a Java Comment Comments can be spread over.
1 Review of Java Basic Concepts –Names and Reserved Words –Expressions and Precedence of Operators –Flow of Control – conditional statements –Flow of Control.
Introduction to Java Chapter 7 - Classes & Object-oriented Programming1 Chapter 7 Classes and Object-Oriented Programming.
Java Language Basics By Keywords Keywords of Java are given below – abstract continue for new switch assert *** default goto * package.
CIS 270—Application Development II Chapter 8—Classes and Objects: A Deeper Look.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
Java Nuts and Bolts Variables and Data Types Operators Expressions Control Flow Statements Arrays and Strings.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Access Modifiers Control which classes use a feature Only class-level variables may be controlled by access modifiers Modifiers 1. public 2. protected.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Aside: Running Supplied *.java Programs Just double clicking on a *.java file may not be too useful! 1.In Eclipse, create a project for this program or.
Java – Methods Lecture Notes 5. Methods All objects, including software objects, have state and behavior. example, a student as an object has name, address,
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
This In Java, the keyword this allows an object to refer to itself. Or, in other words, this refers to the current object – the object whose method or.
1 Lecture # 2. * Introducing Programming with an Example * Identifiers, Variables, and Constants * Primitive Data Types * Byte, short, int, long, float,
Unit 1 Review By: Mr. Jacobs.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
T/F  The following code will compile without error. int x = 3, y = 4, z = 5; double k = 3.4; cout
Copyright © Texas Education Agency, Computer Programming Variables and Data Types.
BASIC PROGRAMMING C SCP1103 (02)
Object-Oriented Concepts
Advanced Programming in Java
Advanced Programming in Java
Objects as a programming concept
JAVA MULTIPLE CHOICE QUESTION.
Engineering Problem Solving With C An Object Based Approach
Java Course Review.
BASIC PROGRAMMING C SCP1103 (02)
Interface, Subclass, and Abstract Class Review
Lecture 2: Data Types, Variables, Operators, and Expressions
CS230 Tutorial Week 3.
UML Class Diagram: class Rectangle
null, true, and false are also reserved.
An overview of Java, Data types and variables
String Methods: length substring
Interfaces.
Advanced Programming Behnam Hatami Fall 2017.
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
Advanced Programming in Java
Focus of the Course Object-Oriented Software Development
Introduction to Object-Oriented Concepts in Java
Chap 2. Identifiers, Keywords, and Types
Outline Software Development Activities
Chapter 5 Classes.
Presentation transcript:

CSII Final Review

How many bits are in a byte?

8

Programming languages evolved in three stages: high level, assembly, and machine languages. Which was created first?

Programming languages evolved in three stages: high level, assembly, and machine languages. Which was created first? Machine Languages

When compared byte for byte, which is more expensive, RAM or typical hard drive space?

When comparted byte for byte, which is more expensive, RAM or typical hard drive space? RAM

Name a type of system software.

Windows 8

Convert the binary number to hexadecimal.

17

True or False Java and C++ are object oriented languages.

True

Provide an example of an extended assignment operator.

+=, -=, *=, /=, %=

Provide an example of a relational operator.

, =, !=, ==

Which logical operator has the highest precedence?

!

The statement below creates a random number in what range? (int)(Math.random() * 7 + 1)

The statement below creates a random number in what range? (int)(Math.random() * 7 + 1) [0, 1) [0, 7) [1, 8)

What is the value of var? int var = (7 – 3 % 4 * 5);

What is the value of var? int var = (7 – 3 % 4 * 5); -8

When two reference variables refer to the same object, this is known as…

aliasing

TRUE/FALSE Static variables should be named with all capital letters.

TRUE/FALSE Static variables should be named with all capital letters. False – final variables are named with all capital letters

What is the difference between a concrete and abstract class?

An abstract class cannot be instantiated.

What will be the ending value of var? int var = 7; if( var < 10) var = 12; if(var < 20) var = 25; if(var < 30) var = 7;

What will be the ending value of var? int var = 7; if( var < 10) var = 12; if(var < 20) var = 25; if(var < 30) var = 7; //7

What will the code below print? System.out.println(5/2* );

What will the code below print? System.out.println(5/2* ); 7.3

In the method below, the variable temp has what type of scope? public void mystery(){ for(int i = 0; i < 10; i ++){ int temp = 15; System.out.print(temp / i ); }

In the method below, the variable temp has what type of scope? public void mystery(){ for(int i = 0; i < 10; i ++){ int temp = 15; // Block Scope System.out.print(temp / i ); }

What is the value of var? int[][] arry = new int[5][10]; int var = arry.length + 7;

What is the value of var? int[][] arry = new int[5][10]; int var = arry.length + 7; // = 12

Let X be an interface and Y be an abstract class. Z is a concrete subclass of Y that implements the X interface. List all possible instantiations involving X, Y, and Z. ** Assume that a no-argument constructor for Z exists.

Let X be an interface and Y be an abstract class. Z is a concrete subclass of Y that implements the X interface. List all possible instantiations involving X, Y, and Z. X x = new Z(); Y y = new Z(); Z z = new Z();