[go: up one dir, main page]

0% found this document useful (0 votes)
46 views8 pages

Programming: in This Lesson Students Will

This document provides an overview of programming concepts and terms. It discusses what a program and computer program are, and how programmers plan programs using techniques like top-down design, pseudocode, and flowcharts. It also covers different types of programming languages like low-level languages, high-level languages, markup languages, and more. Students will learn about key programming topics and develop language skills around programming.

Uploaded by

Mei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views8 pages

Programming: in This Lesson Students Will

This document provides an overview of programming concepts and terms. It discusses what a program and computer program are, and how programmers plan programs using techniques like top-down design, pseudocode, and flowcharts. It also covers different types of programming languages like low-level languages, high-level languages, markup languages, and more. Students will learn about key programming topics and develop language skills around programming.

Uploaded by

Mei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

UNIT 9

PROGRAMMING

In this lesson students will:


- Understand the concept of programming and related issues.
- Get familiar with the following terms:
programming language low-level language
syntax High-level language
code Java applet
algorithm markup languages
top-down program design source program
pseudocode compiler
flowchart object program
bug linkage editor
compile load module
Debug encapsulation
procedure object
machine code inheritance
assembly language polymorphism
assembler library

- Develop language skills on the topic of Programming.

PART 1: ICT BASICS

Task 1.
a. Discuss the following questions:
• What is a program? What is a computer
program?
• How do people often make a plan for a
meeting, an event …? How do programmers
make a computer program?
• What is a language? What is a programming
language?

b. Look at the diagram showing steps of


programming (software development) process.
Try to match the steps with their explanations.

1
Steps Explanations
1. Program specification a) The program is tested or debugged by looking for syntax
2. Program design and logic errors.
3. Program code b) Completed programs are periodically reviewed to
4. Program test evaluate their accuracy, efficiency, standardization, and
5. Program documentation ease of use. Changes are made to the program’s code as
6. Program maintenance needed.
c) The program is written or coded using a programming
language, such as BASIC, C, or Java.
d) The program’s objectives, outputs, inputs, and processing
requirements are determined.
e) An ongoing process throughout the programming process
which focuses on formalizing the written description and
processes used in the program.
f) A solution (An algorithm) is created using programming
techniques such as top-down program design,
pseudocode, flowcharts, and logic structures.

c. Put these programming steps into the correct order


• Document and maintain the
program.
• Test the program and detect bugs.
• Make flowchart.
• Write code and compile.
• Analyze the problem.
• Debug and correct if it is
necessary.

d. Look at the diagram of programming languages. How many kinds of programming


languages are there? What are they?

2
Task 2: With the help of the following diagrams showing different program designs of
FINDING FACTORIAL, try to match the terms and their explanations.

……………………….. 1. A procedure or formula for solving a problem, based


on conducting a sequence of specified actions
……………………….. 2. A formalized graphic representation of a logic sequence,
work or manufacturing process.
……………………….. 3. A logic structure in which structure one program statement
follows another.
……………………….. 4. A way of decomposition of a system into smaller parts in
order to comprehend its compositional sub-systems.
……………………….. 5. A logic structure in which a sequence of instructions is
continually repeated until a certain condition is reached.
……………………….. 6. A logic structure occurs when a decision must be made. The
outcome of the decision determines which of two paths to
follow.
……………………….. 7. A detailed yet readable description of what a computer
program or algorithm must do, expressed in a formally-
styled natural language rather than in a programming
language.

3
Task 3. Read the text about programming languages
a. Find the terms that match the following definitions.
1. ……………………….. programming language such as C, Java or Visual BASIC.
2. ……………………….. a basic language which consists of binary codes.
3. ……………………….. low-level language translated into machine code by assembler
4. ………………………. language used to create and format documents for Web.
5. ………………………. small self-contained program written in Java.
6. ……………………….. a program written in one of the high-level languages.
7. ……………………….. a program that converts a high-level language into machine code.
8. ……………………….. source program which is converted into machine code.
9. ……………………….. systems program which fetches required systems routines and
links them to the object module is known as the
10. ……………………….. the program directly executable by the computer

Programming languages
A program is a set of instructions which a
computer uses to do a specific task (e.g. a solution
to a Maths problem). Programming is the
process of writing a program using a computer
language.
The only language a PC can directly execute is
machine code, which consists of 1s and 0s. This
language is difficult to write, so symbolic
languages that are easier to understand are used.
For example, assembly language uses
abbreviations such as ADD, SUB, MPY to
represent instructions. Assembly language is
translated into machine code by software called
an assembler.
Machine code and assembly language are called low-level languages because they are closer to
the hardware.
High-level languages, however, are closer to human languages; they use forms resembling
English, which makes programming easier. Some examples are:
• FORTRAN – used for scientific and mathematical applications.
• COBOL – popular for business applications.
• BASIC – used as a teaching language, Visual BASIC is now used to create Windows
applications.
• C – used to write system software, graphics and commercial programs.
• Java – designed to run on the Web; Java applets are small programs that run automatically
on web pages and let you watch animated characters, and play music and games.

The languages used to create Web documents are called markup languages; they are instructions
(markups) to format and link text files, for example: HTML (the code used to create Web pages)
or VoiceXML (it makes Internet content accessible via speech recognition and phone).

4
A program written in one of the high level languages is called a
source program. The source program is translated into machine code
by software called a compiler. The program produced after the
source program has been converted into machine code is referred to
as an object program or object module. Another systems program is
the linkage editor, which fetches required systems routines and links
them to the object module (the source program in machine code).
The resulting program is then called the load module, which is the
program directly executable by the computer.

b. Complete this article about the VoiceXML, application langauage with the words
from the box.
HTML dial VoiceXML commands speech recognition

Internet: Voice recognition takes off


You don’t need a sophisticated cell phone to surf the Internet when you’re on the road – just your
own voice. That’s the idea behind a new breed of voice service that is popping up all over the
place. Subscribers (1)………………… a toll-free phone number and use spoken (2) ……………
to listen to anything from weather conditions to stock qotes, or flight information to news stories.
Half a dozen of these services – such as Audiopoint, BeVocal, TellMe and TelSurf Networks –
have already gone live or are testing their systems.
These launches are all happening because two crutial technologies have come of age. (3)
…………………….. software from companies such as Lucent, Nuance and Speechworks can now
understand a wide range of accents and diction without having to be trained to specific voice. And
computer languages such as VoiceXML, make it as easy to write voice services as (4)
…………………….. has made it to write web pages. With (5) ……………………, the human
voice bocomes a substitute for a computer mouse and the spoken command for a click. It doesn’t,
however, call up conventional web pages, but content which is specially composed for a telephone:
sound clips, numbers, music, spoken texts.
The Economist

PART 2: LANGUAGE SKILLS

Task 4. You are going to hear an interview between a systems analyst and a hotel owner who
wants to introduce a better computer system. What questions do you think the analyst will
ask? Make a list; then compare your list with others in your group.
Now listen to the recording to compare your list of questions with those asked by the analyst.
Listen again to find the answers to these questions:
1. What system does the hotelier have at present?
2. What problem is there with the existing system?
3. What form of output does the hotelier want?
4. Who will use the new system?

5
5. Which members of staff will require the most training?
6. What concerns has the hotelier about the new system?
7. What kind of hardware will be required?
8. What is the next step?

Task 5
a. Read the text and find the answers to these questions.
1. What advantages of using object-oriented programming are mentioned in the text?
2. What are the three key features of OOP?
3. What multimedia data types are referred to in the text?
4. List the different types of triangle mentioned in the text.
5. What feature avoids the problem of deciding how each separate type of data is integrated
and synchronized into a working whole?
6. What specific type of rectangle is named in the text?
7. What common properties of a rectangle are mentioned in the text?
8. What features are made quicker by code reusability?

OBJECT-ORIENTED PROGRAMMING
One of the principal motivations for using OOP is to handle multimedia applications in which such
diverse data types as sound and video can be packaged together into executable modules. Another
is writing program code that’s more intuitive and reusable; in other words, code that shortens
programs development time.
Perhaps the key feature of OOP is encapsulation – bundling data and program instructions into
modules called ‘objects’. Here’s an example of how objects work. An icon on a display screen
might be called ‘Triangles’. When the user selects the Triangles icon – Which is an object
composed of the properties of triangles and other data and instructions – a menu might appear on
the screen offering several choices. The choices may be (1) create a new triangle and (2) fetch a
triangle already in storage. The menu, too, is an object, as are the choices on it. Each time a user
selects an object, instructions inside the object are executed with whatever properties or data the
object holds, to get to the next step. For instance, when the user wants to create a triangle, the
application might execute a set of instructions that displays several types of triangles – right,
equilateral, isosceles, and so on.
Many industry observers feel that the encapsulation feature of OOP is the natural tool for complex
applications in which speech and moving images are integrated with text and graphics. With
moving images and voice built into the objects themselves, program developers avoid the sticky
problem of deciding how each separate type of data is to be integrated and synchronized into a
working whole.
A second key feature of OOP is inheritance. This allows OOP developers to define one class of
objects, say ‘Rectangles’, and a specific instance of this class, say ‘Squares’ (a rectangle with equal
sides). Thus, all properties of rectangles – ‘Has 4 sides’ and ‘Contains 4 right angles’ are the two
shown here – are automatically inherited by Squares. Inheritance is a useful property in rapidly
processing business data. For instance, consider a business that has a class called ‘Employees at

6
the Dearborn Plant’ and a specific instance of this class, ‘Welders’. If employees at the Dearborn
Plant are eligible for a specific benefits package, welders automatically qualify for the package. If
a welder named John Smith is later relocated from Dearborn to Birmingham, Alabama, where a
different benefits package is available, revision is simple. An icon representing John Smith – such
as John Smith’s face – can be selected on the screen and dragged with a mouse to an icon
representing the Birmingham plant. He then automatically ‘inherits’ the Birmingham benefits
package.
A third principle behind OOP is polymorphism. This means that different objects can receive the
same instructions but deal with them in different ways. For instance, consider again the triangles
example. If the user right clicks the mouse on ‘Right triangle’, a voice clip might explain the
properties of right triangles. However, if the mouse is right clicked on ‘Equilateral triangle’ the
voice instead explains properties of equilateral triangles.
The combination of encapsulation, inheritance and polymorphism leads to code reusability.
‘Reusable code’ means that new programs can easily be copied and passed together from old
programs. All one has to do is access a library of objects and stitch them into a working whole.
This eliminates the need to write code from scratch and then debug it. Code reusability makes both
program development and program maintenance faster.

b. Re-read the text to find the definitions or explanations for the following terms:
a) OOP
b) Encapsulation
c) Object
d) Menu
e) Square
f) Polymorphism
g) Library

c. Write a short summary of the text


…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..
…………………………………………………………………………………………………..

7
Task 6. Listen to a lecture about the differences between procedural and object oriented
programming. Answer the following questions.
1. What is programming and what is a program?
2. What are the two programming paradigms?
3. What is procedural paradigm? What is the procedure?
4. Why are most of the earliest programming languages procedural ones?
5. What is OOP? What is an object? What is a class?
6. What is the biggest difference between 2 paradigms?
7. Use the example of a band to explain the difference?

Task 7. Listen to the song called “Can’t find bug”. What is the problem mentioned in the
song?

Task 8. Look at the flow chart and try to describe the program:
• What is it for?
• What are the steps in making it?
• What computer have to do?

You might also like