0% found this document useful (0 votes)
73 views

Unit 3 - Program Design and Computer Languages

anglais SII

Uploaded by

aééaééazzqq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
73 views

Unit 3 - Program Design and Computer Languages

anglais SII

Uploaded by

aééaééazzqq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
U.S.T.H.B/C.ELL M1 (S1) Computer Science Department Unit 3 PROERAM DESIEN AND COMPUTER LANGUAGES: 1 Programming A. ® Discuss what you think programming is, B What do the following definitions refer to? Program insiructions written ina particular computer language... Sid -e.. b The techniques of. detecting and correcting errors (or bugs) which may occur in ‘ programs... Sg... © A diagram representing the successive logical steps of the program. ...... Flas. clan @ A special program which converts the source program into machine code- the only language understood by the processor. ....... Congh an. © The basic instructions understood by computers; it consists of 18 and Os (binary code), Moet a pte, a ‘tf 1 The step by step specification of how to reach a solution to a given problem, Plgvir, 9 The process of ‘writing instructions for a computer. ... es ry 2 Computer languages Sometimes it seems as though there are as many computer languages as human languages! So what are they and what do they all do? Computer languages come in many forms - here are some of the main groups. Languages can be compiled, or runtime. All languages have fo be changed from what the Programmer wrote to something the computer can understand - this change is called compiling. Compiled code can no longer be understood by humans, so once a program has been compiled it is tr, hard to. change. Run-time languages are translated into machine code ae the ‘computer runs them, so these are easier to understand and change Most languages used on the Web are run-time languages, because they have to work on many Giferent kinds of computers. Therefore itis easier to let each computer donncc the language into racine Code for itself as it downloads it, This is why many web languages ren happily on computers as different as Apples and PCs. HyperText Mark-up Language or HTML is a very basic type of code whic you look at ‘view source’ on your browser menu, you will see the HTML code. Sometimes wants to make @ page more interactive, he will use a code called JavaScript, which is downloaded with the ‘web page from the intemet, and run on your computer. He can also use another kind of code called Visual Basic Script or VBS to do the same thing, Code that is downloaded from the web and compiled by your computer is called ‘client side script’. However, most of the pages are written in a different language called PHP. (This is why some of the pages in your ‘address bar end with .htm and others with .php) PHP is an example of a ‘server side script. This means that the server which runs a website writes the php into HTML before it is sent to your computer. PHP is a modern language - Perl/CGI is an older language that does almost the same thing, as does another modem web language ASP which stands for Active Server Pages. ‘The most popular compiled languages today are Visual Basic, C, and Java. Most of the programs on your computer were written in one of these languages. Visual Basic is one of the easiest languages to program with (the original Basic language was invented to teach beginners how to code). Because Microsoft have kept updating Visual Basic, it is a modem powerful language which is often used to communicate with databases. (Though there is also a language developed just to talk to databases called SQL. Most intemet databases run on combination of SQL and PHP or ASP.) Cis an older language, which has several flavours such as C++ and C#. It is very popular with profession | programmers, and almost everything that can be done with a computer can be done by writing a program for itin C++. Itis also difficult to learn and has some very strange ways of doing things. Java is a modern idea - itis half a run-time language and half 2 compiled language. Most modern computers have a Java Virtual Machine which compiles your entire Java program once it is loaded. (This is why your ‘web browsing stops while this happens). The advantage of Java is that like run-time languages, it can run on many different kinds of computers. There are many older languages such as Ada and Fortran, which many people still use today, and some very specialist languages such as Smalltalk and Python. There is also a language which is understood by most computers called Assembler - itis halfway between machine code and human code, and is very slow and dificult to waite (BD Read the above text and then decide whether the following statements are True (Tor False (F). 4. An Assembler is understood by most computers because it is ike English. F 2. Java can't run the same code on different types of computer. F 3. The programming language Visual Basic is compiled when it reaches your computer. T 4. Ina Client-side script, the client is the computer that sends the code. F 5. PHP is used to create a compiled language F 6. Unlike ASP, PHP is used to generate web pages. F (Jol) 7. Java script runs scripts on your computer after you have loaded a web page. T 3 Language work: The infinitive A Underline and explain the use of the infinitives in the text Computer Languages . 1. The infinitive with to is used in the following ways: * To express purpose E.g: We use symbolic languages to communicate instructions to the computer. (Gin order to communicate...) Not:...for to communicate * After adjectives E.g : BASIC was widely used in the past because it was easy to learn. E.g: Machine code is too difficult to write. (=not easy enough to write) > After certain verbs E.g: afford, demand, plan, agree, expect, prot ise, appear, hope, refuse, arrange, learn, try, decide, manage, attempt, fall, mean, aim, choose, ask. E.g : A lot of companies are now trying to develop voice applications for web access. ‘After the object of certain verbs E.g: advise, encourage, allow, expect, tell, ask, invite, | want, enable, order, warn, remind, teach, help, recommend, persuade. | E.g: HTML allows us to describe how information will be displayed on web pages. 2 The bare infinitive (without to) is used in the following ways: * After modal verbs E.g. can, could, may, might, will, would, must, should. E.g: Unfortunately, computers can’t understand spoken English E,g: High-4evel languages must be translated into machine code. | After the object with the verbs make and let. E.g: Programs make computers perform specific tasks. Note: In the passive form, the to- infinitive is used. E.g: She was made to apologize. 3 There are several verbs that can be followed by either the ~ing or the infinitive, with a change in meaning. This include: begin, continue, hate, intend, like, love, prefer, start, remember, need, forget and stop. B Choose the correct words (a-c) to complete these sentences. 1 We use high- level languages because machine code is too difficult. understand and debug {sf a tead b reading read) 2 I went on the course........00.. how to be a better Programmer. guy) a lear [b to team] cforto lear on 3 Him not interested in eu see.sseennthat computer language. , Vere, “isd a) learn [b)leaming} ¢) to lear (yaya “in") 4 He refuses..........-....the project with me. (rade a) do ) doing [J todo] 7" ) 5 The engineers warmed the employees not................the cables. (yeahs) a touch b touching [e to touch} Wahine} 6 They may not .............to the conference. (1#j---) (acome} coming © to. come 7 Spyware can make your PC. nore slowly. (fh a perform] |b performing cto perform ) 8 This program is too slow. the simulation. (obpdin+) ado ‘Lb to do] ¢ for doing C What follows? Infinitive or the -ing form? Add the suitable verbs to complete these sentences. 4. A debugger is a tool which helps programmers... Jimu..errors or bugs in a_ program. 2 Canyou imagine. its Sang” will “i!) -~f}..without robots and computers? (ud conf ‘ as t (cvagjos ive awonsy Wy Say "tag } 3 Isimply cant afford... uu, laser printer. fs.) 4. Can you make this of PC... uscAt..? i) 5 | can't get used to... MMs... a Voice recognition system. ("qa wad bg" in svayo Sound 6 Letme....OA si... you how ths program works, (ih. ) 7 The program documentation enables the user.....K9..0...... the program (Qa), -) correctly, D Complete the following article with verbs from the box using the correct form. (-ing or infinitive) make use surf worry perform download buy store check use ask take at Me im 4 i ae ON SS I bought a new MacBook Pro last month. The Intel Core 2 Duo is a real bonus, allowing the computer (1) ....f. ijt. ......tasks faster than earlier MacBook models; the 160GB hard drive is, large enough (2).......A.,0K0tR....al of my music, photo and videos, and I didn't even need (3) Nill leven an external hatd disk. Another great feature is the built-in iSight camera, | can (8). Soe... for webohats, (5). fake oo podcasts and enables you (veoh Eo At.......photos. Software updates are easy too: if you are online — for 1). Ditton... the web gr (8). emails ~ and,an update becomes available, a box appears (9)... (=~... you want (10)..... the update. You just click OK, and i's done. | don't even have to (11)... Mbftyf......about security ether. Every time | transmit data from my computer on the Intemet, Apple's Safari web browser protects. ‘my personal information, such as bank details and credit card numbers by (12)... firewall E Look at these pairs of examples and decide where there is an important change in meaning. opti ackin on Figo) 'b Please remember to shut down the computer before leaving the office. ("#0 ail a ba ; * pain Soko 2 a They stopped to look atthe owehart. (I) j.4) Meee 1 a | remember shutting down the computer before I left the office. ( ir They stopped looking at the flowchart. (loffid sng sarki) 3 a lke studying C language. (vin ng Hol hs ts As) bike to study C language in the evening. 0, fa) 4 @ He needs to repair the hard disk. (a‘}é Wp ip boars) This hard disk needs repairing. 4 Writing a summary A summary is a shortened version of a text containing only the key information. The aim is to Present readers with a short, clear account of the ideas in the text. Summary writing is an important skill in both academic and business contexts. Follow the steps in order to write ‘successful summary. 1 Preparing to write Select the key information + Read the text carefully, looking up words you don't know. Ask yourself what the text is about, Think about the purpose of your summary and what your readers need to know. * Underline the key information (the main idea). Omit details such as examples, quotations, information in brackets, repetitions, figures of speech and most figures and statistics. | ‘* Make notes on the key information. * Make sentences from the notes and links them with connectors (and, but, 60, however, because, etc.) 2 Writing the summary | Write a first draft of your summary using the information you have selected. * Organize the ideas in your notes into a logical order. '* Condense the information where Possible. * Express the ideas in your own words. This will usually be shorter than the original. Rewrite Phrases in the text, but keep any key terms from the subject area, + Do not give your own opinion on the topic. 3 Working on the draft ‘Ask yourself these questions: 4. Is itright length? {F there is a word limit, try to stay as close to it as possible. if your summary is too long, you can usually reduce it further by: ‘+ Cutting out unnecessary phrases, &g. Macs were designed with-one-clear-aim: to facilitate interaction with the computer ‘* Cutting adjectives or modifying adverbs e.g. The way users accessed computer systems was very-complex. Macs were designed with one clear aim * Transform relative clauses into ~ing/ed participle clauses, @.g. Double clicking a folder opens a window which contains programs, documents or... Double clicking a folder opens a window containing programs, documents or... + Replacing phrases with shorter versions: a lot of / not a lot of ——> many / few {fits stil too long, go back and reduce your key information. 2 Does it contain ail the important points in the text? 3 Does it read well? 4 Are the grammar and spelling correct? 4 Write the final version of your summary. BS summarize the text below in 75-80 words. Use devices to abbreviate sentences and focus on important information. A virtual interface The most common user interface today is a graphical user interface or GUI. Typicaily; a GUI includes menus, windows, icons, buttons and a mouse as pointing device. But with the development of virtual reality (VR) techniques, a different type of interface has emerged: a virtual interface. VR uses 3-D graphics and computer simulation to generate an imaginary world in Which the user can move {n virtual interface; you put on a head-mounted display (HMD) to see the pictures which make you feel as if you are in a 3-D world. Most HMDs have two displays and provide stereoscopic vision. You also use sophisticated controlling devices such as 3-D joysticks, gloves, special suits and motion detectors. A virtual mouse, trackball or joystick is used to move around the place you are exploring. A data glove (or VR glove) has some pressure pads and sensors on the fingers which make you feel as if you are picking up objects and touching things. Full body suits with position and bend sensors are used for capturing motion. Motion detectors allow the machine to sense when and how you move. VR systems are already being used in fields like video games, architectural designs and virtual exhibitions. Other VR applications allow participants to view reality from an advantageous Position: for example, simulators and telepresence systems. Scientists reproduce a particular Condition or situation by using a computer program to reproduce it. For example, pilots use flight ‘simulations to do their training. A telepresence system connects remote sensors in the real world with the senses of a person; for instance, doctors use tiny cameras and instruments on cables to do complicated surgery; and scientists use remotely operated robots to work in dangerous conditions; to explore volcanic activity, the ocean depths, or outer space.

You might also like