- Количество слайдов: 43
An Introduction to Programming and Object. Oriented Design Using Java By Jaime Niño and Fred Hosch Slides by Darwin Baines and Robert Burton
Chapter 1 Introduction
This chapter discusses n n Computing as a science. Analysis of large software systems. Fundamental hardware and software concepts. Basic notions necessary to survive.
What is Computer Science? a science of abstraction – Computer science is n creating the right model for a problem and devising the appropriate mechanizable technique to solve it. – A. Aho and J. Ullman n Not the “science of computers. ” Many concepts were framed and studied before the electronic computer. To the mathematicians and logicians of the ‘ 20’s and ‘ 30’s, a computer was a person with pencil and paper.
The Science of Computing n n Automated problem solving. Automated systems that produce solutions. Methods to develop solution strategies for these systems. Application areas for automatic problem solving.
Foundations of computing n Fundamental mathematical and logical structures for u Understanding computing. u Analyzing and verifying the correctness of software and hardware.
Systems definitions n n n computer architecture: organization and structure of hardware. operating systems: fundamental resource management software. distributed systems: connecting computers together in order to share resources and information (networking).
Applications n There are numerous applications of computer science. u Artificial intelligence u Data base management u Computer graphics u Etc.
Methods n n Design and assessment of techniques and software tools for creating automated problem solutions. programming language: a precise, formal notation for expressing and analyzing a natural, correct, efficient program solution.
Methods (cont. ) n software engineering: the study of methods for producing and evaluating software. This is the primary topic of the course.
What is a Software System? n n n Sometimes called a program or application. A temporary solution to a changing problem. 2 major attributes inherent in Software Systems: u dynamics u complexity
Dealing with complexity: Composition n composite structure: a software system composed of manageable pieces. The smaller the component, the easier it is to build and understand. The more parts, the more possible interactions there are between parts and the more complex the resulting structure.
Dealing with complexity: Composition (cont. ) n n Balance between simplicity and interaction minimization. Example: An audio system is easy to manage because each component has a carefully specified function and the components are easily integrated i. e. The speakers are easily connected to the amplifier.
Counterexample n The function of a “Rube Goldberg” device is not obvious, modification is almost unthinkable, the parts lack an intrinsic relationship to the problem the device solves, and the complexity is high.
Dealing with complexity: Abstraction n n Dealing with system components and their interactions without worrying about specific details. Not “vague” or “imprecise. ” Limitation of view to a few properties. Elimination of the irrelevant and amplification of the essential. Capturing commonality between different things.
Two aspects of a system: n n data: the information the program deals with. functionality: what the program does with the data.
Systems: Data n n n data descriptions: the type of data to be stored; fixed for a program. data values: actual values stored for each descriptor. Variable each time the program is run. Example: Descriptor: Name Value: John
Systems: Functionality n n n computation: Performance of some sequence of goal-directed actions with a set of data values. processor: Whatever performs the actions. algorithm: A set of instructions describing a pattern of behavior guaranteed to achieve some goal.
Components of a computation
Object-oriented systems n n n Composite, modular constructions, built using abstraction, consisting of components, and organized around the data. model: an abstraction of a real-world problem that can be represented and manipulated with a computing system. software system: a collection of abstractions that work together to solve problems.
Object-oriented systems (cont. ) n n n These abstractions are called objects. Each object has its own properties and functionality. Reusable components are the key to the efficient production of reliable systems.
Computer system n n n Input/Output: communication with the outside world. processor: performs computation using the instruction set. memory: stores the data and algorithms the system is using, i. e. RAM. file system: stores data and algorithms not currently being used. i. e. disks. network: several connected computers and other devices.
Simple model of a computer system
Memory n n Data encoding schemes: letters, digits, punctuation marks, etc. often are encoded as 8 -bit sequences. u “A” might be represented as 01000001. Memory is divided into fixed size locations, each with a unique address. u Data and instructions are accessed using their addresses and by knowing their sizes.
Successive snapshots of a machine
Software tools n n n operating system: fundamental hardware-resource management software. programming language: the formal expression of data descriptions and algorithms. text editor: the means provided for us to write and edit programs.
Software tools (cont. ) n n compiler: a program that translates programs written in a specific programming language into a a more machine-like language. interpreter: software that reads and executes a machine-independent intermediate language (called “bytecode” in the case of Java).
Operating system n n MS-DOS, Windows NT, Solaris, etc. Performs functions such as verifying user names and passwords, deciding where in memory a program will be loaded, loading programs from disk, etc.
Programming languages n n Java, C++, Pascal, etc. syntax: the set of grammatical and punctuation rules for the language. semantics: the set of rules that specify the meaning of syntactically legal constructs. Each legal construct has exactly one meaning.
Errors in the programming process n n n error: a mistake made in the design, programming, or use of a system. failure: inability of the system to perform its intended function. Errors cause failures.
Errors in the programming process (cont. ) n n Computer systems fail because of u conceptual errors u data errors u hardware failures u software errors Conceptual errors: misunderstanding of the system.
Errors in the programming process (cont. ) n n data errors: incorrect data. software errors: u Syntactic errors: writing something that the programming language doesn’t understand. They are found during compilation. u Logical errors: syntactically correct but not programmed logically (“wok your dog”)
We’ve covered n n Large systems are complex and change over time. To address this, we build systems that are modular, with composite construction, and make extensive use of abstraction. We also covered, a conceptual model of the supporting hardware system; And a basic understanding of the purpose of fundamental software such as operating systems, compilers, and interpreters.
Glossary (cont. )
Glossary (cont. )
Glossary (cont. )
Glossary (cont. )
Glossary (cont. )