Download presentation
Presentation is loading. Please wait.
Published byGavin Richard Modified over 8 years ago
1
An Introduction to Programming and Object-Oriented Design Using Java By Jaime Niño and Fred Hosch Slides by Darwin Baines and Robert Burton
2
Chapter 1 Introduction
3
This chapter discusses n Computing as a science. n Analysis of large software systems. n Fundamental hardware and software concepts. n Basic notions necessary to survive.
4
What is Computer Science? n Computer science is a science of abstraction – 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.” n Many concepts were framed and studied before the electronic computer. n To the mathematicians and logicians of the ‘20’s and ‘30’s, a computer was a person with pencil and paper.
5
The Science of Computing n Automated problem solving. n Automated systems that produce solutions. n Methods to develop solution strategies for these systems. n Application areas for automatic problem solving.
6
Foundations of computing n Fundamental mathematical and logical structures for u Understanding computing. u Analyzing and verifying the correctness of software and hardware.
7
Systems definitions n computer architecture: organization and structure of hardware. n operating systems: fundamental resource management software. n distributed systems:connecting computers together in order to share resources and information (networking).
8
Applications n There are numerous applications of computer science. u Artificial intelligence u Data base management u Computer graphics u Etc.
9
Methods n Design and assessment of techniques and software tools for creating automated problem solutions. n programming language: a precise, formal notation for expressing and analyzing a natural, correct, efficient program solution.
10
Methods (cont.) n software engineering: the study of methods for producing and evaluating software. This is the primary topic of the course.
12
What is a Software System? n Sometimes called a program or application. n A temporary solution to a changing problem. n 2 major attributes inherent in Software Systems: u dynamics u complexity
13
Dealing with complexity: Composition n composite structure: a software system composed of manageable pieces. n The smaller the component, the easier it is to build and understand. n The more parts, the more possible interactions there are between parts and the more complex the resulting structure.
14
Dealing with complexity: Composition (cont.) n Balance between simplicity and interaction minimization. n 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.
15
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.
17
n Dealing with system components and their interactions without worrying about specific details. n Not “vague” or “imprecise.” n Limitation of view to a few properties. n Elimination of the irrelevant and amplification of the essential. n Capturing commonality between different things. Dealing with complexity: Abstraction
19
Two aspects of a system: n data: the information the program deals with. n functionality: what the program does with the data.
20
Systems:Data n data descriptions: the type of data to be stored; fixed for a program. n data values: actual values stored for each descriptor. Variable each time the program is run. n Example: Descriptor: Name Value:John
21
Systems: Functionality n computation: Performance of some sequence of goal-directed actions with a set of data values. n processor: Whatever performs the actions. n algorithm: A set of instructions describing a pattern of behavior guaranteed to achieve some goal.
22
Components of a computation
23
Object-oriented systems n Composite, modular constructions, built using abstraction, consisting of components, and organized around the data. n model: an abstraction of a real-world problem that can be represented and manipulated with a computing system. n software system: a collection of abstractions that work together to solve problems.
24
Object-oriented systems (cont.) n These abstractions are called objects. n Each object has its own properties and functionality. n Reusable components are the key to the efficient production of reliable systems.
25
Computer system n Input/Output:communication with the outside world. n processor: performs computation using the instruction set. n memory: stores the data and algorithms the system is using, i.e. RAM. n file system: stores data and algorithms not currently being used. i.e. disks. n network: several connected computers and other devices.
26
Simple model of a computer system
27
Memory n Data encoding schemes: letters, digits, punctuation marks, etc. often are encoded as 8-bit sequences. “ A ” might be represented as 01000001. n 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.
28
Successive snapshots of a machine
29
Software tools n operating system: fundamental hardware-resource management software. n programming language: the formal expression of data descriptions and algorithms. n text editor: the means provided for us to write and edit programs.
30
Software tools (cont.) n compiler: a program that translates programs written in a specific programming language into a a more machine-like language. n interpreter: software that reads and executes a machine-independent intermediate language (called “byte- code” in the case of Java).
32
Operating system n MS-DOS, Windows NT, Solaris, etc. n Performs functions such as verifying user names and passwords, deciding where in memory a program will be loaded, loading programs from disk, etc.
33
Programming languages n Java, C++, Pascal, etc. n syntax: the set of grammatical and punctuation rules for the language. n semantics: the set of rules that specify the meaning of syntactically legal constructs. n Each legal construct has exactly one meaning.
34
Errors in the programming process n error: a mistake made in the design, programming, or use of a system. n failure: inability of the system to perform its intended function. n Errors cause failures.
35
Errors in the programming process (cont.) n Computer systems fail because of u conceptual errors u data errors u hardware failures u software errors n Conceptual errors: misunderstanding of the system.
36
Errors in the programming process (cont.) n data errors: incorrect data. n 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”)
37
We’ve covered n Large systems are complex and change over time. n To address this, we build systems that are modular, with composite construction, and make extensive use of abstraction. n We also covered, a conceptual model of the supporting hardware system; n And a basic understanding of the purpose of fundamental software such as operating systems, compilers, and interpreters.
38
Glossary
39
Glossary (cont.)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.