CS (151) - INTRODUCTION TO PROGRAMMING C++
Teacher: Dr. Shrestha
Fall Semester, 2000
Class hour: 5:00 - 10:00 Friday
Chapter (1) Introduction to Computers and C++ Programming
Save days' work in your diskette !
*****************************
***********
C AND C++ - C is a general purpose programming language that was originally
designed by Dennis Ritchie of Bell Laboratories. It was first used as the
systems language for the UNIX operating system. Ken Thompson, the
developer of UNIX, had been using both assembler and a language named B
to produce initial versions of UNIX in 1970. C was invented to overcome
the limitations of B. B was a programming language based on BCPL, a
language developed by Martin Richards in 1967 as a typeless programming
language. Its basic data type was the machine word, and it made heavy use
of pointers and address arithmetic. COMPUTER COMPUTER PROGRAMS HARDWARE SOFTWARE SOFTWARE DEVELOPMENT METHODS COMPUTER ORGANIZATION INPUT UNIT OUTPUT UNIT MEMORY UNIT ALU CPU SECONDARY STORAGE UNIT OPERATING SYSTEMS Operating systems are software systems that make it more
convenient to use computers and to get the best performance from your
computers. Multiprogramming operating systems enable the simultaneous
operation of many jobs on the computer- the computer shares its resources
among the jobs. Time sharing is a special case of multiprogramming in which users
access the computer through terminals. The user's programs appear to
be running simultaneously. With distributed computing, an organization's computing is
distributed via networking to the sites where the real work of the
organization is performed. Servers store programs and data that may be shared by client
computers distributed throughout a network, hence the term
client/server computing. LANGUAGES
MACHINE LANGUAGE - Cumbersome for humans, example: The following section of a machine language program adds overtime
pay to base pay and stores the result in gross pay: +1300042774 ASSEMBLY LANGUAGE - Little better, example: The following section of an assembly language does the same job
as above machine language: LOAD - BASEPAY The assembly language needs a translator program called the
ASSEMBLER to convert it to machine language which is the only language
the computer directly understands.
HIGH-LEVEL LANGUAGE - grossPay = basePay + overTimepay
Translator programs called COMPILERS convert high-level language
programs to machine language.
- C++ is an extension of C originally created by Bjarne Stroustrup
with additional features like object-based programming, object-oriented
programming, and generic programming.
- A computer is a device capable of performing computations and making
logical decisions many times faster than we could.
- Computer Programs are set of instructions that control how
computers process data.These instructions guide the computer through
orderly set of actions.
- The various devices such as the keyboard, screen, "mouse",
disks, memory, CD-ROM and processing units that comprise a computer
system are called the hardware.
- The computer programs that run on a computer are called as the
software.
Structured Programming,
Top-down stepwise refinement,
Functionalization, and
Object-oriented Programming.
- SIX LOGICAL UNITS
Receiving section of the computer. It obtains information i.e.,
data and computer programs from various input devices and places this
information at the disposal of the other units.
Shipping section of the computer. It takes information that has
been processed by the computer and places it on various output devices
to make the information available for use outside the computer.
Warehouse section of the computer. It retains information that
has been entered through the input unit so that the information may be
made immediately available for processing when it is needed. It also
retains processed information until that information can be placed on
output devices by the output unit.
Arithmetic Logic Unit.
Manufacturing section of the computer. It is responsible for
performing calculations such as addition, subtraction, multiplication,
and division. It contains the decision mechanisms that allow the computer
to compare two items from the memory unit to determine whether or not
they are equal.
Central Processing Unit.
Administrative section of the computer. It is the computer's
coordinator and is responsible for supervising the operation of the other
sections. The CPU tells the input unit when information should be read
into the memory unit, tells the ALU when information from the memory unit
should be utilized in calculations, and tells the output unit when to
send information from the memory unit to certain output devices.
Long-term ware house section of the computer. Programs or data
not actively being used by the other units are normally placed on
secondary storage devices such as disks until they are again needed
later.
In single user batch processing, the computer runs a single
program at a time while processing data in groups or batches.
+1400593419
+1200274027
ADD - OVERPAY
STORE - GROSSPAY
Many languages that look like English, example:
The above program might look like
THANKS FOR STOPPING BY !
TAKE CARE !
AFTER TODAY'S CLASS IS OVER, LOOK AT THE ASSIGNMENT.