New York University
Courant Institute of Mathematical Sciences
Department of Computer Science
CS101 Introduction to Computer Science
Topics, Agenda, Syllabus and Learning Objectives
Course Name
Introduction to Computer
Science CSCI-UA 101
Instructor
Prof. Anasse Bari
Click here for
details about Office Hours (as well as the office hours of the course
assistant and the graders)
Consider visiting your tutors throughout the
week
Check the
announcements section on Brightspace on when the
tutoring starts (usually second or third week of classes)
Schedule and Location
of CS101 Tutors
Practice Exercises
Additional Practice
Problems
Getting Started
with Installing Java
You must install and configure Java in your
machine asap.
You must visit the tutors if you run into
issues installing Java in your machine (the schedule is mentioned above in this
page)
Installation Guide
(windows) visit the tutors if you have issues
Tutorial
to Help You with Command Line or Terminal
The password to open the lecture notes is 101
Chapter Zero: Motivation in Learning Computer
Programming
There are no notes available for this chapter,
this will be a live discussion in class
Chapter One: Introduction to Computer Science,
Computer Programming and Java
Objectives
Introducing Computer Science as a Science.
Learning the basics of Computer Hardware, Compilation
Process, Command Line and Terminal, High-level Language, Machine Language and
Java.
Differentiating between Software Development and
Computer Programming.
Introducing the Fundamentals of Software
Engineering Lifecycle
Defining the term Algorithm and it is
Correlation to Computer Programming
Chapter Two: Your First Java Program
Objectives
Learning how to Install Java
Writing Your First Java Program using Command
Line
Understanding the Basics of Writing, Compiling
and Running a Java Program.
Chapter Three: Expressions, Variables, Input output
using Scanner, Introduction to Strings in Java
Objectives
Introducing primitive
data types
Defining and learning about
constants, variables, declarations, named constants.
Defining and using
operators and operands
Defining assignment
statements
Using Boolean expressions
Using the Scanner class
to obtain input from the console
Introducing strings in
Java
Introducing two
programming Tips
Limiting a double to two or n decimal numbers
after the decimal point
Reading a string with spaces
Chapter Four: Words and Numbers in Java
Objectives
Introducing the Math Library in Java
Defining and generating random variables.
Learning to minimize numerical errors.
Defining and using characters in Java
Learning the String Class in Java
Chapter
Five: Conditional Statements
Objectives
Learning the basic three ways of processing
statements using a programming language
Introducing conditionals
Learning if statement, if else statements
Learning the switch statement
Introducing the how of writing conditions
Chapter
Six: Iterative Statements
Objectives
Introducing the idea of looping statements and
conditions.
Introducing for loop statement
Introducing while statement
Introducing do while statement
Learning the difference between looping
statements
Learning from examples of loops in Java
Chapter Seven: Methods in Java and Understanding
Decomposition in Stepwise Refinement
Objectives
Introducing Methods in Java
Defining Methods
Calling Methods
Returning Values from Methods
Passing Parameters to Methods
Understanding Scope
Overloading Methods
Understanding Method Abstraction and Stepwise
Refinement
Understanding Decomposition in Stepwise
Refinement
Choosing a Decomposition Strategy
Objectives
Motivation behind using arrays
Introducing arrays as data structures
Learning how to declare and use one dimensional arrays
Learning how to declare and use two dimensional
arrays
Chapter Nine: Introduction to the Object-Oriented
Programming Paradigm
Objectives
Introducing the motivation behind the creation of
the object-oriented paradigm
Learning the concept of the class, object (state,
behavior and identity), and abstraction
Differentiating between the procedural
programming paradigm and the object-oriented programming paradigm
The benefits of using the object-oriented
paradigm
Introducing object, classes, constructors,
getters, setters, member variables... by designing a Phone book directory using
the Object-Oriented Programming
Code discussed in class:
Chapter Ten: Working with Objects and Classes
Objectives
Introducing Immutable objects and classes
Learning the concept of Variable Scope, the – this
- reference
Introducing Abstraction and Encapsulation and
Object Composition
Designing a Stack Class
Learning how to design a class and designing
wrapper class for primitive data types
Introducing BigInteger
and BigDecimal Classes
Chapter Eleven: Main Pillars of the Object-Oriented
Programming Paradigm
Objectives
Introducing the concepts of Encapsulation and
Inheritance
Learning the Super keyword, superclass methods
and data fields
Introducing the concept of polymorphism
Learning how to use interfaces and abstract
classes in Java
Introducing the comparable java interface
Introducing casting and instance of
Understanding where to use an interface or an
abstract class
Inheritance
coding example discussed in class: download
here
Abstract
classes and CompareTo and Comparable interface discussed in
class: download here
Chapter Twelve:
The Array List Class in Java (brief introduction to data structures)
Objectives
Learning and applying the Array List class
Introducing the concept of generic type in Java,
boxing and unboxing
Learning how to implement an Array List of objects
Exposure to the concept of data structures
Chapter
Thirteen: Handling Exceptions in Java
Objectives
Catching Exceptions
Retrieving Useful Information from Exception Methods
Chapter Fourteen: Interactive Graphical User
Interfaces with Processing (Applying polymorphism, inheritance, interfaces and
abstract classes) Installation Guide for Processing
Objectives
Learning the basics of graphical user interfaces
using Processing
Learning how to import libraries to eclipse and
use classes defined in the imported libraries in your project
Applying polymorphism, inheritance,
encapsulation, abstraction using processing
What is Java? A Brief History about Java
Top 25 Most Frequently Asked Interview Core Java
Interview Questions and Answers
Practice Exercises and Solutions
Sample
Processing Projects in Java
DO NOT START ON THE HOMEWORK UNTIL
ASSIGNED TO YOU via an announcement sent by the instructor by email and on Brightspace.
The deadlines will also be sent to
you be email.
Homework 1:
Getting Started with Command Line and Java
Tutorial
to Help you with Command Line or Terminal
Learning
Objectives:
Getting familiar with Command Line
Writing simple programs in Java
Learning the Scanner class in Java
Learning basic programming concepts
Homework 2:
Expressions, assignment statements and arithmetic operators in Java
Learning
Objectives:
Understanding Java expressions and assignment
statements
Learning how to work with variables in Java
Learning the process of going from simple algorithms
to implementation
Practicing selection statements and Java math library
Learning how to research for appropriate Java classes
and use them properly
Learning random number genera tors in Java
Homework 3: Practicing
control statements and Strings.
Learning
Objectives:
Leveraging conditional and iterative statement to
implement an ATM Machine
Using the class String and methods defined in the
String class to solve problems
Learning ASCII code of characters
Homework 4: Practicing
modularization and learning methods in Java
Learning
Objectives:
Getting familiar with Eclipse
Writing simple programs in Java
Learning the Scanner class in Java
Acquiring the ability to explain basic programming
related concepts in your own words
Homework 5:
Learning Arrays, Sorting and Method Overloading
Learning Objectives:
Learning and practicing arrays in Java
Learning the difference between pass by reference and
pass by value.
Learning more about method overloading
Learning Objectives:
Learning and practicing multi-dimensional arrays
Learning how to represent a stack data structure as an
array
Getting Started on Object Oriented Design
Homework 7: Phonebook Java Application using arrays and
array lists
Reading and Writing
from a File in Java
Learning objectives:
Applying the Object-Oriented Programming paradigm to
design a Phone Book Directory in Java.
Learning array and array lists in Java
Implementing sorting algorithms
Homework 8:
Project with Possessing in Java
See chapter twelve notes mentioned
above under chapters
Learning objectives:
Learning advanced OOP concepts using processing
Developing a graphical user interface like application
using processing API
(If time permits)
Homework
9: Analyzing data using machine learning API on a real dataset
Learning objectives:
Understanding a brief introduction of data science and
its relation to computer science
Learning how to use a Java based machine learning API
to analyze a real-world dataset
These problems will be discussed in class. You do not need to turn them in. And full solutions will not be provided.
Some of these problems may be discussed in class. You do not need to turn them in. And full solutions will not be provided.
These will be sent to you by email throughtout the semester.