CpSc 146 : Introduction to Programming
Computing Hardware
- CPU
- CU
- alu
- Memory (RAM) - two stable states. About 1G now
- Data - strings, numbers, characters encoded as bits
- Program
- Memory byte is never empty!
- Each byte has an address
- volatile
- Storage Devices
- Disks
- CDs (700 MB), DVDs (4.7GB)
- Tape drives
- USB Flash drives
- I/O Devices
- Keyboard
- Mouse
- Monitor
- Communication Devices
- 10BaseT NIC card transfers data at 10 mbps (million bits per sec)
C++ originated from C
Software
- Application Software
- Systems Software
Creating Software : Programming
- Machine Language
- Assembly Languages - machine dependent
- High-level Languages
- Cobol
- Fortran
- Basic
- Pascal
- Ada
- C
- Java - syntax is similar to C++. Object-oriented language.
- C# - subset of C++ and similar to Java
- Javascript
- C++ - object oriented language based on C
Operating Systems
- Controlling and monitoring system activities
- Allocation and assigning system resources
- Scheduling operations
Programming
- Variables
- Input (cin)
- Processing(x="hello")
- Output (cout)
- Source code
- made up of statments - a complete instruction
- lines - readability, usually one statement per line
- Object code
- Executable code
- IDE
History of C++
- C is a procedural language
- C++ built onto C and is an object-oriented language
Simple Program
#include <iostream>
using namespace std;
int main()
{
- cout << "Welcome to C++";
- return 0;
}