0% found this document useful (0 votes)
15 views7 pages

GENFC401 - Syllabus LO 1

The document outlines the competencies and performance criteria for applying C++ programming concepts, including basic programming, object-oriented programming, and CPU optimization. It provides an overview of C++, its features, applications, tools, and the installation of development environments. Additionally, it includes a simple C++ program example and explanations of its components.

Uploaded by

benitnishimwe1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

GENFC401 - Syllabus LO 1

The document outlines the competencies and performance criteria for applying C++ programming concepts, including basic programming, object-oriented programming, and CPU optimization. It provides an overview of C++, its features, applications, tools, and the installation of development environments. Additionally, it includes a simple C++ program example and explanations of its components.

Uploaded by

benitnishimwe1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Element of competence Performance criteria

1. Apply basics C++ concepts 1.1 Development Environment is prepared properly


based on C++ programming standards
1.2 Variables are properly applied based on
programming rules and guidelines
1.3 Operators are properly applied based on
programming rules and semantics defined
1.4 Control structure are properly applied based on the
specific rules and syntax defined
1.5 Functions are correctly applied based on task to be
done
1.6 Arrays are properly applied based on
programming rules and conventions
2. Apply OOP concepts

KAVUMU TSS L4 CSA 2023-2024


2.1 Class and object are properly applied based on the
principles of object-oriented programming
2.2 Inheritance and polymorphism are properly
applied based on the rules and principles of object-
oriented programming
2.3 Namespaces are properly applied based on the
rules and conventions
2.4 Errors and Exceptions are effectively handled
according to the rules and practices of error handling
3. Perform CPU optimization 3.1. Pointers are properly applied based on
programming rules and specific concepts of pointer
manipulations
3.2. File handling are properly applied based on the
rules and concepts of file Input/ Output

3.3. Multithreading and concurrency are effectively


applied based on the computer performance needed
3.4 Inline-assembly is appropriately applied based on
processor control of hardware architecture

Learning outcome 1- Apply basic C++ concepts


1.1 Preparation of development environment

 Introduction to C++ programming


Definition
C++ is an object-oriented programming (OOP) language that is viewed by many as the best
language for creating large-scale applications. C++ is a superset of the C language. C++ was
developed by Bjarne Stroustrup in 1979, as an extension to the C language. C++ gives
programmers a high level of control over system resources and memory.
Features of C++

KAVUMU TSS L4 CSA 2023-2024


C++ is a general-purpose programming language that was developed as an enhancement of the
C language to include an object-oriented paradigm. It is an imperative and compiled language.
C++ has a number of features, including:
 Object-Oriented Programming
 Machine Independent
 Simple
 High-Level Language
 Popular
 Case-sensitive
 Compiler Based
 Dynamic Memory Allocation
 Memory Management
 Multi-threading
Applications of C++
 Operating Systems
C++ is a fast and strongly-typed programming language which makes it an ideal choice for
developing operating systems. Mac OS X has large amounts written in C++. Most of the
software from Microsoft like Windows, Microsoft Office, IDE Visual Studio, and Internet
Explorer are also written in C++.
 Games
Since C++ is closer to hardware, game development companies use it as their primary choice to
develop gaming systems. It can easily manipulate resources and can override the complexities
of 3D games and multiplayer networking.
 GUI Based Applications
C++ is also used to develop GUI-based and desktop applications. Most of the applications from
Adobe such as Photoshop, Illustrator, etc. are developed using C++.
 Web Browsers
Web browsers need to be fast in execution as people do not like to wait for their web pages to
be loaded. This is why most browsers are developed in C++ for rendering purposes. Mozilla
Firefox is completely developed from C++. Google applications like Chrome and Google File
System are partly written in C++.
 Embedded Systems
Various embedded systems that require the program to be closer to hardware such as
smartwatches, medical equipment systems are developed in C++. It can provide a lot of low-
level function calls, unlike other high-level programming languages.

KAVUMU TSS L4 CSA 2023-2024


 Banking Applications
Since banking applications require concurrency, multi-threading, concurrency, and high
performance, C++ is the default choice of programming language. Infosys Finacle is a popular
banking application developed using C++.
 Compilers
The compilers of many programming languages are developed in C and C++. This is because
they are relatively lower-level when compared to other higher-level languages and are closer to
the hardware.
 Database Management Software
C++ is also used to write database management software. The world’s most popular open-
source database, MySQL, is written in C++.
 Cloud/Distributed Systems
Cloud storage systems that are used extensively need to work closer to the hardware. This makes
C++ the default choice for implementing cloud storage systems. These systems also require
multithreading support to build concurrent applications that support load tolerance, which C++
provides. Bloomberg is a distributed RDBMS application that is primarily written in C, but its
development environment and set of libraries are all written with C++.
 Libraries
Libraries require very high-level mathematical computations, performance, and speed. Hence
C++ is the core programming language used by most libraries. Tensorflow, one of the most
popularly used Machine Learning libraries uses C++ as its backend programming language.
 Switches
Because C++ is one of the fastest programming languages, it is widely used for programming
routers, telephone switches, and space probes.
 Advanced Computation and Graphics
Just like web browsers, all graphics applications require fast rendering. High-end graphical
processing, computer vision, or digital image processing software all use C++ as the backend
programming language.
 Description of C++ tools

 IDE
An integrated development environment (IDE) is a software application that helps programmers
develop software code efficiently. An IDE, or Integrated Development Environment, enables
programmers to consolidate the different aspects of writing a computer program.

KAVUMU TSS L4 CSA 2023-2024


IDEs increase programmer productivity by combining common activities of writing software
into a single application: editing source code, building executables, and debugging.
Examples of C++ IDE: Visual Studio, Eclipse, NetBeans, Code::Blocks, CLion, Xcode,
CodeLite, etc.
 Text editor
Editors are basically computer programs that are utilized to edit files on a computer. The provide
environment to a programmer to create, edit, update, format a document in any order he/she
wants to.
In system programming or programming, editors are software or tools that are used to edit the
program.
Examples: VS Code, Sublime Text, Atom, Brackets, Geany, Notepad++, etc.
 Compiler and interpreter
Compiler: A compiler is a computer program that transforms code written in a high-level
programming language into the machine code. It is a program which translates the human-
readable code to a language a computer processor understands (binary 1 and 0 bits).

Interpreter: In computing, interpreter is a program that can analyze and execute a program line
by line. In computer science, an interpreter is a computer program that directly executes, i.e.
performs instructions written in a programming or scripting language, without requiring them
previously to have been compiled into a machine language program.

Interpreter Compiler
Translates program one statement at a Scans the entire program and translates it as a
time. whole into machine code.

KAVUMU TSS L4 CSA 2023-2024


It takes less amount of time to analyze It takes large amount of time to analyze the
the source code but the overall execution source code but the overall execution time is
time is slower. comparatively faster.
Generates intermediate object code which
No intermediate object code is generated,
further requires linking, hence requires more
hence are memory efficient.
memory.
Continues translating the program until It generates the error message only after
the first error is met, in which case it scanning the whole program. Hence debugging
stops. Hence debugging is easy. is comparatively hard.
Programming language like Python, Programming language like C, C++ use
Ruby use interpreters. compilers.

 Debugging
Debugging is a methodical process of finding and reducing the number of bugs (or defects) in
a computer program, thus making it behave as originally expected.
 Version control
Version control, also known as revision control or source control, is the management of changes
to documents, computer programs, large websites, and other collections of information. Each
revision is associated with a timestamp and the person making the change.
 Tools installation

 IDE installation
 Compiler installation
 Setup environment variable path

 Test development environment


First C++ program
#include <iostream>
using namespace std;

int main() {
cout << "Hello World!";
return 0;
}
Explanation

KAVUMU TSS L4 CSA 2023-2024


Line 1: #include <iostream> is a header file library that lets us work with input and output
objects, such as cout (used in line 5). Header files add functionality to C++ programs.
Line 2: using namespace std means that we can use names for objects and variables from the
standard library.
Line 3: A blank line. C++ ignores white space. But we use it to make the code more readable.
Line 4: Another thing that always appear in a C++ program, is int main(). This is called a
function. Any code inside its curly brackets {} will be executed.
Line 5: cout (pronounced "see-out") is an object used together with the insertion operator (<<)
to output/print text. In our example it will output "Hello World!".
Note: Every C++ statement ends with a semicolon ;.
Note: The body of int main() could also been written as:
int main () { cout << "Hello World! "; return 0; }
Remember: The compiler ignores white spaces. However, multiple lines makes the code more
readable.
Line 6: return 0 ends the main function.
Line 7: Do not forget to add the closing curly bracket } to actually end the main function.

https://www.w3schools.com/cpp/cpp_intro.asp
https://www.techtarget.com/searchdatamanagement/definition/C
https://www.geeksforgeeks.org/features-of-cpp/
https://www.simplilearn.com/tutorials/cpp-tutorial/top-uses-of-c-plus-plus-programming
https://linuxhint.com/best_cpp_editors/
https://www.programiz.com/article/difference-compiler-interpreter

KAVUMU TSS L4 CSA 2023-2024

You might also like