Docsity

Study Guide for Introduction to Computing and Programming | CSCI 1301, Study notes of Computer Science

Toggle sidebar
bg1
CSCI 1301
Exam #1 - Study Guide
General Information
Date: September 29, 2011 in class.
The exam will be close book and closed notes.
The exam will consist of true/false questions, multiple
choice, short-answers, fill-in the blank and also practical
problems to test your proficiency in the topics taught in class.
The level of difficulty of the practical problems will be
comparable to those on the labs, exercise worksheets,
projects and the suggested exercises posted in eLC/Lectures.
The following are topics that may be tested in the 1st Exam.
Introduction to Computers and Java
Reading: Java: An Introduction to Problem Solving and
Programming Chapter 1 Sections 1.1, 1.2, 1.3 Testing and
Debugging and lecture notes.
Explain the concepts introduced in class
Computer System
Hardware
oDescribe the different hardware components
Software
oAlgorithm
oProgram
oDifference between algorithm and program
pf3
pf4
pf5

Partial preview of the text

Download Study Guide for Introduction to Computing and Programming | CSCI 1301 and more Study notes Computer Science in PDF only on Docsity!

CSCI 1301

Exam #1 - Study Guide

General Information

Date: September 29, 2011 in class.  The exam will be close book and closed notes.  The exam will consist of true/false questions, multiple choice, short-answers, fill-in the blank and also practical problems to test your proficiency in the topics taught in class. The level of difficulty of the practical problems will be comparable to those on the labs, exercise worksheets, projects and the suggested exercises posted in eLC/Lectures. The following are topics that may be tested in the 1st Exam.

Introduction to Computers and Java

Reading: Java: An Introduction to Problem Solving and Programming Chapter 1 Sections 1.1, 1.2, 1.3 Testing and Debugging and lecture notes.  Explain the concepts introduced in class  Computer System  Hardware o Describe the different hardware components  Software o Algorithm o Program o Difference between algorithm and program

 Explain what a programming language is. o Explain what is the Syntax of programming language o Explain what is the Semantic of programming language  Programming Languages o Low-level Programming Language  Machine language  Assembly Language o High Level Programming Language o Differences between low-level programming language and high level programming languages  Explain what is o Assembler o Compiler o Interpreter  Explain the steps to translate a Java Program o Explain what is Java bytecode o Explain how Java source code is translated and executed  Explain the steps in program development o Explain what is a syntax error o Explain what is a logic error o Explain what is a run-time error  Explain o What is an identifier and how to build valid identifiers in Java o What is a reserved word, also called keyword. o What is a comment and the different types of comments that can be used in java  Describe the structure of a Java Application o You should be able to write a simple Java application as the ones you have develop for your projects and lab assignments.  Declaration the class of the application  Declaration of the main method of the class  Practice Exercises o Self-question in sections 1.1, 1.2, 1.3 Testing and Debugging o Exercises 1,2, 3, 4, 5 o Programming Projects 1, o Lab exercises.

o Explain how an assignment statement is executed o You should be able to write a shortcut assignment statement and rewrite it as an an assignment statement that use the assignment operator =.  Data Conversion: o Explain what a widening conversion is. o Explain what a narrowing conversion is. o You should be able to explain what it is and in which situation in a Java Program the type of data conversion is applied  Promotion  Assignment conversion  Casting o You should be able to cast numeric expressions for a data type to a narrower data type o You should be able to explain how the casting is applied in a given numeric expression.  Interactive Input o How to read input by using objects of the Scanner class  Create an object of the class Scanner  Use the appropriate methods of a Scanner object to read input.  Practice Exercises o Self-question in sections 2.1, 2.2, 2.3 and 2. o Exercises 1, 2, 3, 4, 6, 11, 14 o Programming Projects 1, 3, 4, 6, and 9. o Lab exercises o Arithmetic Expressions Class Activity

Decision Statements

Reading: Java: An Introduction to Problem Solving and Programming, Chapter 3 Sections 3.1 - 3.3, lecture notes.  Explain what is flow of control of the statements in a program o Describe what are the differences among sequence, decision statements  Boolean Expressions : o Comparisons: Relational Operators.

o Explain what lexicographical order is. o Describe what is the result of using the following methods of a the class String  equals  equalsIgnoreCase  compareTo o Logical Operators: AND (&&), OR (||), NOT (!)  Truth tables of Logical Operators  Shortcut mode of the logical operator AND (&&) and OR (||)  Order of Precedence to evaluate Boolean expressions o Apply the order of precedence of arithmetic, relational and logical operators and the short-circuit mode of the AND and OR to compute the Truth value of a Boolean expression. o Write simple Booleans expression using comparisons. o Write complex Boolean expressions involving comparisons of arithmetic expressions and Boolean variables/constants combined by logical operators. o Write Boolean expressions from English statements (see exercise worksheet in lecture 3).  Decision Statements o You should be able to write a Java program that involves if-statement using the appropriate syntax  Simple Decision Statements: if ...  if ... else statements  Multibranch: if else if else statements  Nested decisions statements  Using if-statements to compare two floating-point values:  Explain why it is not appropriate to use the == relational operator to compare the equality of two floating point values.  Conditional Operator  Syntax  Explain how it works.  Be able to write assignment statements that use the conditional operator. o Switch Statement  Syntax  Type of expressions that can be used in a switch statement  Default case