Presentation is loading. Please wait.

Presentation is loading. Please wait.

© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number.

Similar presentations


Presentation on theme: "© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number."— Presentation transcript:

1 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number Application: Introducing Computers, the Internet and C++ Programming Outline 1.1 What Is a Computer? 1.2 Computer Organization 1.3 The Internet and the World Wide Web 1.4 Machine Languages, Assembly Languages and High-Level Languages 1.5 C++ 1.6 Java 1.7 Fortran, COBOL, Pascal and Ada 1.8 BASIC, Visual Basic, Visual C++ and.NET 1.9 Key Software Trend: Object Technology 1.10 Compiling and Running C++ Applications 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications 1.12 Internet and Web Resources 1.13 Wrap-Up

2 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Objectives In this tutorial, you will learn to: –Identify the characteristics of low-level and high-level programming languages. –Apply the basics of object-oriented programming. –Run your first C++ application. –Locate additional C++ information using the Internet.

3 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.1 What Is a Computer? Computers –Perform arithmetic calculations much faster than people can –Computer programs and applications Instructions for a computer’s actions Also known as software –Computer devices (also known as hardware) Examples include keyboard, screen, mouse, hard drive, memory, etc.

4 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.2 Computer Organization Six units in a computer –Input Unit Obtains information from various input devices such as keyboard or mouse –Output Unit Places computer-processed information on output devices (making it available for use outside of the computer) –Memory Unit or Primary Memory Usually volatile (data is lost after computer shuts off)

5 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.2 Computer Organization (Cont.) –Arithmetic Logic Unit Performs arithmetic calculations and determines logic –Central Processing Unit Oversees all computer activities –Secondary Storage Unit Nonvolatile (data is retained after computer shuts off) Long term

6 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.3 The Internet And the World Wide Web ARPANET –Set up by the Advanced Research Projects Agency to network university research computers –Enabled quick and easy communication via e-mail TCP/IP –Transmission Control Protocol Rules for transferring data over the ARPANET Ensured that “packets” of information were sent and received correctly –Internet Protocol Rules for intercommunication between networks

7 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.3 The Internet And the World Wide Web (Cont.) World Wide Web (WWW) –Hardware and software associated with Internet communication –HyperText Markup Language (HTML) Communications format developed by Tim Berners-Lee –World Wide Web Consortium (W3C) Founded by Berners-Lee to develop Internet technologies

8 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.4 Machine Languages, Assembly Languages and High-Level Languages Machine Languages –Machine dependent “natural language” Assembly Languages –Machine language is too slow –Assemblers convert assembly languages to machine languages High-Level Languages –Compilers convert to machine languages –Linkers package machine language files –Interpreters run high-level programs directly –Instructions look like everyday English

9 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.5 C++ Evolved from C –C evolved from B and BCPL Developed by Bjarne Stroustrup in early 1980s Widely used for operating systems –Originally used to create UNIX Provides capabilities for object-oriented programs Hybrid language –C style –Object-oriented style

10 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.6 Java Designed by Sun Microsystems –For intelligent consumer-electronic devices Gained popularity with the World Wide Web –Used for dynamic content and animation on Web Pages Now used for large scale enterprise applications development, enhances functionality of Web servers, provide applications for consumer devices and more Widely used object-oriented language

11 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.7 Fortran, COBOL, Pascal and Ada Fortran (FORmula TRANslator) –Developed by IBM –Still used in engineering community COBOL –Still used in business software Pascal –Designed for teaching structured programming

12 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.7 Fortran, COBOL, Pascal and Ada (Cont.) Ada –Sponsored by the Department of Defense –Named after Lady Ada Lovelace First computer programmer

13 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.8 BASIC, Visual Basic, Visual C++ and.NET BASIC –Beginner’s All-Purpose Symbolic Instruction Code –For simple programs and teaching novices Visual BASIC –Simplified development of Windows applications VB.NET, Visual C++.NET and C# –Framework Class Library (FCL) –Designed for Microsoft’s.NET platform –Object-oriented languages –Visual C++.NET is derived from C++

14 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.9 Key Software Trend: Object Technology Objects –Represent real-world nouns –Attributes (properties) –Actions (behaviors or functions) Procedural Programming Languages –Focus on actions instead of objects

15 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.10 Compiling and Running C++ Applications Files –Source code files (.cpp ) –Header files (.h ) –Executable files (.exe ) Compilation –Turns high-level source code into machine language code Command prompt –Allows text instructions to be given to the computer

16 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.10 Compiling and Running C++ Applications (Cont.) Figure 1.1 Command Prompt window in Windows 2000. Beginning directory for Windows 2000

17 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.10 Compiling and Running C++ Applications (Cont.) Figure 1.2 Command Prompt window in Windows XP. Beginning directory for Windows XP

18 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications Open Command Prompt –Start > All Programs > Accessories > Command Prompt Change directories –Type cd C:\Examples\Tutorial01\CarPayment –Type cd C:\Examples\Tutorial01\GuessNumber Run an application –Type CarPayment –Type GuessNumber

19 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.3 Changing to the Car Payment Calculator application’s directory. Note that the current directory changed

20 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.4 Running the Car Payment Calculator application. Executing the CarPayment application

21 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.5 Car Payment Calculator with data entered.

22 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.6 Car Payment Calculator application displaying calculation results. Results displayed in tabular format Close box

23 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.7 Changing to the Guess the Number application’s directory. Note that the current directory changed

24 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.8 Running the Guess the Number application. Executing the GuessNumber application

25 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.9 Entering an initial guess.

26 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.10 Entering a second guess and receiving feedback. Application displays whether your guess is too high or too low

27 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.11 Test-Driving the Car Payment Calculator and Guess the Number Applications (Cont.) Figure 1.11 Guessing the correct number. Entering additional guesses Entering the correct guess

28 © Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1.12 Internet and Web Resources www.deitel.com www.prenhall.com/deitel www.softlord.com/comp www.elsop.com/wrc/h_comput.htm www.w3.org/History.html www.netvalley.com/intval.html www.ansi.org www.cuj.com


Download ppt "© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number."

Similar presentations


Ads by Google