Computer Science 1
V22.0101 section 4
Professor: Evan Korth
New York University
Road Map for Today
Welcome to Introduction to Computer
What material will we cover?
What am I getting myself into?
Course Web Page, Text Book, Exams, Office
Hours, Homework, Grading, Cheating Policy,
Reading: chapter 1
V22.0002 or departmental permission.
Math placement at Calculus I level or higher.
Who should be taking this course:
computer science majors or minors
other science students
students who know the basics of some programming
Who should NOT be taking this course
Students that know Java well (should either go
straight to 102 or take this class with honors)
Students that do not know any programming language
You must get a c or better in this class to take
further computer science classes.
Students learn how to
design algorithms to solve problems and
how to translate these algorithms into
working computer programs. Experience is
acquired through programming projects in
a high level programming language.
V22.0101 is intended as a first course for
computer science majors, and for students
of other scientific disciplines.
What the class is really about
There are three main goals of this course:
Foundations of Java
We will focus on Java’s object orientated
Foundations Algorithm Development
Foundations of Software Development
1. Foundations of Java
Java is a popular programming language, widely
used in industry.
We will learn all the specifics of how to program
This includes all the rules that are specific to
First we will
(and cover Java’s
implementation of) the fundamentals: Variables,
Arithmetic, If / Else, For Loops, While Loops,
Methods, Arrays, etc.
Then will then cover new material including
object orientated concepts.
2. Algorithm development
We will look at problem solving methods
that involve analyzing the problem and
designing an algorithm before we start to
Learn the Principles of Software
Building high quality software is
The course presents the syntax and concepts of
programming, and also presents strategies for
building real software that addresses real
I will also try to bring my real
experience to class.
Course Web Site
Course web site is available at:
Web site contains the following information:
Link to the class mailing list
Class mailing list
First assignment is to join it. Do it today!
and follow the instructions
All assignments and news will be sent to the
Homework questions should be sent to the list
and answered by students when possible.
Course Text Book
Introduction to Java
Available at the NYU
Book includes a CD
ROM with Java
programs and other
Lecture notes will follow
Please keep up with the
For the course, you may use any IDE you are
comfortable using. I will use one or more of the
following in the classroom:
JCreator (Note: this IDE has no debugger)
I will also use the command line
All these products can be downloaded from the
web for free.
The class website has links to the downloading
sites for these programs. Please download the
compiler as soon as possible.
If you do not have your own computer, the
computer labs on campus have the software.
Your grade will be determined as follows:
Homework (and quizzes) (30%)
Group project (5%)
Final Exam (40%)
Class participation will help your grade!
If you do not do the homework programs, you cannot pass the
If home work is late, 25% is deducted.
After one week of lateness, home work will not be accepted.
Style counts from the beginning of this class.
Submit the program via email to the e
tutor (more on this later)
up your files: For you own good you must save all
programs in several places (make back
up copies!!). Computer
crashes or lost programs are not valid excuses for not handing in
A Word About Cheating
For the purposes of this class, cheating is
defined as by the CS Department’s
academic integrity policy
Discussing homework concepts is fine, but
you must submit your own work
If you are caught cheating, you will
receive an immediate FAILURE for the
In an effort to make this class enjoyable
Please be on time to class!
Please do not talk to your friends and
neighbors in class! It disturbs everyone, and
makes it hard to concentrate. If you have a
question, just ask me!
Please turn your pagers and cell
Help is always available!
Option 1: Come to my Office Hours
(I may change the
time of my office hours)
Location: Room 319 Warren Weaver Hall
I get bored when nobody visits!
If you cannot make my office hours, I will be
happy to make an appointment with you.
Please try to give me advance warning when
you need an appointment.
Option 2: Write to the class mailing list. Please do
not send homework code to the list.
Option 3: Our TA.
Option 4: Our e
Option 5: CAS Learning Center
Chapter 1, Introduction to Java
Chapter 2, Primitive Data Types
Chapter 3, Selection Statements
Chapter 4, Loops
Chapter 5, Methods
Chapter 6, Arrays
Chapter 7, Objects and Classes
Chapter 8, Strings
Chapter 9, Inheritance and Polymorphism
Chapter 10, Abstract Classes and Interfaces
Chapter 11 Object Orientated Design
Chapter 16, Applets
Chapter 19, Recursion
Chapters 12, 15, 16, 17, 18: GUI Programming
Object Orientated Programming
Reusable software components that model items in the
Meaningful software units
Date objects, time objects, paycheck objects, invoice objects,
audio objects, video objects, file objects, record objects, etc.
Any noun can be represented as an object
More understandable, better organized, and easier to
maintain than procedural programming
2000 Prentice Hall, Inc. All rights reserved.
History of Java
A group of 13 Sun employees including
James Gosling started the “Green Project”
in 1991 with the intention of planning for
the next wave in computing.
They designed the *7 which was “
interactive, handheld home
entertainment device controller
with an animated touchscreen
Gosling’s contribution to the project was
an entirely new processor independent
language call “Oak”.
History of Java (continued)
To make a long story short, people at Sun
decided to use this new language for the web.
At the Sun World conference in May 1995, Marc
Andreessen of Netscape announced an agreement
to integrate Java into its browser
in a nutshell
webpages were no longer going to be static.
Over the next few years, java became very
popular for writing applets (small programs
included on webpages)
Today in addition to writing applets, Java is used
for writing large applications as well as
applications for mobile devices
For more on the history of Java, check out:
Basics of a Typical Java
Java programs normally undergo five phases
Programmer writes program (and stores program on disk)
Class loader stores bytecodes in memory
Verifier ensures bytecodes do not violate security
Interpreter translates bytecodes into machine language
2003 Prentice Hall, Inc. All rights reserved.
Program is created in
an editor and stored
on disk in a file ending
bytecodes and stores
them on disk in a file
Class loader reads
disk and puts
confirms that all
bytecodes are valid
and do not violate
translates them into
a language that the
data values as the
2003 Prentice Hall, Inc. All rights reserved.