software. what is software? software –also called computer programs –are a list of instructions...

15
Software

Upload: cecily-harper

Post on 18-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Software

Page 2: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

What Is Software?

• software– Also called Computer programs

– Are a list of instructions

– Instructions are called code

– CPU performs the instructions

– Three types• Operating system

• Utility

• Application

Page 3: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Software Is Stored In Many Files• Executable files

– Contain the instructions for the CPU

– Have extensions of .exe, or .com

• Dynamic link libraries– Partial executable file

– Used to support executable files

– Have .dll extensions

• Initialization files– Contain configuration settings for software

– Have a .ini extension

– Modern programs use the registry

Page 4: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Software Is Stored In Many Files

• Help files– Contain information about the software

– Information is indexed and searchable

– Provides an online manual

– Have a .chm or .hlp extension

• Batch files– Used to automate tasks

– Hold a series of OS commands

– Have a .bat extension

Page 5: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Program execution– Software executes at the CPU level

– Code to play a sound• Code generates an interrupt

• CPU tells the sound card to play

• Sound card plays the file

– Programmer creates the code

Page 6: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Code– Statements written in a programming language

– Writing code can be tedious• Code must be perfect

• Order of steps must be exact

– Writing code is quite exciting• Problems are solved

• New ideas are formed

Page 7: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Machine code– Recall that computers think in binary

– Code is translated into machine code• CPU executes the machine code

– CPUs have a unique machine code

Page 8: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Programming languages– Simplifies the writing of code

• English is used to describe the binary

– Original code is called source code

– Several hundred languages exist

• Compilers and interpreters– Converts source code into binary

• Allows code to execute

– Checks source code for correctness

Page 9: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Compiler– Creates an executable file

• Contents are called object code

– Executable can run on its own

– Each language has its own compiler

– C++ and Java are compiled languages

Page 10: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Hardware/Software Interaction

• Interpreter– Runs program one line at a time

– More flexible than compilers

– Slower than compilers

– Always needed to execute program

– Visual Basic and Perl are interpreted

Page 11: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Language Categories

• First generation language– Machine languages

– Written in binary

– Different for every CPU

Page 12: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Language Categories

• Second generation languages– Assembly languages

– Statements that represent machine code

– Code converted by an assembler

– Still used to optimize video games

Page 13: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Language Categories

• Third generation languages (3GL)– First higher level language

– Supports structured and OOP• Code is reusable

• Code is portable

– Typically written in an IDE

– C/C++ creates games and applications

– Java creates web applets

– ActiveX creates Web and Windows applets

Page 14: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Language Categories

• Fourth generation languages (4GL)– Easier to use than 3GL

– Coded in a visual IDE

– Tools reduce the amount of code

– Object oriented programming

– Microsoft .Net is a language

– Dream Weaver is an 4GL IDE

Page 15: Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions

Sample CodeC++

#include <iostream>

using namespace std;

int main()

{

cout << "Hello World" << endl;

return 0;

}

Java

public class HelloWorld {

public static void main(String[] args) { System.out.println("Hello World");

}

}

VB.NET

Imports SystemModule Module1 Sub Main() Console.WriteLine("Hello VB.NET World!")End SubEnd Module