csc204 – programming i lecture 1 august 23, 2006
TRANSCRIPT
CSC204 – Programming I
Lecture 1August 23, 2006
8/23/2006 CSC 204 Programming I 2
Today’s Topics Syllabus – an introduction to the course Roster – introduce yourself to the class Get started- an intro to programming [next time – an intro to OOP with Java]
8/23/2006 CSC 204 Programming I 3
About The Course Instructor
Martin Q. Zhao, Ph.D. 201 B Computer Science BuildingPhone: 301-2425Email: [email protected]
Text
Java Program Design 5.0
by Cohoon & Davidson Just Enough UNIX
by Andersen
8/23/2006 CSC 204 Programming I 4
Course Description Learn how to program in Java Structured & object-oriented programming
basic syntax and semantics simple data types and control structures classes and objects arrays and graphics
Learn how to analysis, design, implement, test and debug programs
8/23/2006 CSC 204 Programming I 5
Other Elements (for assessment purposes)
Computer Ethics A book will be loaned to you A class session and one lab will be used Test questions in the third mid term and the
final exam AP A test
Used as bonus points (up to 20)
8/23/2006 CSC 204 Programming I 6
Grade Breakdown
One hour exams (3 at 100 points each)
300 points
Comprehensive Final exam 200 points
Homework assignments (10 at 10 points each)
100 points
Programming assignments (6 total)
240 points
Lab assignments (14 total) 140 points
Maintain course portfolio 20 points
Total 1000 points
8/23/2006 CSC 204 Programming I 7
Grading Policy900 or higher A
870-899 B+
800-869 B
770-799 C+
700-769 C
600-699 D
Lower than 600 F
Chapter 1
Getting Started
8/23/2006 CSC 204 Programming I 9
What is Computer Science? Is computer science the science of
computers? Not exactly. It is the science of information
processes and their interactions with the world. It is the systematic study of algorithmic
processes that describe and transform information: their theory, design, efficiency, implementation, and application.
What is the main concern of computing? What can be (efficiently) automated?
8/23/2006 CSC 204 Programming I 10
Areas of Computer Science algorithm and data structure programming languages computer architecture operating systems software engineering data and knowledge base systems artificial intelligence and robotics human-computer interface
8/23/2006 CSC 204 Programming I 11
Automation Starts from Programs What is a program?
How can the instructions defined in a program be executed?
public class AutomatedProcess { public static void main(String[] args) { System.out.println("Step #1"); System.out.println("Step #2"); System.out.println("Step #3"); }}
8/23/2006 CSC 204 Programming I 12
processor
Computer Architecture – a
simplified view
012345
4194300419430141943024194303
diskkeyboard
display
printer
memory
8/23/2006 CSC 204 Programming I 13
Number Representation & More Decimal or binary representation?
What does computers use and why? Examples:
4,506 1101
Bit and byte What is the largest number that can be represented
with a byte?
Units of measure Time: ms, ns File size: KB, MB, GB, TB
8/23/2006 CSC 204 Programming I 14
Software & Hardware Machine
language Assembly
language High-level
language
8/23/2006 CSC 204 Programming I 15
Additional Background Info
8/23/2006 CSC 204 Programming I 16
History of Java Java’s predecessor was Oak, a language designed
by James Gosling at Sun Microsystems. Oak was given the more-marketable name “Java”
in January 1995. Java was officially announced in May 1995. The first official release of Java occurred in
February 1996, when Sun made available version 1.0 of the Java Development Kit.
Java 1.2 (released by the end of 98) and higher is referred to as Java 2.
The latest Java version is 1.5, also known as Java 5.
8/23/2006 CSC 204 Programming I 17
Why Java? Simple Object-oriented Platform independent
“Write once, runs everywhere!”
Built-in security Distributed Interpreted J2SE, J2EE, and J2ME targeted for various
development needs It’s free
8/23/2006 CSC 204 Programming I 18
Interesting Links about Java General reading
http://java.sun.com/nav/whatis/index.html (A quick guide to the Java technology)http://www.zdnet.com/eweek/stories/general/0,11011,2804967,00.html (Study: Java to overtake C/C++ in 2002)
For those who have programming experience
http://java.sun.com/docs/books/tutorial/
Java API
http://java.sun.com/j2se/1.5/docs/api/
8/23/2006 CSC 204 Programming I 19
What Do Computers Do? A computer system is an integrated collection
of hardware and software components. Hardware refers to the electronics inside a
computer. Software consists of programs that tell the
hardware what to do.
8/23/2006 CSC 204 Programming I 20
Types of Computer Systems Some computer systems are embedded within
other objects. These are called embedded systems.
Other computer systems are intended for direct use by humans (users).
Some systems support multiple simultaneous users, while others are limited to one user at a time.
Systems in the latter category are usually called personal computers, although high-end single-user systems are often called workstations.
8/23/2006 CSC 204 Programming I 21
Hardware Processors
Central processing unit, or CPU Specialized processors, such as a graphics processor
Memory Main memory, or RAM (random-access memory) ROM (read-only memory) Hard disks, floppy disks, and other storage media
Peripheral devices Provide an interface to the world outside the system Include keyboards, mice, monitors, printers, and
modems
8/23/2006 CSC 204 Programming I 22
Software Software consists of programs that instruct the
hardware how to perform operations. A program is a step-by-step set of instructions. Categories of software:
Operating systems. A collection of programs that interact directly with the computer’s hardware.
Applications. Programs designed to perform useful tasks for humans.
We are writing this kind of programs. An operating system serves as a bridge between
hardware and applications.
8/23/2006 CSC 204 Programming I 23
Platforms The combination of an operating system and a
particular type of CPU is often called a platform. Software usually works only on a single platform. Java programs, however, will run on multiple
platforms without change. This is usually referred to as good portability.
Most of the time, a computer system has only one operating system but many applications.
Applications are usually designed for one particular version of an operating system.
8/23/2006 CSC 204 Programming I 24
File Systems A file is a collection of related data. In many operating systems, a file name
includes an extension that indicates the type of data stored in the file.
Common Windows file extensions:.exe (executable program) .doc (document).gif, .jpg (image)
8/23/2006 CSC 204 Programming I 25
File Operations Basic file operations:
Create, Edit, Copy, Rename, Delete A file can be created or edited by using an
editor or word processor. An editor is a program that can create or
modify a file containing text (ordinary characters).
A word processor has the added ability to format text. It is usually not used in our class, except you want
to make your homework more impressive.
8/23/2006 CSC 204 Programming I 26
Directories A directory is a place where files can be
kept. Directories are also known as folders.
Directories are normally organized in a tree-like fashion.
Basic directory operations: Create a directory Move from one directory to another List the files in a directory