Lecture 2 Flashcards
C-based Languages
C++ includes all the features of C, but adds classes and other features to support object-oriented programming
- 1983: C-with-classes redesigned into C++
- 1985: C++ compilers made available
- 1989: ANSI/ISO C++ standardization starts
- 1999: ANSI/ISO C++ standard approved
- Hence the c99 compiler you will use later
The need for abstraction
Abstraction involves determining the “least-common denominator” held in common by sets of data/object or functionality/method within a program.
- can be re-used
- can be shared
- can be extended
Strengths of C/C++
Portable: usually does not requires a significant change when the C/C++ programs are ported to different machines (ranging from super-computer to embedded systems)
- C compilers are small and easy to be included in any application development environment
Powerful: has a large collections of data types/classes and operators/methods.
Flexible: C imposes very few restrictions on the use of its features
Standard Library: almost universal
Integrated well with all existing platforms: including Microsoft C/C++, and popular UNIX variant (known as Linux and Android) and MacOS (and hence the iOS)
Effective use of C++
- Use software tools (debuggers, etc.) to make programs more reliable.
- Take advantages of existing code libraries.Adopt a sensible set of coding conventions.
- Avoid “tricks” and overly-complex codes.
- Stick to the standards (to maximize the portability).
Software engineering
The term software engineering refers to the study of software development on large scales.
Waterfall model
- Marketing
- Analysis
- Design
- Implementation
- Testing
- Maintenance
Known software catastrophes
First flight of ESA Ariane 5: Self-desctructed due to arithmetic overflow exception
1999 - Mars Climate Orbiter: wrong units
1999 - Mars Polar Lander: engine cutoff too early due to bug
2004 - Mars Rover: too many files opened
2006 - Mars Global Surveyor: battery failure to due bug
Necessary skills
- Prior programming experience
- Willingness to work in groups
- Ability to tolerate frustration
- Ability to see both the big picture and local, detailed specifics