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

(Exploring CS) Lecture 1 - Notes

The document provides an overview of computer hardware, software, programming languages, and the software development process. It discusses the main components of a computer system including the CPU, memory, input/output units, and secondary storage. It also covers the different types of programming languages from machine language to high-level languages. The document explains structured programming, object-oriented programming, and the typical phases of software development including analysis, design, coding, testing, and maintenance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

(Exploring CS) Lecture 1 - Notes

The document provides an overview of computer hardware, software, programming languages, and the software development process. It discusses the main components of a computer system including the CPU, memory, input/output units, and secondary storage. It also covers the different types of programming languages from machine language to high-level languages. The document explains structured programming, object-oriented programming, and the typical phases of software development including analysis, design, coding, testing, and maintenance.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Exploring CompSci

-Lecture 1-

Hardware and Software


Computer Hardware
- Input unit
o Obtains information from input devices
o Keyboards, mouse…
- Output unit
o Takes processed information and places it on output devices
o Screens, print on paper…
- Memory unit
o Stores information. 2 main types
o RAM (Random Access Memory) is volatile. Program and data
are stored in RAM when using the computer
o ROM (Read Only Memory) contains fundamental instructions
that cannot be changed or lost. Non-volatile
- ALU (Arithmetic and Logic Unit)
o Performs all arithmetic and logic operations (+-*/<=>)
- CPU (Central Processing Unit)
o Supervises the overall operation of the computer
- Secondary storage
o Permanent storage area for programs and data
- USB, floppy disk, CD…
Programming Languages
Terminology
- Computer program: a set of instructions used to operate a computer
to produce a specific result
- Computer programming: write computer programs
- Programming language: the language used to create computer
programs
- Software: a program/set of programs

Machine languages
- The lowest level of computer languages (1s and 0s)
- Programs in machine language can control directly to the hardware
- Consist of 2 parts:
o Instruction part (opcode) tells the computer the operation to be
performed
o Address part specifies which memory address to be used

Assembly languages
- Perform the same tasks as machine languages, but use symbolic
names for opcodes and operands instead of 1s and 0s
- An assembly language program must be translated into a machine
language program before it can be executed (Assembler)

High level programming languages


- Create computer programs using instructions that are easier to
understand
- Must be translated into a low level language by a compiler
- Allow programmers to write instructions like English sentences and
commonly used mathematical notations
- Each line: a statement

Application and system software


- Two types of computer programs
- Application software: programs written to perform particular tasks
required by the user
- System software:
o Programs that must be available for any computer system to
operate
o MS-DOS, MS WINDOWS…
o Multitasking systems allow user to run multiple programs
o Language translators are system software

The C Programming Language


- 1970s, Dennis Ritche and Brian Kernighan designed C at Bell
Laboratories
- Used exclusively on UNIX and mini-computers
- 1980s, C compilers were written for other platforms including PCs
- 1989, ANSI created a standard version of C: ANSI C (American
National Standards Institute)
- Main benefit: closer to assembly language
- Programs in C run faster and more efficiently than other languages

The C++ Programming Language


- 1985, Bjarne Stroustrup created C++ based on C at Bell Labs
- C++ is an extension of C, adding OOP capabilities
- Most popular programming language for writing programs on
Windows and Mac
- Standardized C++: ANSI C++
- Runtime libraries: contains useful functions, variables, constants…
- ANSI C++ runtime library is called Standard Template Library or
Standard C++ Library

Structured Programming
- 1960s, many large software encountered severe difficulties
- Software schedules were late, costs exceeded budgets, products were
unreliable
- Software development was more complex than expected
- Research activity -> Structured Programming
- Discipline approach, clearer, easier to test and debug, easier to
modify
- Pascal (Niklaus Wirth) in 1971

Object Oriented Programming (OOP)


- 1980s, another revolution: OOP
- Objects are reusable software components that model items in the
real world
- Much more productive
- OOP refers to the creation of reusable software objects that can be
easily incorporated into another program
- Object: programming code and data that can be treated as an
individual unit or component
- Data: information contained within variables, constants…
- Functions or methods: procedures associated with an object
- Properties or attributes: variables associated with an object

Problem solution and software development


Software engineering is concerned with creating readable, efficient,
reliable, maintainable programs and systems
Software development consists of 3 overlapping phases

- Development and Design


o Analyze the problem
▪ What the program must do
▪ Required outputs
▪ Needed inputs
o Develop a solution
▪ Develop an algorithm to solve the problem
o Code the solution
▪ Translating the algorithm into a computer program
o Test and correct the program
- Documentation
o Collecting critical documents during analysis, design, coding,
testing
o 5 documents for every program solution
▪ Program description
▪ Algorithm development and changes
▪ Well-commented program listing
▪ Sample test runs
▪ User’s manual
- Maintenance
o The ongoing correction of problems
o Revisions to meet changing needs
o Addition of new features

Algorithms
- You can describe an algorithm using a flowchart or pseudocode
- Who cares about flowcharts anyways, and pseudocode is just English

You might also like