1 / 43

An Introduction to Programming and Object-Oriented Design Using Java

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. Computing as a science. Analysis of large software systems.

gitel
Télécharger la présentation

An Introduction to Programming and Object-Oriented Design Using Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 • Computing as a science. • Analysis of large software systems. • Fundamental hardware and software concepts. • Basic notions necessary to survive.

  4. What is Computer Science? • 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 • 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.

  5. The Science of Computing • Automated problem solving. • Automated systems that produce solutions. • Methods to develop solution strategies for these systems. • Application areas for automatic problem solving.

  6. Foundations of computing • Fundamental mathematical and logical structures for • Understanding computing. • Analyzing and verifying the correctness of software and hardware.

  7. Systems definitions • 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).

  8. Applications • There are numerous applications of computer science. • Artificial intelligence • Data base management • Computer graphics • Etc.

  9. Methods • 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.

  10. Methods (cont.) • software engineering: the study of methods for producing and evaluating software. This is the primary topic of the course.

  11. What is a Software System? • Sometimes called a program or application. • A temporary solution to a changing problem. • 2 major attributes inherent in Software Systems: • dynamics • complexity

  12. Dealing with complexity: Composition • 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.

  13. Dealing with complexity: Composition (cont.) • 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.

  14. Counterexample • 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.

  15. Dealing with complexity: Abstraction • 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.

  16. Two aspects of a system: • data: the information the program deals with. • functionality: what the program does with the data.

  17. Systems:Data • 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

  18. Systems: Functionality • 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.

  19. Components of a computation

  20. Object-oriented systems • 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.

  21. Object-oriented systems (cont.) • 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.

  22. Computer system • 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.

  23. Simple model of a computer system

  24. Memory • Data encoding schemes: letters, digits, punctuation marks, etc. often are encoded as 8-bit sequences. • “A” might be represented as 01000001. • Memory is divided into fixed size locations, each with a unique address. • Data and instructions are accessed using their addresses and by knowing their sizes.

  25. Successive snapshots of a machine

  26. Software tools • 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.

  27. Software tools (cont.) • 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 “byte-code” in the case of Java).

  28. Operating system • 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.

  29. Programming languages • 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.

  30. Errors in the programming process • 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.

  31. Errors in the programming process (cont.) • Computer systems fail because of • conceptual errors • data errors • hardware failures • software errors • Conceptual errors:misunderstanding of the system.

  32. Errors in the programming process (cont.) • data errors: incorrect data. • software errors: • Syntactic errors: writing something that the programming language doesn’t understand. They are found during compilation. • Logical errors: syntactically correct but not programmed logically (“wok your dog”)

  33. We’ve covered • 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.

  34. Glossary

  35. Glossary (cont.)

  36. Glossary (cont.)

  37. Glossary (cont.)

  38. Glossary (cont.)

  39. Glossary (cont.)

More Related