Final Exam Review. CS 1428 Fall Jill Seaman. Final Exam

Similar documents
Computer Programming I

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be...

While Loop. 6. Iteration

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language

Management Information Systems 260 Web Programming Fall 2006 (CRN: 42459)

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

El Dorado Union High School District Educational Services

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

The C Programming Language course syllabus associate level

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

Informatica e Sistemi in Tempo Reale

Sources: On the Web: Slides will be available on:

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 3: Input/Output

C++FA 5.1 PRACTICE MID-TERM EXAM

Chapter One Introduction to Programming

Lecture 3. Arrays. Name of array. c[0] c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] c[11] Position number of the element within array c

The programming language C. sws1 1

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

Object Oriented Software Design

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

Lewis, Loftus, and Cocking. Java Software Solutions for AP Computer Science 3rd Edition. Boston, Mass. Addison-Wesley, 2011.

I PUC - Computer Science. Practical s Syllabus. Contents

Moving from CS 61A Scheme to CS 61B Java

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Chapter 2: Elements of Java

Syllabus for CS 134 Java Programming

Object Oriented Software Design

Introduction to Python

AP Computer Science Java Subset

Problem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class

The University of Alabama in Huntsville Electrical and Computer Engineering CPE Test #4 November 20, True or False (2 points each)

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007

Conditions & Boolean Expressions

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

a) What is the major difference between a program that runs under a virtual machine vs. one that does not?

Conditionals (with solutions)

NEW YORK CITY COLLEGE OF TECHNOLOGY/CUNY Computer Systems Technology Department. COURSE: CST2403 C++ Programming Part 1 ( 4 hours, 3 credits )

Answers to Review Questions Chapter 7

How To Write Portable Programs In C

Arrays. number: Motivation. Prof. Stewart Weiss. Software Design Lecture Notes Arrays

ARIZONA CTE CAREER PREPARATION STANDARDS & MEASUREMENT CRITERIA SOFTWARE DEVELOPMENT,

CS 241 Data Organization Coding Standards

ALGORITHMS AND FLOWCHARTS

CSI 333 Lecture 1 Number Systems

EMC Publishing. Ontario Curriculum Computer and Information Science Grade 11

Crash Course in Java

DNA Data and Program Representation. Alexandre David

Introduction to Java

Programming and Software Development (PSD)

Objective-C Tutorial

Lecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Number Representation

Computer Science 281 Binary and Hexadecimal Review

#820 Computer Programming 1A

Outline. Conditional Statements. Logical Data in C. Logical Expressions. Relational Examples. Relational Operators

Chapter 2: Basics on computers and digital information coding. A.A Information Technology and Arts Organizations

Operator Overloading. Lecture 8. Operator Overloading. Running Example: Complex Numbers. Syntax. What can be overloaded. Syntax -- First Example

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

VB.NET Programming Fundamentals

JavaScript: Control Statements I

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

So far we have considered only numeric processing, i.e. processing of numeric data represented

IS0020 Program Design and Software Tools Midterm, Feb 24, Instruction

Passing 1D arrays to functions.

Computer Science 217

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

Course Title: Software Development

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

CS 106 Introduction to Computer Science I

Comp151. Definitions & Declarations

C++ Input/Output: Streams

Basics of I/O Streams and File I/O

An Incomplete C++ Primer. University of Wyoming MA 5310

Chapter 5. Selection 5-1

Scoping (Readings 7.1,7.4,7.6) Parameter passing methods (7.5) Building symbol tables (7.6)

The C++ Language. Loops. ! Recall that a loop is another of the four basic programming language structures

CS1020 Data Structures and Algorithms I Lecture Note #1. Introduction to Java

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

C++ Programming Language

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

arrays C Programming Language - Arrays

Copyright 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

5 Arrays and Pointers

Decision Logic: if, if else, switch, Boolean conditions and variables

Transcription:

Final Exam Review CS 1428 Fall 2011 Jill Seaman 1 Final Exam Friday, December 9, 11:00am to 1:30pm Derr 241 (here) Closed book, closed notes, clean desk Comprehensive (covers entire course) 25% of your final grade I recommend using a pencil (and eraser) All writing will be done on the test paper I will hand out. No calculators. 2

Exam Format 100 points total (or maybe 200) - Writing programs/functions/code (lots of this) - Multiple choice - Fill-in-the-blank/short answer - Tracing code (what is the output) - Finding errors in code 3 Example Programming Problem Write a function named bignums that takes an array of integers and the number of integers in the array and returns a count of the number of integers in the list over 100. 4

Example Tracing Problem What will the EXACT output of the following code segment be? int foo = 9; string str = "Hey!"; float foo2 = 5.7; while (foo2 < foo) { if (foo2 > 3.14) { cout << str << bigger than PI! << endl; foo = foo - 2; } else cout << foo << in the else << endl; } 5 Chapter 1: Intro to Computer and Programming Hardware vs software Organization of hardware (diagram) Algorithm (set of instructions to perform a task) Machine lang vs low level lang vs high level lang Translation: source code file ->... -> executable compiler/syntax errors vs. runtime errors 6

Chapter 2: Introduction to C++ cout and << (output) Literals: numbers, characters, strings Rules for C++ identifiers and variables Variable Definitions and Initialization Assignment Statements Data Types int, short, long, float, double, bool, char Arithmetic operators Comments 7 Chapter 3: Expressions and I/O cin and >> (input) Numerical Expressions: precedence rules Type Conversions: implicit and explicit Integer division vs float division Named constants Formatted output: setw, setprecision, fixed File I/O, filestream objects, open+close 8

Chapter 4: Making Decisions Relational and Logical Expressions Rel. Operators: < <= > >= ==!= Logical Operators:! && Decision statements: if if-else if-else if (nested if) block switch 9 Ch 5. Loops while loop (general purpose loop) for loop (init; test; update) do-while (body done at least once) input validation count controlled loop, sentinel controlled loop keeping a running total nested loops, infinite loop increment decrement operators (as statements) - x++, ++x, x--, --x 10

Ch 6: Functions Function definition Function call (void vs one that returns a value) Function prototype Function parameters vs arguments Passing arguments by value and by reference Return statement Returning values from functions Scope: variables, local vs global Functions and Arrays Overloaded functions 11 Ch 7: Arrays Array declaration: size must be constant Array elements: syntax, range of subscripts Array initialization: int list[] = {6,7,8}; Arrays of char: null char ( \0 ) at end Operations over arrays input, output, sum, average, finding max, min counting values that pass a test array assignment (copy), compare for equality Partially filled arrays Lack of bounds checking 12

Ch 11: Structures Structure definition (members) Defining structure variables (having a struct type) Struct var initialization: Student s1={ Bob,3.2}; Accessing members (dot operator) Operations over structures assignment, function call input/output, comparison (define yourself) Arrays of structure Nested structures 13 Binary representation Extra topics - convert to/from decimal - arithmetic - sign+magnitude, 2 s complement Bytes and Hex - bits, bytes, KB, MB, GB, TB - convert between hex and binary Characters and Strings - C-string vs string data type - assignment and comparison 14

Extra topics Von Neumann machine (hardware organization) - stored program concept (instructions and data) - fetch-decode-execute cycle Searching - Linear search: understand the algorithm and code Sorting - Selection sort: understand the algorithm 15 Review the slides How to Study understand all the concepts Look at questions at the back of the chapters know how to use the concepts know how to write code Understand the homework assignment solutions rewrite yours so it works Understand the midterm exam problems Practice, practice, practice Get some sleep 16