Скачать презентацию 1 1 Introduction to Computers the Internet and Скачать презентацию 1 1 Introduction to Computers the Internet and

fc55862bb596025718238dc54ad8f2ad.ppt

  • Количество слайдов: 35

1 1 Introduction to Computers, the Internet and Visual Basic 2007 Pearson Education, Inc. 1 1 Introduction to Computers, the Internet and Visual Basic 2007 Pearson Education, Inc. All rights reserved.

2 The chief merit of language is clearness. —Galen High thoughts must have high 2 The chief merit of language is clearness. —Galen High thoughts must have high language. —Aristophanes Our life is frittered away with detail. . Simplify, simplify. —Henry David Thoreau My object all sublime I shall achieve in time. —W. S. Gilbert Man is still the most extraordinary computer of all. —John F. Kennedy 2007 Pearson Education, Inc. All rights reserved.

3 OBJECTIVES In this chapter you will learn: § § § Basic hardware and 3 OBJECTIVES In this chapter you will learn: § § § Basic hardware and software concepts. The different types of programming languages. Which programming languages are most widely used. The history of the Visual Basic programming language. Some basics of object technology. The history of the UML—the industry-standard object oriented system modeling language. § The history of the Internet and the World Wide Web. § The motivation behind an overview of Microsoft’s. NET initiative, which involves the Internet in developing and using software systems. § To test-drive a Visual Basic 2005 application that enables you to draw on the screen. 2007 Pearson Education, Inc. All rights reserved.

4 1. 1 Introduction 1. 2 What Is a Computer? 1. 3 Computer Organization 4 1. 1 Introduction 1. 2 What Is a Computer? 1. 3 Computer Organization 1. 4 Early Operating Systems 1. 5 Personal Computing, Distributed Computing and Client/Server Computing 1. 6 Hardware Trends 1. 7 Microsoft’s Windows® Operating System 1. 8 Machine Languages, Assembly Languages and High -Level Languages 1. 9 Visual Basic 1. 10 C, C++, Java and Visual C# 1. 11 Other High-Level Languages 1. 12 The Internet and the World Wide Web 2007 Pearson Education, Inc. All rights reserved.

5 1. 13 Extensible Markup Language (XML) 1. 14 Microsoft’s. NET 1. 15 The. 5 1. 13 Extensible Markup Language (XML) 1. 14 Microsoft’s. NET 1. 15 The. NET Framework and the Common Language Runtime 1. 16 Test-Driving a Visual Basic Application 1. 17 (Only Required Section of the Case Study) Software Engineering Case Study: Introduction to Object Technology and the UML 1. 18 Wrap-Up 1. 19 Web Resources 2007 Pearson Education, Inc. All rights reserved.

6 1. 1 Introduction • Visual Basic 2005 How to Program, Third Edition – 6 1. 1 Introduction • Visual Basic 2005 How to Program, Third Edition – Associated with the abbreviation VB – Appropriate for people with no programming experience or experienced programmers – Object-Oriented programming – Event driven programming 2007 Pearson Education, Inc. All rights reserved.

7 1. 2 What Is a Computer? • Computer – Performs computations and makes 7 1. 2 What Is a Computer? • Computer – Performs computations and makes logical decisions – Billions times faster than human beings • Computer Programs – Sets of instructions for which computer processes data • Hardware – Physical devices of computer system (Ex: Hard Drive) • Computer – Programs that run on computers (Ex: Games) 2007 Pearson Education, Inc. All rights reserved.

1. 3 Computer Organization 8 • Six logical units of computer system – Input 1. 3 Computer Organization 8 • Six logical units of computer system – Input unit • Mouse, keyboard – Output unit • Printer, monitor, audio speakers – Memory unit • Retains input and processed information – Arithmetic and logic unit (ALU) • Performs calculations – Central processing unit (CPU) • Supervises operation of other devices – Secondary storage unit • Hard drives, floppy drives 2007 Pearson Education, Inc. All rights reserved.

9 1. 4 Early Operating Systems • Batch processing – One job (task) at 9 1. 4 Early Operating Systems • Batch processing – One job (task) at a time – Operating systems developed • Programs to make computers more convenient to use • Switch jobs easier • Multiprogramming – Simultaneous” jobs – Timesharing operating systems 2007 Pearson Education, Inc. All rights reserved.

1. 5 Personal, Distributed and Client/Server Computing 10 • Personal computing – Computers for 1. 5 Personal, Distributed and Client/Server Computing 10 • Personal computing – Computers for personal use • Distributed computing – Computing performed among several computers • Client/server computing – Servers offer common store of programs and data – Clients access programs and data from server – Local Area Networks (LAN) 2007 Pearson Education, Inc. All rights reserved.

11 1. 6 Hardware Trends • Gordon Moore – Co-founder of Intel – Moore’s 11 1. 6 Hardware Trends • Gordon Moore – Co-founder of Intel – Moore’s Law: The costs of hardware exponentially decreases. 2007 Pearson Education, Inc. All rights reserved.

1. 7 Microsoft’s Windows Operation System 12 • Microsoft – Dominant software company – 1. 7 Microsoft’s Windows Operation System 12 • Microsoft – Dominant software company – Windows operating system • A graphical user interface (GUI) built on top of DOS – Most widely used operating system • Linux – Operating system based on Unix – Open source • Source code freely available to users – Biggest competitor to Windows 2007 Pearson Education, Inc. All rights reserved.

1. 8 Machine Languages, Assembly Languages and High-Level Languages 13 • Machine language – 1. 8 Machine Languages, Assembly Languages and High-Level Languages 13 • Machine language – “Natural language” of computer component – Machine dependent • Assembly language – English-like abbreviations represent computer operations – Translator programs convert to machine language • High-level language – Allows for writing more “English-like” instructions • Contains commonly used mathematical operations – Compiler converts to machine language • Interpreter – Execute high-level language programs without compilation 2007 Pearson Education, Inc. All rights reserved.

14 Fig. 1. 1 | Comparing machine, assembly and high-level languages. 2007 Pearson Education, 14 Fig. 1. 1 | Comparing machine, assembly and high-level languages. 2007 Pearson Education, Inc. All rights reserved.

15 1. 9 Visual Basic • Evolved from BASIC – Primary purpose was to 15 1. 9 Visual Basic • Evolved from BASIC – Primary purpose was to familiarize novices with programming technique • Microsoft introduced with GUI • Distinctly different language • Integrated Development Environment (IDE) – Write, run, test and debug programs conveniently • . NET platform – Web-based applications can be distributed to a variety of devices – Different languages can interact 2007 Pearson Education, Inc. All rights reserved.

16 1. 10 C, C++, Java and Visual C# • C – Development language 16 1. 10 C, C++, Java and Visual C# • C – Development language of Unix – Hardware-independent languages; portable to most computers • C++ – Evolved from C – Object-Oriented programming (OOP) • Objects: reusable software components 2007 Pearson Education, Inc. All rights reserved.

17 1. 10 C, C++, Java and Visual C# (Cont. ) • Java – 17 1. 10 C, C++, Java and Visual C# (Cont. ) • Java – – C++ based language Sun Microsystems Dynamic content (ex: animations) to Web pages Object-Oriented programming (OOP) • Visual C# – Roots from C, C++, and Java – Powerful class library (FCL) 2007 Pearson Education, Inc. All rights reserved.

18 1. 11 Other High-Level Languages • FORTRAN – FORmula TRANslator – Complex mathematical 18 1. 11 Other High-Level Languages • FORTRAN – FORmula TRANslator – Complex mathematical computations • COBOL – COmmon Business Oriented Language – Commercial application that require precise and efficient manipulation of large amounts of data • Pascal – Structured programming • Ada – Multitasking: Allow many activities to occur in parallel 2007 Pearson Education, Inc. All rights reserved.

19 1. 12 Internet and the World Wide Web • Internet – Developed more 19 1. 12 Internet and the World Wide Web • Internet – Developed more than four decades ago with DOD funding – Originally for connecting few main computer systems – Now accessible by hundreds of millions of computers • World Wide Web (WWW) – Allows for locating/viewing multimedia-based documents – W 3 C • Devoted to developing nonproprietary, interoperable technologies 2007 Pearson Education, Inc. All rights reserved.

20 1. 13 Extensible Markup Language (XML) • XML – Resulted from HTML’s limitations 20 1. 13 Extensible Markup Language (XML) • XML – Resulted from HTML’s limitations – Data independence • Simple Object Access Protocol (SOAP) – Technology for transmissions of objects over the internet 2007 Pearson Education, Inc. All rights reserved.

21 1. 14 Microsoft’s. NET • Independence from specific language or platform • Reusable 21 1. 14 Microsoft’s. NET • Independence from specific language or platform • Reusable application software components that can be used over the Internet • . NET Strategy: Allow programmers and companies to concentrate on their specialties without having to implement every component of every application 2007 Pearson Education, Inc. All rights reserved.

1. 15 The. NET Framework and the Common Language Runtime 22 • . NET 1. 15 The. NET Framework and the Common Language Runtime 22 • . NET Framework is the heart of the. NET strategy • Common Language Infrastructure (CLI): Information about storage of data types • Common Language Runtime (CLR): Programs compiled into machine specific language • Microsoft Intermediate Language (MSIL) plays a crucial role for language interoperability • Just-In-Time Compiler (JIT): Translates MSIL into machine-language code when application executes 2007 Pearson Education, Inc. All rights reserved.

23 Fig. 1. 2 |. NET languages. 2007 Pearson Education, Inc. All rights reserved. 23 Fig. 1. 2 |. NET languages. 2007 Pearson Education, Inc. All rights reserved.

1. 16 Test-Driving a Visual Basic Application 24 • Test-Driving the Drawing Application – 1. 16 Test-Driving a Visual Basic Application 24 • Test-Driving the Drawing Application – – – – Checking your setup Locating the application directory Running the Drawing application (Fig. 1. 3) Changing the brush color (Fig. 1. 4) Changing the brush size (Fig. 1. 5) Finishing the drawing (Fig. 1. 6) Closing the application 2007 Pearson Education, Inc. All rights reserved.

25 Fig. 1. 3 | Visual Basic Drawing application. 2007 Pearson Education, Inc. All 25 Fig. 1. 3 | Visual Basic Drawing application. 2007 Pearson Education, Inc. All rights reserved.

26 Fig. 1. 4 | Drawing with a new brush color. 2007 Pearson Education, 26 Fig. 1. 4 | Drawing with a new brush color. 2007 Pearson Education, Inc. All rights reserved.

27 Fig. 1. 5 | Drawing with a new brush size. 2007 Pearson Education, 27 Fig. 1. 5 | Drawing with a new brush size. 2007 Pearson Education, Inc. All rights reserved.

28 Fig. 1. 6 | Finishing the drawing. 2007 Pearson Education, Inc. All rights 28 Fig. 1. 6 | Finishing the drawing. 2007 Pearson Education, Inc. All rights reserved.

1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML 29 1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML 29 • Object orientation • Unified Modeling Language (UML) – Graphical language that uses common notation – Allows developers to represent object-oriented designs 2007 Pearson Education, Inc. All rights reserved.

1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 30 • Objects – Reusable software components that model real-world items – Look all around you • People, animals, plants, cars, etc. – Attributes • Size, shape, color, weight, etc. – Behaviors • Babies cry, crawl, sleep, etc. 2007 Pearson Education, Inc. All rights reserved.

1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 31 • Object-oriented design (OOD) – Models real-world objects – Models communication among objects – Encapsulates attributes and operations (behaviors) • Information hiding • Communication through well-defined interfaces – Inheritance • Object-oriented language – Programming in object-oriented languages is called objectoriented programming (OOP) – Visual Basic, C#, Java, C++ 2007 Pearson Education, Inc. All rights reserved.

1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 32 • Object-Oriented Analysis and Design (OOA/D) – Essential for large programs – Analyze program requirements, then develop solution • UML – Unified Modeling Language • Pseudocode – Informal text-based means of expressing program logic 2007 Pearson Education, Inc. All rights reserved.

1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 1. 17 Software Engineering Case Study: Introduction to Object Technology and the UML (continued) 33 • History of the UML – Need developed for process with which to approach OOA/D – Booch, Rumbaugh and Jacobson – Object Management Group (OMG) supervised – Version 2 is current version • UML – Graphical representation scheme – Enables developers to model object-oriented systems – Flexible and extensible 2007 Pearson Education, Inc. All rights reserved.

34 Fig. 1. 7 | Examples of Visual Basic applications found in this book. 34 Fig. 1. 7 | Examples of Visual Basic applications found in this book. 2007 Pearson Education, Inc. All rights reserved.

35 Software Engineering Observation 1. 1 Reuse of existing classes when building new classes 35 Software Engineering Observation 1. 1 Reuse of existing classes when building new classes and programs saves time, money and effort. Reuse also helps programmers build more reliable and effective systems, because existing classes and components often have gone through extensive testing, debugging and performance tuning. 2007 Pearson Education, Inc. All rights reserved.