WS 2 System Development Etudiant
WS 2 System Development Etudiant
Version Etudiant
1. REFERENCE 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
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:
GUIDE DU TUTEUR
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 😊