©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. What is Computer Science? *What do you think it is? *Why is it useful?
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computer Science topics Software Engineering Algorithms Data Structures Operating Systems Computer Architecture Programming Languages Theory of Computation Computer Graphics Networks and security Databases
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. What is this course about? object-oriented concepts objects and classes interfaces and inheritance polymorphism problem solving program design and implementation graphics and user interfaces the Java programming language
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Course Objectives After you have completed this course you should be able to design object-oriented solutions to programming problems implement working programs with good coding and documentation style explain concepts such as algorithms, encapsulation, inheritance
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Textbook An Introduction to Object-Oriented Programming with Java by C. Thomas Wu
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 0 Introduction to Computers and Programming Languages
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. History of Computers Idea of computers has been around since 1823 when Charles Babbage built his Difference Engine Mark I was a computer built with mechanical relays in the 1930's ENIAC (1946) was the first electronic computer - built with vacuum tubes John von Neuman suggested stored- program computer which is model for most computers still
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. History of Computers Starting in the late 1950s, computers built with transistors Starting in the 1960s, integrated circuits allowed computers to become small (desktop computers) and inexpensive (personal computers) Currently, the smallest computers consist of an IC embedded into another device
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5 basic components in computer
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Five parts to the computer 1. CPU the heart of the computer 2. Memory RAM, ROM 3. Storage devices Disk drives, CD-ROM 4. Input and Output Devices keyboard, mouse display, printer 5. Communication Devices modem, network cards
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computers based on binary numbers computer memory built of switches that can be either on or off Two possible states can be represented with two digits - 0 and 1 a sequence of these binary digits (bits) makes a base 2 (binary) number
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Binary Numbers *Similar to decimal numbers, position of a digit gives power of 2 by which that digit needs to be multiplied = 1x x x x2 -1 *Easy to see how to represent integers 25 = = *How to represent the decimal point in real numbers? use a special format that is kind of like scientific notation fixed number of bits for mantissa and exponent
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software *Computer hardware needs software to be useful *Early computers ran one program at a time a human operator loaded and then ran each program in turn *Now we want multiple programs and/or multiple users concurrently an operating system is a program that manages the running of users and programs
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Software *Software consists of instructions that tells a computer what to do *Each type of CPU has a set of instructions that it understands *There are various types of software operating system system utilities applications *Part of what you'll learn in this class is how to write small applications
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Programming Languages Inside a computer, everything is stored in binary form the CPU understands binary instructions Long strings of binary digits are hard for people to read and write without mistakes Programming languages are easier for people to read and write they can be converted into binary by a program called a compiler
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Desirable properties for a programming language Easy for people to learn Not too difficult to translate into machine language Simple rules Unambiguous Complete Can program anything you need to
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Java *Java is an object-oriented programming language from Sun *This is the language you will be using to write your applications *In the next chapter, we'll learn more about object-oriented programming and the software development process