jozef goetz contribution 2015 1 2006 pearson education, inc. all rights reserved. 2014 prentice...

67
Jozef Goetz contribution 2015 1 6 Pearson Education, Inc. All rights reserved. 2014 Prentice Hall. All rights reserved. expanded by J. Goetz, 2014

Upload: anis-lester

Post on 14-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Jozef Goetz contribution 2015

1

2006 Pearson Education, Inc. All rights reserved.

2014 Prentice Hall. All rights reserved.

expanded by J. Goetz, 2014

Jozef Goetz contribution 2015

2OBJECTIVES

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 C# programming language.

Some basics of object technology.

The history of the Internet and the World Wide Web.

The motivation behind and an overview of the Microsoft’s .NET initiative, which involves the Internet in developing and using software systems.

Jozef Goetz contribution 2015

Jozef Goetz contribution 2015

4

High thoughts must have high language. Aristophanes

Our life is frittered away with detail. . . .

Simplify, simplify. Henry David Thoreau

•There are two ways of constructing a software design; one way is to make •it so simple that there are obviously no deficiencies, •and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.- C. A. R. Hoare

Jozef Goetz contribution 2015

5

My object all sublime

I shall achieve in time.

W. S. Gilbert

Man is still the most extraordinary computer of all. John F. Kennedy

The chief merit of language is clearness. Galen

Jozef Goetz contribution 2015

1.1  Introduction Computers process data under the control of sequences of

instructions called computer programs.

These programs guide computers through actions (instructions) specified by people called computer programmers.

The programs that run on a computer are referred to as software.

You’ll learn object-oriented programming—today’s key programming methodology that’s enhancing programmer productivity, and reducing software development costs.

You’ll create many software objects that model both abstract and real-world things.

Jozef Goetz contribution 2015

7 What is a Computer?

Computer Device capable of

Performing computations Making logical decisions

Works billions of times faster than human beings

Fastest supercomputers today Perform hundreds of billions of additions per

second

Jozef Goetz contribution 2015

8Fastest Supercomputer (2005) I.B.M. announced that the Blue Gene/L system had

attained a sustained performance of 36.01 trillion calculations per second, or teraflops, eclipsing the top

mark of 35.86 teraflops reached in 2002 by the Earth Simulator in Yokohama

Dobb’s Report 12/14/2007:Researchers from the National Center for Atmospheric Research (NCAR), the San Diego Supercomputer Center (SDSC), Lawrence Livermore National Lab (LLNL), and IBM Watson Research Center have set U.S. records for size, performance, and fidelity of computer weather simulations. Tom Spelce and Brent Gorda of Lawrence Livermore; and

Robert Walkup of IBM who set a record for "parallelism" by

running on 15,360 processors of the 103 peak teraflops IBM Blue Gene/L supercomputer.

Jozef Goetz contribution 2015

Fastest Supercomputer in October 2010

China Wrests Supercomputer Title From U.S. - October 28, 2010

FR: http://www.nytimes.com/2010/10/28/technology/28compute.html

Chinese researchers at a national defense university in Tianjin unveiled the world’s fastest supercomputer, Tianhe-1A uses a Linux-based operating system It was the fastest computer in the world from October 2010 to June 2011

The supercomputer is powered by California-based chip maker NVIDIA.

This Chinese supercomputer uses 7,168 NVIDIA graphics chips

and 14,336 Intel processing chips giving it enough power to

process 2,507 trillion 2.5 petaflops, or 2.5 quadrillion floating point calculations per. That is 30% faster than the previous record holder, the Oak Ridge

National Laboratory in Tennessee.

9

Jozef Goetz contribution 2015

Fastest Supercomputer in November 2011

The K computer – named for the Japanese word "kei" ( 京 ?), meaning 10 quadrillion (1016) - 10 petaflops is a supercomputer (a Linux-based operating system) produced by Fujitsu, currently installed at the RIKEN Advanced Institute for Computational Science campus in Kobe, Japan.

The K computer is based on a distributed memory architecture, with over 80,000 computer nodes. It is intended to have a variety of applications, including climate research, disaster prevention and medical research.

In June 2012, K was superseded as the world's fastest supercomputer by the American IBM Sequoia.

10

Jozef Goetz contribution 2015

Fastest Supercomputer in June 2012 and 2013

IBM Sequoia is a petascale Blue Gene/Q supercomputer constructed by IBM for the National Nuclear Security Administration as part of the Advanced Simulation and Computing Program (ASC).

On 14 June 2012, the TOP500 Project Committee announced that Sequoia replaced the K computer as the world's fastest supercomputer, with a LINPACK performance of 16.32 petaflops, 55% faster than the K computer's 10.51 petaflops, using 123% more sockets than the K computer's 705,024 sockets.

Sequoia is also more energy efficient, as it consumes 7.9 MW, 37% less than the K computer's 12.6 MW.

The entire supercomputer runs on Linux, with Compute Node Linux running on over 98,000 nodes, and Red Hat Enterprise Linux running on 768 I/O nodes that are connected to the filesystem.

http://www.fedtechmagazine.com/article/2013/08/10-fastest-supercomputers-world-infographic - Top 10 fastest computer in world in June 2013 – Tianhe 2

11

Jozef Goetz contribution 2015

Fastest Supercomputer in June 2014

http://www.forbes.com/sites/alexknapp/2014/06/23/chinas-tianhe-2-remains-the-worlds-fastest-supercomputer/

The Tianhe-2 a supercomputer developed by China’s  National University of Defense Technology. Its speed, according to the organization’s benchmark, is 33.86 petaflop/s. That’s nearly twice the speed of the second-fasted computer, a Cray supercomputer installed at the Oak

Ridge National Laboratory.

The United States still has the most supercomputers in the top 500 at 233, but that’s 32 fewer than it had on November’s list. China has 76 supercomputers on the list, up from 63 on November’s list.

Among businesses building supercomputers, HP has the most systems on the list with 182, IBM is in second with 164, and Cray is third with 51.

12

Jozef Goetz contribution 2015

13 1.2 Hardware Trends Improving technologies

Internet community gains improvements of Hardware Software Communications

Cost of products and services Consistently dropping over the decades Gordon Moore

– Co-founder of Intel– Moore’s Law: The costs of hardware exponentially decreases

Technology doubled in processing power approximately every 18 months and at the same time the price for that technology declined by about 35% a year relative to this power.

Computer capacity and speed Doubles every two years (on average)

Microprocessor chip Laid groundwork in late 1970s and 1980s for productivity

improvements of the 1990s

Jozef Goetz contribution 2015

1.3  Data Hierarchy Data items processed by

computers form a data hierarchy that becomes larger and more complex in structure as we progress from the simplest data items (called “bits”) to richer data items, such as characters, fields, and so on.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

BitsThe smallest data item in a computer can assume the value 0 or the value 1.

Such a data item is called a bit (short for “binary digit”—a digit that can assume either of two values).

It’s remarkable that the impressive functions performed by computers involve only the simplest manipulations of 0s and 1s—

examining a bit’s value, setting a bit’s value and reversing a bit’s value (from 1 to 0 or from 0 to 1).

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)Characters We prefer to work with decimal digits (0–9), uppercase letters (A–Z), lowercase letters (a–z), and special symbols (e.g., $, @, %, &, *, (, ), –, +, ", :, ? and / ).

Digits, letters and special symbols are known as characters. The computer’s character set is the set of all the characters used to write programs and represent data items on that device.

Computers process only 1s and 0s, so every character is represented as a pattern of 1s and 0s.

The Unicode character set contains characters for many of the world’s languages.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

C# supports several character sets, including 16-bit Unicode® characters that are composed of two bytes—each byte is composed of eight bits.

See Appendix C for more information on the ASCII (American Standard Code for Information Interchange) character set—the popular subset of Unicode that represents uppercase and lowercase letters in the English

alphabet, digits and some common special characters.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

FieldsJust as characters are composed of bits, fields are composed of characters or bytes.

A field is a group of characters or bytes that conveys meaning.

For example, a field consisting of uppercase and lowercase letters could be used to represent a person’s name, and a field consisting of decimal digits could represent a person’s age.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

Records Several related fields can be used to compose a record.

In a payroll system, for example, the record for an employee might consist of the following fields (possible types for these fields are shown in parentheses):

Employee identification number (a whole number) Name (a string of characters) Address (a string of characters) Hourly pay rate (a number with a decimal point) Year-to-date earnings (a number with a decimal point) Amount of taxes withheld (a number with a decimal point)

Thus, a record is a group of related fields.

In the preceding example, all the fields belong to the same employee.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

FilesA file is a group of related records.

More generally, a file contains arbitrary data in arbitrary formats.

In some operating systems, a file is viewed simply as a sequence of bytes—any organization of the bytes in a file, such as organizing the data into records, is a view created by the programmer.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)

DatabaseA database is a collection of data that’s organized for easy access and manipulation.

The most popular database model is the relational database in which data is stored in simple tables.

A table includes records composed of fields. For example, a table of students might include first name, last

name, major, year, student ID number and grade point average fields.

The data for each student is a record, and the individual pieces of information in each record are the fields.

You can search, sort and otherwise manipulate the data based on its relationship to multiple tables or databases.

Jozef Goetz contribution 2015

1.3  Data Hierarchy (Cont.)Big DataThe amount of data being produced worldwide is enormous and growing explosively.

According to IBM, approximately 2.5 quintillion bytes (2.5 exabytes) (exabyte = 1000 ^6) of data are created daily and 90% of the world’s data was created in just the past two years! (www-01.ibm.com/software/data/bigdata/)

Jozef Goetz contribution 2015

23What is a Computer? (II)

Programs Sets of instructions that process data Guide computer through orderly sets of actions specified

by computer programmers

Computer system Comprised of various hardware devices

Keyboard Screen (monitor) Disks Memory Processing Units Etc.

Jozef Goetz contribution 2015

24 1.4 Computer Organization Every computer divided into 6 units

1. Input unit “Receiving” section of computer Obtains data from input devices

– Keyboard, mouse, disk or scanner

– Other forms of input include

• receiving voice commands,

• scanning images and barcodes,

• reading from secondary storage devices (such as hard drives, CD drives, DVD drives, Blu-Ray Disc™ drives and USB flash drives),

• receiving video from a webcam or smartphone and

• receive information from the Internet (such as when you download videos from YouTube™ or e-books from Amazon).

Places data at disposal of other units

Jozef Goetz contribution 2015

25 1.4 Computer Organization Every computer divided into 6 units

2. Output unit “Shipping” section of computer Puts processed info on various output devices

– display on screens;

– printed on paper;

– played as audio or video on PCs and media players and giant screens in sports stadiums;

– transmitted over the Internet or used to control other devices.

– Computers also can output their information to networks, such as the Internet.

Makes info available outside the computer

Jozef Goetz contribution 2015

261.4 Computer Organization (II)

3. Memory unit Rapid access, low-capacity “warehouse” Temporarily retains information entered through input unit Retains info that has already been processed until it can be sent

to output unit Often called memory, primary memory, or random access

memory (RAM)

4. Arithmetic and Logic Unit (ALU) “Manufacturing” section of computer Performs calculations (addition, subtraction, multiplication

and division) Contains decision mechanisms and can make comparisons

Jozef Goetz contribution 2015

271.4 Computer Organization (III)5. Central Processing Unit (CPU)

“Administrative” section of computer Coordinates and supervises other sections (instruct ALU, Input,

Output, units)

Many of today’s computers have multiple CPUs and, hence, can perform many operations simultaneously.

A multi-core processor implements multiple processors on a single “microchip” a dual-core processor has two CPUs and a quad-core processor has four CPUs.

Many of today’s desktop computers have quad-core processors that can execute billions of instructions per second.

Jozef Goetz contribution 2015

281.4 Computer Organization (III)6. Secondary storage unit

Long-term, high-capacity “warehouse” Stores programs or data not currently being used by

other units on secondary storage devices

– Hard Drives, disks or CDs Takes longer to access than primary memory Information on secondary storage devices is persistent—

it’s preserved even when the computer’s power is turned off.

Examples of secondary storage devices include – CD drives, – DVD drives and – flash drives, some of which can up to 2 TB (TB stands

for terabytes; a terabyte is approximately one trillion bytes).

Jozef Goetz contribution 2015

29Early Operating System Early Computers

Single-user batch processing Jobs on decks of punched cards One job ran at a time Results took hours to process

Operating Systems Managed transitions between jobs Increased amount of work computer could accomplish by

developing OS with more features

Multiprogramming Simultaneous operation of several jobs Computer resources split between jobs, specifically in RAM

– Achieved better utilization Still took long hours for results

Jozef Goetz contribution 2015

30Early Operating System

Timesharing Operating Systems (1960s) Computers accessed through terminals

Devices with keyboards and screens

Hundreds of people use system at once Quickly performs small portions of each person’s job Gives appearance of running simultaneously

Jozef Goetz contribution 2015

31History of Computer Systems

First generation 1945 - 1955 mechanical relays, vacuum tubes, plugboards

Second generation 1955 - 1965 transistors, batch systems

Third generation 1965 – 1980 Integrated Circuits (ICs) and multiprogramming

Fourth generation 1980 – present personal computers, laptop, tablets, smart phones PDAs (Personal Digital Assistant)

A handheld computer for managing contacts, appointments and tasks.

Jozef Goetz contribution 2015

32

History of Operating Systems

Early batch system a. bring cards to 1401 b. reads cards (batch of jobs) onto tape c. operator carries input tape to 7094 d. puts tape on 7094 which does computing e. put tape on 1401 which prints off line output

Jozef Goetz contribution 2015

33Memory Layout for a Simple Batch System

Jozef Goetz contribution 2015

34Multiprogrammed Batch Systems

Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.

Jozef Goetz contribution 2015

35Evolution of an Operating System (III)

UNIX Originally an experimental timesharing OS Developed by Dennis Ritchie and Ken Thompson

Developed at Bell Labs Written in C

Open-Source software Source code freely distributed among programmers The code is open and you can see it, change it, learn from it Created large community

Powerful and flexible Handled any task a user required Developed into many versions

– Linux– BSD

Jozef Goetz contribution 2015

36Operating Systems 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

Jozef Goetz contribution 2015

37THE OPERATING SYSTEM ZOO

1. Mainframe operating systems

2. Server operating systems

3. Multiprocessor operating systems

4. Personal computer operating systems

5. Real-time operating systems

6. Embedded operating systems

7. Smart card operating systems

Jozef Goetz contribution 2015

38Personal Computing, Distributed Computing and Client/Server

Computing Personal Computing

Pioneered by Apple and IBM Computer prices dropped

– Computers reasonable for personal or business use

Stand-alone units People work on personal machines

– Transported disks to share information

• “Sneakernet”

Machines linked together– Telephone lines

– Local Area Networks (LANs)

– Led to distributed computing

Jozef Goetz contribution 2015

39Personal Computing, Distributed

Computing and Client/Server Computing (II)

Distributed Computing Work distributed over networks

N-Tier applications

– Split parts of applications over numerous computers

1. User interface

2. Business-logic processing

3. Database

– Different parts interact when application runs

Jozef Goetz contribution 2015

40Personal Computing, Distributed Computing and Client/Server

Computing (III) Client/Server Computing Workstations - clients

High-powered desktop machines Easily share information over computer networks

Servers Store programs and data Information accessed by clients

Local Area Networks (LAN)

Capabilities (GUI) provided by modern Operating Systems Windows (98, ME, 2000, XP, Vista, Windows 7, 8 and 10),

UNIX, Linux, Mac OS

Jozef Goetz contribution 2015

411.5 Machine Languages, Assembly Languages and High Level Languages

Programming Languages Hundreds exist today Fall into three categories

1. Machine languages– “Natural language” of computer component– Machine dependent

2. Assembly languages– English-like abbreviations represent computer operations– Translator programs convert to machine language

3. High-level languages– Allows for writing more “English-like” instructions

• Contains commonly used mathematical operations

– Compiler converts to machine language

4. Interpreter– Execute high-level language programs without compilation

Jozef Goetz contribution 2015

421.5 Machine Languages, Assembly

Languages and High Level Languages (II)

Machine Languages Only language understood directly by computer Defined by computer’s hardware design

Machine-dependent– Languages specific to particular computers

Difficult to understand for human Example:

+1300042774+1400593419+1200274027

Streams and numbers– Ultimately reduced to 0s and 1s

• Binary code– Instruct most elementary of operations

Slow, tedious and error-prone– Led to Assembly languages

Jozef Goetz contribution 2015

431.5 Machine Languages, Assembly

Languages and High Level Languages (III)

Assembly Languages Example:

LOAD BASEPAYADD OVERPAYSTORE GROSSPAY

English-like abbreviations Represent elementary operations of computer

Translated to machine language Assemblers convert to machine language High-speed conversion

More clear to human readers Still tedious to use

– Many instructions for simple tasks– Led to high-level languages

Jozef Goetz contribution 2015

441.5 Machine Languages, Assembly

Languages and High Level Languages (IV)

High-Level Languages Single statements accomplish substantial tasks Translated to machine language

Compilers convert to machine language Conversion takes considerable time, so

– Interpreters run programs without compiling• Used in development environment

Instructions comprehensible to humans Example:

grossPay = basePay + overTimePay

Looks mostly like everyday English Contains common mathematical notation

Procedural languages are abstractions of assembly languages

Jozef Goetz contribution 2015

45Fig. | Comparing machine, assembly and high-level languages.

Jozef Goetz contribution 2015

461.5 C, C++, Visual Basic .NET and Java

C - 1972 Developed by Dennis Ritchie

Evolved from the B language (“typelless” – every data occupied one word) at Bell Labs

Kernighan and Ritchie: “The C Programming Language”.’78, 2nd ’88

ANSI/ISO 9899 established worldwide standards for C programming called ANSI C Added data type features

Gained recognition as language of UNIX Now a widely used language

Available on most computers Language of most major operating systems Led to development of C++

Hardware-independent languages; portable to most computers

Jozef Goetz contribution 2015

471.5 C, C++, Visual Basic .NET and Java (II)

C++ - 1980 Developed by Bjarne Stroustrup

(a Danish computer scientist) at Bell Labs (1980s) Extension of C

Uses elements from Simula 67

– Simulation programming language Provides features to “spruce up” C Provides object-oriented technology

– Hybrid language

• structured programming

• object-oriented programming (OOP)

• possible to use both

Jozef Goetz contribution 2015

481.5 C, C++, Visual Basic .NET and Java (III)

Object-Oriented Programming (OOP) Uses objects

Reusable software components model real-world items

More productive than structured programming Easier to understand, correct and modify

Object-Oriented Languages abstract elements in the application domain that refer to “objects” communications via message.

Jozef Goetz contribution 2015

491.5 C, C++, Visual Basic .NET and Java (IV)

VISUAL BASIC- mid 1960s Based from BASIC (mid 1960s)

Beginners All-Purpose Symbolic Instruction Code Implemented by Bill Gates at Microsoft

BASIC evolved to Visual Basic in ’91– Graphical User Interface

Included capabilities such as – object based programming,– error handling and – GUI creation

Evolved to .NET – fully OOP language Allows access to .NET libraries Improved object oriented programming

Jozef Goetz contribution 2015

501.5 C, C++, Visual Basic .NET and Java (V)

Java 1991 - announced in 05/1995 Sun Microsystems corporate research project (1991)

Code-named Green Based on C and C++ Intended for intelligent consumer-electronic devices

Lack of popularity almost causes cancellation Sudden popularity of WWW in 1993 provided new potential

Used Java to create web pages with dynamic content (java applets)– Animated and interactive content

Grabbed attention of business community Now very widely used

Enhance functionality of WWW servers Provide applications for consumer devices (pagers, cell phones, PDAs, …)

Java programs Consist of pieces called classes Classes contain methods, which perform tasks

Jozef Goetz contribution 2015

511.8 C# C#

Developed at Microsoft by a team led by Anders Hejlsberg and Scott Wiltamuth

Event driven, object oriented, visual programming language

Roots in C, C++ and Java

Incorporated into .NET platform Web based applications can be distributed

– Devices and desktop computers Programs that can be accessed by anyone through any device Allows communicating with different computer languages

Integrated Design Environment (IDE) Makes programming and debugging fast and easy The process of rapidly creating an application using an IDE is

referred to as Rapid Application Development (RAD)

Jozef Goetz contribution 2015

521.8 C# (II)

C# applications can interact via the Internet using standards SOAP, JSON and REST XML services.

SOAP Simple Object Access Protocol Allows the communicating of applications

written in different languages Any .NET language

Helps to share program “chunks” over the internet

Jozef Goetz contribution 2015

53Why C# ? The integration of software components from various languages proved difficult,

and installation problems were common new versions of shared components were incompatible with old

software – it led to include Common Language Specification (CLS) in .NET framework wit C# as a primary language

Developers recognized the need for software that was accessible to anyone and available from almost any type of device.

C# is fundamental language and design specifically for the .NET Microsoft key technologies and Windows, Web Services and Distributed Applications.

It has roots in C, C++ and Java, adapting the best features of each and adding new features of its own

Power of C with ease of Microsoft Visual Basic® Much cleaner than C++ More structured than Visual Basic More powerful than Java for small and medium size apps.

Jozef Goetz contribution 2015

54Why C# ? C# is object oriented language

contains a powerful class library of prebuilt components,

enabling programmers to develop applications quicklyC# and Visual Basic share the Framework Class Library (FCL) – Builds on COM+ experience

– Native support for

• Namespaces

• Versioning

• Attribute-driven development

C# was standardized by ECMA International (as Standard ECMA-334) and ISO

Jozef Goetz contribution 2015

55Why C# ? C# is appropriate for demanding application development

tasks, especially for building today’s popular Web-based applications.

The .NET platform is one over which Web-based applications can be distributed to a great variety of devices (even cell phones: Windows Phone 7 and 8), laptops, tablets and desktop computers.

C# is an event-driven, visual programming language in which programs are created using an Integrated Development Environment ( IDE) With the IDE, a programmer can create, run, test and

debug C# programs conveniently, thereby reducing the time it takes to produce a working program to a fraction of the time it would have taken without using the IDE.

Jozef Goetz contribution 2015

Why C# ?

C# developers work with C# technology in an application development role within a company.

Often, this includes tasks such as the development or emplacement of software

platforms within a company’s internal software architecture,

the development of web portals, and similar efforts.

C# developers work in a variety of settings for many types of employers; however, no matter the particular position, all C# developers tend to share many job duties.

Salary - http://www.payscale.com/research/US/Job=C%2523_Developer/Salary

56

Jozef Goetz contribution 2015

57Another Motivation to learn C#

C# is very easy to learn if you know C++ or Java , plus the .NET framework makes many things

easier. The class library is primarily written in C#.

Jozef Goetz contribution 2015

58 Other High Level Languages Fortran (FORmula TRANslator)

Developed at IBM (1950s) Complex mathematical computations for scientific and engineering applications Still widely used

COBOL (COmmon Business Oriented Language) Developed by computer users, manufacturers and the government

(1959) Commonly associated with business software Commercial application that require precise and efficient manipulation of large amounts of data

Pascal Structured programming Developed by Professor Nicklaus Wirth (late 1960s)

For academic use

ADA early ’80s Multitasking: Allow many activities to occur in parallel

Modula, Concurrent Pascal (multitasking) etc.

Jozef Goetz contribution 2015

59

.NET programming languages

APL Mondrian

C# Oberon

COBOL Oz

Component Pascal Pascal

Curriculum Perl

Eiffel Python

Forth RPG

Fortran Scheme

Haskell Smalltalk

Java Standard ML

Jscript Visual Basic

Mercury Visual C++

Fig. | .NET programming languages.

Jozef Goetz contribution 2015

60Structured Programming

Early Software Development Complex and costly for businesses (1960s)

Costs exceeded budgets Final products unreliable

Research led to structured programming Disciplined approach to programming Clear, easy to test, debug, and modify

– Several languages resulted from research

– C, Pascal, Ada

– Focused on actions (verbs) rather than things or objects (nouns)

Jozef Goetz contribution 2015

61Structured Programming (II)

Structured Languages Pascal

Designed for teaching structured programming Lacked features for commercial use

C Had features Pascal didn’t (e.g. pointers) Quickly adopted by programmers

Ada Developed by U.S. Department of Defense (late 1970s)

– Based on Pascal– DOD wanted one language for all its needs– Supported multitasking

• Many activities occur in parallel

Jozef Goetz contribution 2015

621.6 Key Software Trend: Object Technology

What is Object Technology? Packaging scheme for creating software units

Units are objects (nouns) which are instances of classes

– Any noun can be represented as an object• Date object, time object, car object

– Specify general format– Have properties (attributes)

• Size, color, weight– Perform actions (verbs) - behaviors

• Moving, sleeping, drawing

• Defined in classes as methods

Jozef Goetz contribution 2015

631.6 Key Software Trend: Object Technology (II)

Object-Oriented programming Objects based on nouns

Reflects the way world is perceived Mirrors real world entities and therefore objects are more reusable

Advantages over structured programming More natural process

– Results in better productivity Classes provide reusability

– Microsoft Foundation Classes (MFC) Easier to maintain (80% of software costs) because

– Programs more understandable– Better organized – Focus on objects– Less attention to details

Jozef Goetz contribution 2015

1.6  Object Technology

InheritanceA new class of objects can be created quickly and conveniently by inheritance – the new class absorbs the characteristics of an existing class, possibly customizing them and adding unique characteristics of its own.

In our car analogy, an object of class “convertible” certainly is an object of the more general class “automobile,” but more specifically, the roof can be raised or lowered.

©1992-2014 by Pearson Education, Inc. All Rights Reserved.

Jozef Goetz contribution 2015

1.6  Object Technology (Cont.)

Object-Oriented Analysis and Design (OOAD)To create the best solutions, you should follow a detailed analysis process for determining your project’s

requirements (i.e., defining what the system is supposed to do)

Develop a design that satisfies them (i.e., deciding how the system should do it).

Carefully review the design (and have your design reviewed by other software professionals) before writing any code.

©1992-2014 by Pearson Education, Inc. All Rights Reserved.

Jozef Goetz contribution 2015

1.6  Object Technology (Cont.)

If this process involves analyzing and designing your system from an object-oriented point of view, it’s called an object-oriented analysis and design (OOAD) process.

Languages like C# are object oriented.

Object-oriented programming (OOP) allows you to implement an object-oriented design as a working system.

Jozef Goetz contribution 2015

1.6  Object Technology (Cont.)

The UML (Unified Modeling Language)The Unified Modeling Language (UML) is now the most widely used graphical scheme for modeling object-oriented systems.