You are on page 1of 10

- Write a program that implements an algorithm using an IDE:

Explain the
debugging process and explain the debugging facilities available in
the IDE: -

Debugging process is the process in which the

developer finding and fixing errors that makes the program work incorrectly.
Debugging is done by developers using debugging tools.

Debugging facilities available in the IDE (VISUAL STUDIO 2019): -

Breakpoint: Breakpoint is used to Notify the debugger about the time to stop
and where to stop the program from running

Attaching the debugger: When press (F5) the Debugging start automatically

- Step over: Execute the code line by line, especially useful after the debugger
hits the breakpoint.

The command Step Over was abbreviated by pressing F10

Dialog box: press Ctrl+Alt+P o open the Attach to Process dialog box.

- Simply inspect variables: Simply display the data tip by hovering over the
variable to display its current value
- Step into: (F11) This is like Step over. The only difference is, if the current
highlights section is any methods call, the debugger will go inside the method.

- Step out: Relates that when you are debugging inside a method. If you press
the Shift – F11 within the current method, then the execution will complete the
execution of the method and will pause at the next line from where it called.

- Inspect variable: (Ctrl+ Alt+ V, L) It is the way in which the specified


variables are displayed in the local scope and executed

- The Autos (Ctrl+ Alt+ V, A) It is the function or method that is currently


implemented in displaying the variables used around the current line (the place
where the debugger was stopped), the languages of the variables displayed
differ, you can use the Watch window and Quick Watch window to view the
variables during the debug session, the difference between the watch window
and the Quick Watch window that the watch window It can display many
variables while the Quick Watch window displays one variable

Automatic fix: (Alt + Enter + Ctrl)

Outline the coding standard you have used in your code:

When viewing the code on the first occasion, you will think the code is complicated,
but it is very clear. Therefore, there are standards for coding that you used in writing
the code to understand how to write the code. Here I will show some examples of the
criteria used in writing the code and style used in writing.
• In Indentation and Bracket Placement: I used ANSI C++ Style

- Variable, Function and Class Names:

• Classes have Upper Camel Case

• Functions have Upper Camel Case


Use the IDE to manage the development process of the program:

The code editor for Visual Studio has been used Which contains an integrated
development environment I will explain here how the program development process
took place Using the basic parts:

1- The Editor
The editor provides an interactive environment for creating and editing C ++
source code. In addition to the usual facilities, such as cut and paste, which you
certainly already know, the editor also provides color bookmarks (hints) to
distinguish different language elements. The editor automatically recognizes
keywords (key) in C ++ and assigns a color to them as they are. Not only does this
make your code more readable, but it also provides a clear indication of errors in
the keys to these words. The source code file has the extension .cpp.

2- The compiler
The compiler converts the source code into the machine language, detects and
reports errors in the translation process. The translator can discover a wide range
of errors caused by incorrect or unrecognized program code.
3- Linking: link the compiled object codes with other object codes and the
library object codes.

4- Test and Execution

In the end, execution of the program by pressing Start debugging and it is done in the
CPU.
Evaluate how the debugging process can be used to help develop more secure,
robust applications:

The debugging process is the process of searching for the cause of the error and fixing
it, and there are a few methods through the testing process or through programmers,
the Developer can track the implementation of the program step by step by tracking
the value of the variables and stopping the execution. This helps in obtaining the exact
cause of the error. The Debugging process in working life may help develop his skill
as a developer. In my view, the error correction process is necessary and effective in
developing applications, but it is not a good way to rely on it. Providing strength and
security, the test method is better, but it is not possible to obtain security and strength
completely, better A way to gain strength and security is to provide programmers and
developers who know what they are doing.

Evaluate the use of an IDE for development of applications contrasted with not
using an IDE: -
By use of an IDE With not using an IDE
When using the IDE, your skill will be It may be an ideal solution from an
developed as a software developer as it educational point of view so that you
makes the development faster and cannot understand the steps of the
easier, which saves time and effort. It program execution process because it
offers a lot of tools and shortcuts. In will be a complex process without using
case of mistakes, the use of the IDE is the IDE.
better in terms of solving problems and Some situations that cannot be resolved
correcting errors with the IDE may require the expertise
It is a better solution for teamwork of the developer Expertise and
among team members so that you can competence play an important role
add notes, also contains ready-made It is better not to use the IDE if the
templates and libraries, you can see a developer plans to learn a new
result of execution. programming language.

Critically evaluate why a coding standard is necessary in a team as well as for


the individual:

The coding standards are a series of procedures that the developers follow and take a
different style and can be considered essential features of software development. The
coding standard works to ensure that all developers follow a specific method for the
project and this helps them to understand the code and maintain an appropriate
consistency among them, and the instructions must also be followed consistently. So
that they do not conflict with each other, the result of writing the code should suggest
that the developer is one person
The application of coding standards helps the team to detect problems faster or even
prevent them, which increases the efficiency of the project and reduces the risk of
failure if the code is complex, and there is a greater chance of error exposure. Taking
a specific coding standard helps to develop less complex code which leads to less
error.
If the project team follows a coding standard, this will generate a fixed code that is
easy for everyone to understand and can be modified by anyone at any time.
It is preferable to take a specific coding standard that is often used when most team
members add code comments while writing code.

Program code:
#include<iostream>
#include<string>
#include"flexi.h"

using namespace std;


// creating class
class BankAccount
{
public:
int accnum;
float bal = 0;
int nd = 0;
int nw = 0;
string name;
float checkfees = 0.0;

// Constructor: Accept arguments for the account number and the


balance.
BankAccount(int a, float x, string n) {
accnum = a;
bal = x;
name = n;
}
BankAccount(int b, float c)
{
accnum = b;
bal = c;
}
BankAccount(int a, string e)
{
accnum = a;
name = e;
}
int AcctNum() //function that does not accepts any arguments
and returns the account number

{
return accnum;
}
float Balance() // function that does not accepts any arguments
and returns the balance.
{
return bal;
}
void Deposit(float amount) // function that accepts an
argument for the amount of the deposit
{
bal = bal + amount;
nd++;
}
void withdraw(float withdraw_amount) // function that accepts an
argument for the amount of the withdrawal
{
if (bal > withdraw_amount)
{
bal = bal - withdraw_amount;
nw++;
}
else
{
cout << "\n\nSorry, the amount cannot be withdrawn
from account number: " << accnum << "\n" << endl;
}
}
void FlexiAccount(float bal) {

checkfees = .10 * bal;

}
void AcctDisplay() // function that does not accepts any
arguments and displays all the account details
{
cout << "The Account Number:" << accnum << endl;
cout << "The Balance:" << bal << endl;
cout << "Number of Deposits:" << nd << endl;
cout << "Number of Withdraw:" << nw << endl;
cout << "Name of Custmer:" << name << endl;
cout << "Monthly service fees: " << checkfees << "\n" <<
endl;

}
};

// The Main Function Of Program


int main() {
BankAccount a1(1, 2000, "Ali");
BankAccount a2(2, 1000, "Mohammed");
BankAccount a3(3, 650.50, "Ahmed");

a1.Deposit(350);
a2.withdraw(2000);
a3.Deposit(150);
a1.FlexiAccount(250);

a1.AcctDisplay();
a2.AcctDisplay();
a3.AcctDisplay();

system("pause");
return 0;
}
#define FLEXIACCOUNT_H
class FlexiAccount // child class holding the following
information about a “Flexi account”:

{
public:
float checkfees = 0.0;

FlexiAccount(float bal) {

checkfees = .10 * bal;

};

You might also like