0% found this document useful (0 votes)
12 views5 pages

WS 2 System Development Etudiant

The document outlines a workshop focused on system development using C++, detailing the objectives, steps for creating a programming environment, and instructions for developing a modular application called 'Converter application'. It includes guidance on setting up an IDE, compiling programs, and creating specific modules for temperature, mass-energy, and age conversions. The workshop emphasizes the use of top-down design and provides a structured approach to programming in C++.

Uploaded by

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

WS 2 System Development Etudiant

The document outlines a workshop focused on system development using C++, detailing the objectives, steps for creating a programming environment, and instructions for developing a modular application called 'Converter application'. It includes guidance on setting up an IDE, compiling programs, and creating specific modules for temperature, mass-energy, and age conversions. The workshop emphasizes the use of top-down design and provides a structured approach to programming in C++.

Uploaded by

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

Workshop 2/6 – System Development

Version Etudiant

1. REFERENCE DU PROSIT

Version Date Concepteurs Relecteurs Commentaire


1.0 07/07/2023 HO Création du prosit

2. OBJECTIFS DU PROSIT

Compétences Détails
Prosit – Element de la
Programmation
[CONNAISSANCE] - Know the different stages of the SDLC.
- Know the different levels of PSP.
- Know the different elements of PSP.
[APPLICATION] - Can install and use Dev C++ (or any other IDE)
- Can create header files and include them in a C++

GUIDE DU TUTEUR
program.
- Can apply PSP during application development.
[COMPREHENSION] - Identify the different deliverables at each stage of
the SDLC.
-Identify a methodology to use during development
of
an application

© UCAC-ICAM (Août 2023) Page 1 de 5


Workshop 2/6 – System Development
Version Etudiant
3. Objectives of the Workshop :
This workshop has two main objectives:
1) create a C++ programming environment
i. You may download and install Embarcadero Dev C++ or Codeblocks
ii. On your desktop create a folder called “C++ Projects”
iii. Writing a C++ program involves the following steps:
a) Write the C++ source code
- Type a new program in a text editor or edit an existing program and
store it on your hard drive with a name ending with the .cpp extension.
b) Compiling the program
- Compiling involves the following stages: preprocessing, compilation,
assembly, and linking.
● Preprocessing: Uses a processor directive (e.g # include) to include
external files before processing.
● Compilation: This second phase of the compiling process takes the
output of the preprocessor and the source code, and generates the
assembler source code (or assembly code).

GUIDE DU TUTEUR
Assembler checks syntax errors and report to the programmer
● Assembly: Here the program is translated into an equivalent
assembly language program and finally to actual machine instruction
(or object code).
● Linking: Here, the linker links the object code with the references to
functions defined in the standard libraries to generate the executable
code
● Loading: This is the last phase prior to program execution. The
loader transfers the executable file from the disk to the memory,
together with additional components from shared libraries that
support the program.
c) Running or Executing the program.
- The CPU executes each C statement sequentially.
- If the program requires any data from the user (input), the execution is
temporarily suspended for the input to be entered. Alternatively, the
program might simply wait for an event such as mouse click to occur
before it can continue.
- Results displayed by the program (output) appears in a command
window also known as the console output.
The above steps are summarized in the diagram below:

© UCAC-ICAM (Août 2023) Page 2 de 5


Workshop 2/6 – System Development
Version Etudiant

GUIDE DU TUTEUR

2) To create a modular application called “Converter application” following the top-down


design model.

To program C++ using VS Code follow the links below:


1) VS Code for C++
2) msys2 download

© UCAC-ICAM (Août 2023) Page 3 de 5


Workshop 2/6 – System Development
Version Etudiant

GUIDE DU TUTEUR
4. Create the modules (header files)
NOTE: I used Embarcadero Dev C++ to generate the code for the exercises. You can any IDE to
obtain the same result.
By the time of creation of this PROSIT, Dev C++ was at version 6.3, you may be using a higher
version by this time. However, the code will still run without any modifications.

A) Temperature module:
- Convert the temperature from degree celsius (°C) to degree fahrenheit (°F)
9
- Formula: F = C + 32, where F = temperature in Fahrenheit, C = temperature in Celsius
5
- Save this module as a temperature.h file in your “C++ Projects” folder created on your
desktop

B) Mass-Energy module:
- Convert mass to energy
- Formula: E = mc 2, where E= energy in joules(J), m = mass in kilogram(kg), and c = speed
of light in air (m/ s2)
- Save this module as energy.h in your “C++ Projects” folder

C) Age module:
- Converts your age into seconds
- Formula: sec = age(years) x 365(days) x 24(hours) x 60(min) x 60(s)
= age(years) x 31 536 000, where age = your age in years, sec = your age in
Seconds. Let k = 31 536 000 be a constant. Hence,
sec = age x k
- Save this module as age.h in your “C++ Projects” folder
Note: You can use the skeleton source code provided in the resources.
© UCAC-ICAM (Août 2023) Page 4 de 5
Workshop 2/6 – System Development
Version Etudiant
5. Create the application which will include all the various modules
Note:
Create a menu application which will prompt the user to select the type of converter to use.
Hint: Use a switch construct to create your menu.
Example of menu:

GUIDE DU TUTEUR
1)
2)
Include all header files:
Define the main() function:
Fig 1.1

3) Use the switch construct in the main() function to design your menu
4) Compile and run the converter.cpp application 😊

© UCAC-ICAM (Août 2023) Page 5 de 5

You might also like