LaDissertation.com - Dissertations, fiches de lectures, exemples du BAC
Recherche

Qu'est ce qu'un programme informatique ? étude en anglais

Dissertations Gratuits : Qu'est ce qu'un programme informatique ? étude en anglais. Recherche parmi 298 000+ dissertations

Par   •  28 Avril 2015  •  4 088 Mots (17 Pages)  •  967 Vues

Page 1 sur 17

What is a computer program?

A computer program is a set of instructions; a sequence of small commands.

ex: des directions en auto pour quelqu'un qui ne connaît pas la route à prendre, étape par étape (turn right, drive 1 mile, turn left...)

Commands are written with statements; a statement is like a sentence in written driving directions. The words, numbers and punctuation used in that sentence depend on the programming language.

Understanding the syntax of a programming language means understanding its rules.

Programming is taking an idea, breaking it into pieces and putting those pieces in the programming language you're using; writing statements in the right order and the right syntax.

Why are there so many programming languages?

A CPU uses "machine code", which would be nearly imposible to write, and each CPU uses a different code. Programming languages bridge the gap in a language that humans can understand.

A low level language is very close to the machine code. The closest is called assembly language. The closer to the machine code a language is, the more complicated it is and the more you need to know about the hardware.

Higher level languages are simpler and work on more platforms, but can be slower as they are not optimized for the CPU. Nowadays, speed differences are minimal.

Anything has to be converted (translated) in machine code before running. There are 2 ways to do this: compiling and interpreting.A compiler is used to create an executable file of the program; the programmer keeps the source code. An interpreter uses the source code to make it understandable by the computer; it doesn't make a seperate file.Ex.: a web browser interprets a JavaScript .js file. Just in time (JIT) or bite code is an intermediate language which compiles part of the file and leaves the rest interpretable.

Scripting languages are integrated in another program. ex: ActionScript is used in Flash, VBScript is used in Microsoft Office and JavaScript is used in a web browser.They do not need to be compiled as the other program serves as an interpreter.

The different languages

C based languages

Characteristics : not object-oriented, low level, compiled, strongly typed and intermediate to advanced level

What it’s used for : everything ; games, utilities, embedded systems, operating systems, not typical desktop, web or mobile

What you need : a text editor, a compiler (such as GCC)

Ressources : somewhat limited as C predates the web, however gc.gnu.org is a good ressource, or the book « The C Programming Language » by Kernighan and Ritchie

Example :

#include <stdio.h> // links to an external library of codes

// this is a comment

Int main (void) { // main is the main function ; it’s where the program begins

int x ; // this is an integer variable ; we don’t just use var

x = calculateSomeValue() ;

printf("Hello\n") ;

}

Java

Java is heavily influenced by C, but came out 20 years later in 1995. It's all about classes and objects.; it is owned and developped by Sun Microsystems (now by Oracle).

Characteristics : object-oriented, huge library called the Java Class Library, high level, hybrid compilation, strongly typed, garbage collector and intermediate level

What it’s used for : cross-platform (Sun's slogan was "write once, run anywhere"), desktop applications and mobile applications (android). An interpreter is needed: Java Virtual Machine (JVM)

Ressources: 2 of the most popular Java compilers / IDEs are Eclipse and Netbeans.

Website: java.sun.com

Example :

class HelloWorldApp {

// another main method!

public static void main(string[ ] args) {

int myInt = 55; // this is an integer variable ; we don’t just use var

System.out.println("Hello World!");

}

}

.NET languages: C# and Visual Basic .NET

C# and Visual Basic .NET are 2 the flagship languages if you are developping on the Microsoft platform. Although they look diferent, their approach is almost identical.

Just like java requires the JVM on every computer that will run a Java program, .NET languages require the .NET runtime to be installed.

Characteristics: object-oriented, huge library (.NET Framework), high-level, hybrid compilation, strongly typed, garbage collector, intermediate level.

What's it used for? apps for any Windows platforms: Windows desktop apps, web apps (ASP.NET) and Windows mobile

Compiler / IDE: Visual Studio is the flagship IDE. The express versions are free.

Website: www.microsoft.com/express

C# example:

// Hello1.cs

public class Hello1

{

public static void Main ( )

{

System.Console.WriteLine("Hello, World!"); // Main indicates this is the 1st line to be executed

}

}

VB.NET example:

Module Module1

Sub Main ( )

System.Console.WriteLine("Hello,

...

Télécharger au format  txt (26.1 Kb)   pdf (274.8 Kb)   docx (24.3 Kb)  
Voir 16 pages de plus »
Uniquement disponible sur LaDissertation.com