Brooklyn College
Dept of Computer & Information Science

CISC 1115: Introduction to Programming Using Java

CISC 1170: Introduction to Programming in Java for Programmers

Bulletin Description

CISC 1115 Introduction to Programming Using Java 3 hours lecture, 2 hours lab; 4 credits

Algorithms, computers and programs. Writing, debugging, and testing programs. Loops and conditional control structures. Method definition and parameter passing. Arrays, ArrayLists, and Strings. Sorting, searching and other basic algorithms. Input and output. Programming applications selected from various disciplines. History and basic concepts of computer science.
Prerequisite: none
Contact hours: 5

Course Objectives

By the end of this course, students should be able to:

  1. Understand the concept of a program (i.e., a computer following a series of instructions)
  2. Declare a variable with an appropriate data type (either character or numeric), initialize the variable's value, and change the value when appropriate
  3. Use control structures, including a loop to repeat the execution of a series of statements and a conditional statement to select one from a series of alternatives
  4. Write a function to perform a subtask and use the function as part of a larger program
  5. Use an array to store multiple pieces of homogeneous data, and to use a simple class to store multiple pieces of heterogeneous data
  6. Trace the execution of a program and predict the results of the execution
  7. Write an algorithm for a simple task

Faculty & Final Exam Dates


Sections


Final Exam 
Day Sections 			Tuesday,May 21, 1:00-3:00PM
Evening Sections	   	Tuesday May 21, 6:00-8:00PM


Course Syllabus
  (A) Basics
	(1) Preliminaries
		A basic model of actual computer systems and the internet
		Computer terms
		History of computing
		Building software: programming languages, compilers, testing
		Programmers and users
	(2) Hello, World
		Simple one method (main) programs
		Standard output
		String literals
		Comments
(B) Arithmetic Calculations
	(1) Numbers
		Output (print/println) of, literals of, declarations of variables and associated operations of the int and double data types
		Declaration initialization, final variables (constants)
		Assignment operators, exchange (swap) algorithm, increment, and decrement
		Distinction between integer and double arithmetic, divisibility, parity
		Expressions, precedence, mixed arithmetic and casting
	(2) Input and Output in Programs
		Input using Scanner, methods: nextInt, nextDouble;
		The import statement
		Formatted output (printf)
(C) Other Types: Strings and Logical
	(1) Strings
		Output of, literals, declarations, and associated operations of String and their use (concat, length, substring (both forms), indexOf/lastIndexOf (both forms), trim, toUpperCase, toLowerCase, charAt, compareTo, equals)
		Primitive vs Reference [Object] types: operator vs methods
		The char data type
		Input using Scanner, methods: next, nextLine;
	(2) Logical
		The boolean type; declaring boolean variables
		Relational operators
		Assigning to boolean variables; flags
		Logical operators
		The conditional operator
		Range checking
(D) Methods
	(1) Calling Static Methods
        Invocation, arguments, and return values
        Current time (System.currentTimeMillis)
        Strings to ints/doubles: Integer.parseInt, etc.
        The Math class and its methods (sqrt, random)
        Composition
	(2) Java API Documentation (System, Math, Scanner, String, PrintStream)
	(3) Static Method Definition
		Parameter declaration, return type, the return statement
		Method scope
		void methods
		Predicate methods
	(4) Overloading Methods; signature and prototype
(E) Control
	(1) Branching
        Compound statements
        if, if—else
        Cascading if—else
        Nested if, if—else
	(2) Loops
        Counting loops: for
        Testing loops: while
        Loop body logic: selection, counting, accumulation, extremes, adjacency logic
        Alternate testing loops: do—while
	(3) Input Loops
        Headers and counting loops (for)
        Sentinel (aka "trailer") loops (while)
        End of data loops (while and hasNext, hasNextInt, hasNextDouble)
	(4) Nested Loops
(F) Arrays
	(1) Basics:
        Declaration of array reference variables
        Creation and initialization of arrays
        Array access
	(2) Traversals:
        Sequential Processing
        Assignment, selection, counting, accumulation, extremes, adjacency logic
        Reversals
	(3) Array-array operations (copying, comparing, arithmetic element-to-element ops)
	(4) Direct indexed array element access
	(5) Searching:
		Sequential
		Binary
	(6) Sorting: one or more simple quadratic sorts (selection, bubble, ...)
(G) External Files
	(1) File names vs File objects vs File streams
	(2) Scanner constructor with File object
	(3) The importance of close
(H) Using the JAVA API Documentation
	(1) File names vs File objects vs File streams
  
  

IDEs and Tutorials

pop_up("http://www.sci.brooklyn.cuny.edu/~goetz/java/");

Supplemental Material

Base Systems and Number Conversions
History of Computing
(PDF file, requires Adobe Reader)

Sample Exams

Fall 2017

Fall 2018

Fall 2020

Programming Game & Surveys

Instructions: Take the pre-survey, play the game, and take the post-survey.
Students who complete the surveys by December 15th will be entered into a raffle to win a $50 Amazon gift card.

Links:
Pre-Survey
Game
Post-Survey



Department Chairperson: Yedidyah Langsam
Deputy Chairperson (Day): Ira Rudowsky rudowsky@brooklyn.cuny.edu
Deputy Chairperson (Evening): Joseph Thurm thurm@sci.brooklyn.cuny.edu
Director, BS in Information Systems: Ira Rudowsky

Location: 2109 Ingersoll Hall
Phone: 718.951.5657
Fax: 718.951.4842