Presentation is loading. Please wait.

Presentation is loading. Please wait.

Putting Computer Systems to Work

Similar presentations


Presentation on theme: "Putting Computer Systems to Work"— Presentation transcript:

1 Putting Computer Systems to Work
Block1 Unit 1 Putting Computer Systems to Work

2 Welcome to MT262 This Course will be introduced to you and directed by: Tutor Mohammed Al- Gharawi Part time Tutor in AOU – Faculty of IT & Computing. With Master Degree in Computer Science from the University of South Florida, USA.

3 Welcome to MT262 Checking Course Material Books 16 Units in 4 blocks
Handbook (contains reference material) Study Calendar CD-ROMs including: Borland C++ Builder 5 Templates and Libraries

4 MT262 Assessment Assessment consists of:
4 TMAs (35%) (2 TMAs/Semester) 2 Quizes (15%) 1 Mid Term (25%) Final 3-hour Examination (25%)

5 Objectives of the course
Develop a systematic approach to designing computer-based solutions. Translate designs for solutions into computer programs. Acquire basic skills in the use of C++ for writing programs. Understand concepts in C++ that are common to all similar programming languages. Acquire experience of using a modern programming environment. Acquire skills in ensuring that programs actually perform as they are intended to perform.

6 1. Introduction: Algorithms and Programming Languages
An Algorithm is : A method of solution, described in a way that can be carried out by a computer, for solving a certain problem. In this course, algorithms will be expressed in C++ programming language.

7 Introduction: The Language C++
The language C++ is a development of the earlier C language: with remedies to some previous defects. and adds useful features including Objects. Why C++ for the course MT262? C++ provides all the facilities that the practical work demands. Transferring skills learned using C++ to other languages is fairly straightforward. The widespread commercial use of C++.

8 2. The Course Software: A computer program: Machine code:
Is a sequence of instructions used to control a computer. Machine code: Initially, programs were written directly in machine code consisting of binary numbers. Assembly languages Have simplified the programming process as they use easier words and abbreviations for the machine code instructions.

9 2. The Course Software: Higher Level Languages (such as C++)
Provide a more ‘human readable’ format for writing programs. They are directed at the need to solve problems rather than at facilities available on a specific processor. Program source code: Is a human-readable form of a program (see page 21).

10 2. The Course Software: Compiling:
Is the process of turning source code into a form that the computer can deal with. It can be thought of as a translation process. Debugging: Is the process of tracking down errors in source code.

11 2. The Course Software: C++ Programming Environment
A programming environment: Is a package which facilitates the writing, editing, compiling and debugging of computer programs. C++ Builder programming environment has: Main window giving access to the main menu, toolbar, …..etc.

12 2. The Course Software: C++ Programming Environment
C++ Builder programming environment also has: Code Editor: for writing and editing the program source code. This is a specially tailored word-processing program. A compiler to translate the program source; A linker for incorporating reusable code supplied by other people;

13 2. The Course Software: C++ Programming Environment
C++ Builder programming environment also has: Extensive facilities for testing the programs, both as a whole and step by step; Libraries of code for carrying out common programming tasks; A number of other facilities connected with the details for programming for windows, such as: Forms for designing application windows; and Object Inspector for inspecting and editing the way in which window objects behave.

14 2. The Course Software: Installing C++ Builder 5
Students are advised to read pages 12 to 19. students need to install Builder 5, install Templates and Libraries, create a shortcut, and perform an initial testing. Students may be shown a quick tour of installing C++ Builder and initial testing (if time permits)

15 3. Exploring Builder: Introduction
C++ Builder project Is a collection of files used by Builder to create an executable program. Every project consists of a number of files.

16 3. Exploring Builder: Files in C++ Builder Project
The project source files (with extension .cpp): Which contain the source code for the project; The project resource file (with extension .res): Which contains information about the applications icon, cursors, etc.; The project makefile (with extension .bpr): Which keeps track of all the files in the project; and One or more header files (with extension .h): Which contain declarations but not code.

17 3. Exploring Builder: C++ Builder Project
During Linking process, all the compiled project source code is combined into one executable file. Which is saved by Builder using project name with the extension .exe

18 3. Exploring Builder: Builder provides a variety of templates for developing new applications. The simplest is the one used throughout Blocks I and II for designing Console Applications. These are applications which are driven by commands entered at the keyboard, and which display output in a DOS window.

19 3. Exploring Builder Computer Activities
Students are strongly advised to do computer activities (3.1  3.5) Tutor may demonstrate how computer activity 3.1 works. Activity 3.1 is about writing a simple program to print out the phrase “Hello world” on screen, using Builder 5.

20 3. Exploring Builder Activity 3.1
C++ Source Code // #include <vcl.h> #include <stdio.h> #pragma hdrstop #pragma argsused int main(int argc, char* argv[]) { puts("Hello World."); puts("Press Enter to close program."); getchar(); return 0; } // Meaning of the code // is used for comments. Lines 2 and 3 tell Builder to incorporate code from libraries. Line 4 tells Builder how to deal with library files. Line 6 is to avoid the production of warning messages relating to argc and * argv[]. Lines 7,8,12, and13 provide the compulsory code required by the version of C++ being used and by the Windows operating system. Lines 9, 10, and 11 provide an example of output from and input to the computer. (puts(…) is short for ‘put string’; getchar() is to await input from user.

21 3. Exploring Builder Activity 3.3

22 3. Exploring Builder Activity 3.3: Activity 3.4 :
includes an important aspect about adding libraries to a project using the command: Project | Add to Project … Activity 3.4 : Uses the Object Inspector : To write a program for producing a single window (form) on which a single button will be placed.

23 4. Using Computers computer systems
All computer systems have: Input devices for receiving information, either from the user or from the components of an appliance; List what input devices do you know? Processors for manipulating the information received; What else do you know about processors?

24 4. Using Computers computer systems
c) Storage devices for storing the programs and data used by the processor; List types of storage devices that you know? d) Output devices for returning the processed information back to the user (or components). What type of output devices do you know?

25 4.1 Embedded systems Embedded systems are:
computers that are built into devices (such as machine tools, measuring instruments and vehicles) to control the way they operate. A bicycle speedometer and a washing machine controller are examples of embedded systems (how do these operate? Read pp. 30,31 ).

26 Event-driven and Procedural Models for programming
In event-driven models, the user drives the program. Event-driven programs respond to events initiated by the user, such as key presses and mouse clicks.

27 Event-driven and Procedural Models for programming
In procedural models, the program drives the user. This means that, the program controls when it will ask for input, when it will provide output and the order in which various things happen. Programming for embedded systems can take both approaches.

28 4.2 Non-embedded systems When users use computers, they actually work with application programs (e.g. MS Word) Operating systems make computers able to use other programs. When designing application programs there are specific designs which follow “Human-computer interaction” rules.

29 4.2 Non-embedded systems A code specification is:
The description of what a piece of code does; A code implementation is : How a piece of code achieves its purpose. Reusable code is: Code that can be made available to other programs. A Library is a file which contains reusable code for carrying out various tasks (e.g. Builder’s standard I/O library)

30 5. Computer Hardware This section contains a revision about :
Types of computers I/O devices Memory (RAM, ROM) Storage devices (CD-ROM, CD-R, CD-RW) Please read pp Of BI-U1

31 Thanks Thanks for joining us. Next is Unit 2


Download ppt "Putting Computer Systems to Work"

Similar presentations


Ads by Google