Mada za sehemu hiiDesigning of computer programsMada 3
- Demonstrating application tools and environment used in programming
- Constructing pseudo-code and flow charts
- Implementing basic computer programming
Application Tools and Environment Used in Programming
Programming requires special tools and an environment that allows you to write, test, and run your code. This topic teaches you how to use these tools effectively.
An operating system (OS) is the main software that connects users to computer hardware. Before you can write any program, the operating system must be running because it provides essential services:
- Loading and running applications – loads your program into memory and runs it
- Allocating memory and processor time – gives your program space to work and CPU time to execute
- Providing input and output facilities – lets your program read data from keyboard/mouse and display output on screen
- Managing files – saves and organizes your source code files
The operating system also provides hidden utility programs that help convert your code into something the computer can execute.
When you write a program, several hidden tools work behind the scenes to make it run:
| Utility | What It Does |
|---|---|
| Compiler | Translates high-level code (like C++) into machine code that the computer understands |
| Linker | Combines different parts of your code into one executable file |
| Loader | Loads the executable program into memory when you run it |
| Interpreter | Reads and executes code line-by-line (used by some languages) |
| Debugger | Helps you find and fix errors in your program |
| Assembler | Converts assembly language into machine code |

An IDE is a software package that combines all the tools you need to write, edit, compile, run, and debug programs in one place. Instead of using separate programs, an IDE brings everything together.
Common IDEs include:
- Visual Studio Code
- PyCharm
- IntelliJ
- Borland C++ (used in this course)
A code editor is part of an IDE that highlights keywords, colors different parts of your code, and helps you spot mistakes quickly.
Here are the steps to create and run a simple C++ program using Borland C++:
Step 1: Create a Console Application
- Click File → New → Text Editor
- Type your C++ source code
- Click File → Save as
- Enter a filename ending with
.cpp, for example:myprogram.cpp - Click OK
Step 2: Create a New Project
- Click File → New → Project
- Select EasyWin (.exe) from the list
- Change the project name (e.g.,
program1) - Change the drive from C: to G: or A: (C: is write-protected)
- Click OK
Step 3: Add Your File to the Project
- Right-click on the
.exefile in the Project box - Select Add Node
- Type the filename (e.g.,
myprogram.cpp) - Click OK
Step 4: Configure Directories
- Right-click on the
.exefile - Select Edit local options
- Set Intermediate and Final directories to a drive other than C: (D: or E:)
- Change include directory to
\n:\bc5\include - Change library directory to
\n:\bc5\lib - Click OK
Step 5: Compile Your Program
- Double-click on the
.exefile in the Project Box - If there are errors, fix them and repeat until compilation succeeds
Step 6: Run Your Program
- Right-click on the
.exefile - Select View → Run
#include <iostream.h>
void main()
{
int number;
cout << "Enter a number: ";
cin >> number;
cout << "You entered: " << number;
}
What happens when you compile and run this program:
- The compiler checks your code for syntax errors
- The linker combines necessary libraries
- The loader puts the program in memory
- The program runs, asks for input, and displays the result
| Error Message | Cause | How to Fix |
|---|---|---|
| Fatal error: unexpected end of file found | Missing a closing bracket } | Check that every { has a matching } |
| Error: newline in constant | Missing closing quote in cout | Make sure strings have opening and closing " |
| Error: illegal escape sequence | Wrong use of \n or \t | Use \n inside quotes, e.g., cout << "Hello\n"; |
| Syntax error | Mismatched parentheses () | Check all ( have matching ) |
| Insufficient Memory | Programs still running in background | Close all output windows |
| Program error: floating-point support not loaded | Using %f with an int variable | Use correct data types |
In Tanzania, shop owners and market vendors can use simple programs to track their sales and calculate profits. For example, a duka owner in Arusha could write a program to record items sold (like rice or cooking oil), automatically calculate the total in Tanzanian shillings, and generate a daily sales report — saving time and reducing calculation mistakes.
Jinsi utakavyotathminiwaTathmini ya mchakato · Tathmini ya matokeo · Tathmini ya maarifa
Tathmini ya mchakato
The student should be able to:
- Install and configureprogramming environments correctly.
- Navigate and utilize IDEs or code editors efficiently.
- Use debugging tools and techniques effectively.
Tathmini ya matokeo
Programming tools and environments are correctly set up and operational.
Tathmini ya maarifa
Methods used: The trainee should explain how to:
- Set up and configure development environments and tools.
- Utilize debugging tools to identify and resolve coding errors.
Principles: The student should explain the principle of:
- Efficient programming workflows using tools and environments.
- Version control and collaboration in software development.
- Code debugging and testing processes.
Theories: The trainee should explain: The trainee should explain:
- Software development lifecycle and the role of tools at different stages.
- The importance of integrated development environments (IDEs) in streamlining coding tasks.
Detailed knowledge about:
- Features and advantages of popular programming tools and environments.
- Common issues in tool setup and how to resolve them.
Swali
What is the main purpose of an Integrated Development Environment (IDE) in programming?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuulizaMajadiliano
Hakuna maswali bado