Neelayam Prgrming
Neelayam Prgrming
TINKUNE, KATHMANDU
NEPAL
COURSE: PROGRAMMING
SECTION – A
SUBMITTED TO
MR. SHIVA POUDEL
Programming 2019
Contents
Introduction ......................................................................................................................................... 5
Algorithm ........................................................................................................................................... 5
Disadvantages: ................................................................................................................................... 6
Examples ............................................................................................................................................ 7
Pre-processor .................................................................................................................................... 34
Compiler ........................................................................................................................................... 34
Interpreter ......................................................................................................................................... 34
Assembler ......................................................................................................................................... 34
Linker ............................................................................................................................................... 34
Loader............................................................................................................................................... 35
Presentation .......................................................................................................................................... 35
Conclusion ........................................................................................................................................... 36
Introduction .......................................................................................................................................... 38
Characteristics ...................................................................................................................................... 38
Limitations ........................................................................................................................................... 38
Characteristics ...................................................................................................................................... 57
Limitation ............................................................................................................................................. 66
Event handler.................................................................................................................................... 67
Event Loops...................................................................................................................................... 67
Forms................................................................................................................................................ 67
Flexibility ......................................................................................................................................... 67
Syntax .................................................................................................................................................. 68
Program ................................................................................................................................................ 68
Output .................................................................................................................................................. 69
Interface ............................................................................................................................................ 69
Relationship between Procedural Programming, Object Oriented Programming and Event driven
Programming........................................................................................................................................ 72
Conclusion ........................................................................................................................................... 83
Introduction .......................................................................................................................................... 84
Products................................................................................................................................................ 91
Purchase ............................................................................................................................................... 92
............................................................................................................................................................ 121
Part 1
1. Present a mini research project both in the form of a report and as a presentation. You will
need to explain what an algorithm is, with examples of their use, comparing their efficiency
against brute forcing, and how it will relate to the application development process, down to
the implementation in a suitable language. Research could be conducted on your choice of
algorithms, including sorting and searching data or encryption/decryption,
compression/decompression.
INTRODUCTION
Every Program designing process have two phase. One include Problem solving phase while the
other include Implementation phase. Algorithm is one of that vocabulary which is decorated with
lots of steps and is taken as the major part of Problem-solving phase. Similarly, in Implementation
phase the ready algorithm is translated into programing language. In general, Algorithm means
something as innocuous as a recipe or a list of directions to a friend’s house. (Villasenor, n.d.). After
algorithm is written it’s time to write code. Code are the set of symbols for representing something.
Firstly, we need to be clear regarding execution of code. When our program has been written and
converted to machine language, we need to execute it in order to see the output while here execution
means the process by which a computer interprets our program or performs the instruction of our
program.
In this task I am going to describe about algorithm, its features, limitations and some examples. The
outline process for building an application is also shown. Choice of tools, design of the layout, data
dictionary, algorithm and flowchart for Chaudhary traders is also mentioned along with the steps
taken from writing code to execution which is shown below.
ALGORITHM
An algorithm is the set of sequence steps/Instruction which enables a program to perform specific
task. It can also be said as a schedule formed in order to have the work accomplished in efficient
manner so that none of the part of work to be done stay left out. It describes the exact steps needed
for the computers to solve a problem or reach the targeted destination. It can also be said as guidance
which guide the computer and it follow every time. Mean time it is also to be known that algorithm
does not mean a code. It is written simply in English language or whatever the programmer speaks.
Algorithm has its own pattern of writing. It starts with initial step ‘START’ and have its middle part
of problem solving and final step will be ‘END’.
Features of algorithm
There are many features of an algorithm. It includes step by step procedure to a given particular
problem which makes easy to understand the problem. It is easy to develop an algorithm since it
involve step by step method of proceeding. After the step is done it is also not that hard to convert it
into flowchart then into a computer program. As, every steps has its own logical sequence it is easy
to debug at every step. It is an effective method which can be expressed within a finite amount of
space and time and in a well-defined formal language for calculating.
Advantages:
The steps written in an algorithm is easy to understand. The problem can be identified easily by non-
computer person also. It is independent of other programming language. Since it is written in English
language it is understood by anyone. It has its own definite procedure.
Disadvantages:
Along with the features of algorithm it have its lots of limitations also. Every task in algorithm
involves step by step way of proceeding so it is not time worthy because lots of times we also have to
face complex task. Similarly the complex task are hard to describe in steps. The time when we need
to show the looping and branching statement for any task it is really complicated to meet the
scenario. After the formation of flowchart a simple ups and down on steps of algorithm makes hard
to make changes in flowchart. These are some of the limitations of algorithm.
Flowchart
A flowchart is a generic tool that can be adapted for a wide variety of purposes, and can be used to
describe various processes, such as. a manufacturing process, an administrative or service process, or a
project plan. (Anon., n.d.). It is the pictorial representation of the steps written in algorithm. It is easy
to understand. Lots of symbols are used while making flowchart. Some of them are described
below:-
Examples
Multiplication of two numbers:
Step 1 - Start
Step 3 - C A* B
Step 5 - Stop
Start
C A*B
Stop
To develop any applications a programmer must be well known about the software developing life
cycle. After that the further pre-requisites which is required is programming language, the proper
platform for programming, development environment and delivery environment. They all need to be
chosen according to the nature pf programs and considering the users demands for the required
application.
Planning
In order to initiate developing any software we all need to be well prepared on what task we are
going to work. After knowing goal we need to have proper planning and plotting so that our targeted
goal get new identification with good finishing. Here, the team defines the requirement of new
software, the cost and resources required. It also involves the risk involved and provides the backup
plans in case of these problem. In general, a software requirement specification document is created.
Analysis
After planning is done next step is analysis. On this phase the planned software is analyzed. Here the
document is made regarding the requirement during project through customer analysis and stake-
holders participation. So that during designing problems may not be created on the basis of
documentation and some important points may stay left out.
Designing
It is the important phase where the blueprint of required software is sketched considering views of all
responsible person to these project. In this phase of SDLC the software specification is turned into a
design plan called Design Specification. Here, the plan are reviewed, the stake holders provide
suggestions, feedback. Failure in this phase can lead to failure to all project so it must be done with
proper care.
Building/ Implementation
It is that phase where the developer creates what they are supposed to build. It involves the
development of software by generating all the actual codes. If the designing phase is done properly
then this steps involve least complication. But it depends upon the developer and their debugging
capacity.
Testing
In order to check whether the required software had been developed or not it is necessary to be tested
and also to ensure either it had encompassed all the user asked facility or not testing is done. Here,
the defect and deficiencies are tested. Those issues are fixed until the required product is ready to
use.
Maintenance
This is the last stage of developing an application. Here the regular updating and upgrading of the
software which is already in use is done. In order to stay sustainably the maintenance of software is
necessary. The software which is now useful to the user may not be useful after some years so in
order to fulfill the demand as per the circumstances asks maintenance is necessary.
Choice of tools
Lots of things are supposed to be taken under consideration while an application is thought to be
build. Platform is one of the first consideration. In order to build an application there must be
appropriate choice of tool or in other word IDE (integrated development environment). After the tool
has been selected language comes under second consideration. Java python, C, C++, C# and many
others are different types of language.
A) Customer
B) Product
C) Purchase
D) Purchase details
E) Sales
F) Sales details
G) Supplier
H) Users
By the use of visual studio IDE we had made the application required for inventory management
system. As per the scenario been provided to us we had prepared various forms which include
customer, supplier, product, purchase, sales, suppliers and users etc. The outer layout of the
applications is shown below,
Splash
Login
FrmMain
Customer
Products Users
Purchase Supplier
Sales
Data dictionary
Data Dictionary, a database containing data about all the databases composing a database system.
The content of the data dictionary may best be thought of as “data about the data”—that is,
descriptions of all of the other objects (files, programs, and so on) in the system. (Anon., n.d.). It is
the collection of descriptive form of data objects or items in a data model for the easiness of
programmers and other who require to refer it. It is advantageous as well.
While making the warehouse application, I have used the algorithm process. For developing every
form, there is the use of algorithm where are as follows:
1.Start
2.Input the username and password
3.Click login
4.If username or password is incorrect, display
“Invalid username or password” and go to second step.
5.If username and password is correct, Display FrmMain/dash board.
6.Stop
Click login
N Is provided
o credentialsC
orrect?
Yes
Stop
1. Start
2. Click cancel
3. Close login user form
4. Stop
Click cancel
Close login
user form
Stop
1. Start
2. Click create a new login user account
3. Display user form
4. Input UserId, UserName, UserAddress, UserTelephone, Password and Remarks
5. Click save
6. If validation true, Display the confirmation
i. If yes button clicked, display “Login successful”
ii. If no button clicked, load user entry form
Click login
N Is provided
o credentialsC
orrect?
Yes
Stop
1. start
2. click new
3. Input the data required
4. Click save
5. If validation true, Display the confirmation
iii. If yes button clicked, display “ saved successfully”
iv. If no button clicked, reset the data
Click new
Enter the
required data
Click save
N If validation Yes
Reset data o is true Display saved
successfully.
Els
e
Stop
1. Start
2. Double click in data to be updated in Data Grid View
3. Click update
4. Update the data required
5. Click save
6. If validation true, Display the confirmation
v. If yes button clicked, display “updated successfully”
vi. If no button clicked, reset the data
Else alert for valid data
7. Stop
Click update
Update the
required data
Click save
Yes
N If validation
Reset data is true Updated
o
successfully.
Els
e
Enter the valid data
Stop
1. Start
2. Input the id to be deleted
3. Click delete
4. If validation true, Display the confirmation
vii. If yes button clicked, display “deleted successfully”
viii. If no button clicked, reset the data
Else alert for valid data
5. Stop
Enter the Id to be
deleted
Click delete
Yes
N If validation
Reset data Deleted successfully.
o is true
Els
e
Enter the valid data
Stop
1. Start
2. Click reset
3. Clears the input which in going input in the form
4. Stop
Click reset
Stop
1. Start
2. Choose the data to be search in combo box
3. Click search
4. If validation true, Display the required information in Data Grid View
Else alert for valid data
5. Stop
Click Search
If the
Display the information
validation
in data grid view
is true
Else
Stop
In order to create a program, a developer first writes source code which defines how the program
will function. Small programs may only contain a few hundred lines of source code, while large
programs may contain hundreds of thousands of lines of source code. The source code must be
compiled into machine code in order to become and executable program. This compilation
process is referred to as compiler time process. A compile time error is a problem such as a
syntax error or missing file reference that prevents the program from successfully compiling. The
compiler produces compile time errors and usually indicates what line of the source code is
causing the problem.
A compiled program can be opened and run by a user. When an application is running it is called
run time. If a programs source code has already been compiled into an executable program it may
still have bugs that occur while the program is running. For instance include features that don’t
work, unexpected program behavior, or program crashes. These types of problem are called run
time errors since they occur at run time.
instruction of our program. For example we have written a program to print our name. Firstly, the
compiler will convert our source code to machine code and after that only your program will be
executed.
found and compile too. The users firstly write codes and edits the source code by the help of code
editor.
Pre-processor
Pre-processor falls during the time of building the programs. Which means it guides compiler to
perform pre-processing before the accomplishment of compilation. In C programming we write the
code #include<stdio.h> here ‘#include< >’ means the directive command for the pre-processor
where in the given gap we must write the header file. It is a program that process the source code
before it passes to the compiler. That’s why it is said that it is used during the time of building the
program since it comes before the execution of program.
Compiler
Suppose in a program we write a code #include<stdio.h> which is written in higher level language
(user-friendly language) but it’s impossible for computer to understand this language since it only
recognize the instruction given in low level language ( 1 & 0). So, compiler scans the entire program
and translates it into machine code. There is no certain or fixed compiler for every programming
language. The one who develop code also manage the compiler according to the necessary which
helps in compiling. In general compiler helps to translate the code written in high level language to
machine code language or low level language.
Interpreter
The role of compiler and interpreter is almost similar expect one feature. Compiler compiles all the
code at once and show the error if it is found then while interpreter interprets the code on each line
and show the error to the place where it have been found. It does not wait for the whole code to be
finished and to be interpreted. Moreover it converts high level language to machine understandable
form, executes the line and then proceed with the next line.
Assembler
There are three types of language generally in use which includes high level, low level and assemble
language. The program which converts the assembly language to machine level language is known
as assembler. So the time when programmer writes the program in assembly language then it is used
so that it can convert them into object code and no problem is created during execution.
Linker
Linker is the program which is used after the code has been transformed in the form of object code.
The required files and functions of the object code is linked by the help of linker so that it is prepared
as executable code. Linker gives error if the file or function that has to be linked does not exist. For
instance in the place of writing printf if we write print only then error is found since we do not have
any functions called print and so on.
Loader
After linker has completed its task of linking and preparing the final code its time of loader to work.
Loader is the part of operating system which is responsible for loading programs. It is the essential
stages in the process of starting a program since it places programs into memory and prepares for
execution. During loader also there is chances of having error. It is called run-time error.
Presentation
Conclusion
In this task I have described about algorithm, its features, limitations, outline process to develop any
software, examples of algorithm, Flowcharts of the form of application we build, data dictionary,
steps from coding to execution.
Part 2 The research and development team you work with have been tasked with further
investigation into how best to build more efficient, secure software. You have been asked to
look into programming paradigms and the advantages and disadvantages of using different
programming language approaches.
You will need to create a report covering findings from research into the characteristics of
different programming paradigms – procedural, object-orientated and event-driven
programming.
Your report should include an explanation of each paradigm, an analysis of suitable IDEs, and
an evaluation of source code that would be generated for an application.
Introduction
Procedural programming is a programming paradigm that uses a linear or top-down approach. It
relies on procedures or subroutines to perform computations. While Object oriented programming is
the style of programming which is connected with the thoughts of class, objects, and a few of other
idea related with this two like encapsulation, inheritance, and polymorphism. Also event driven
paradigm is the application which is intended to distinguish events as they happen, and after that
arrangement with them utilizing a proper event handling technique. All these programming language
to be executed proper platform is necessary which is known as IDE. It is the tool which is handled by
developer in order to build an application as per user demand. It has its lots of features which ensure
to support developer to build the targeted application.
Procedural Programming
Procedural programming is a program, which comprise of different information and modules.
(Anon., n.d.)Procedural programming is a programming paradigm that uses a linear or top-down
approach. It relies on procedures or subroutines to perform computations. It is the route used to show
how the programmer composes a program. It makes the program by stepwise process that guides the
application through directions.
Characteristics
Procedural programming focuses for the most part on function. The problem is partitioned into sub-
problems i.e. program is separated into a few littler projects called as function. While function shares
worldwide information. There is no security to information so it moves freely among the function.
Function transforms data from one form to another. It takes top-down approach.
Limitations
As there are such a significant number of procedural languages, a developer has a tendency to
need to be expert in a specific language in order to get work. A COBOL expert has an
alternate demographic to a 'C' specialist.
Should be exceptionally exact and learned about programming guidelines, thus a completely
repaired working project sets aside greater opportunity to assemble contrasted with fourth
generation language.
Not as productive as hand-made source code written in a low-level language.
Basic I/O
Array
File handling
Structure
Conditionals statement
Control structure
Functions
Pointer
String
B) Array:
Array is a variable, which can hold and handle more than one value at a specific time. It can
deal with many values and numbers in the single name and can access value by referring
index numbers. At the point when there is each item in an array it is known as components or
elements. Also, it is accessed by numerical file. It is a best practice to initialize an array to
zero or null while declaring, if we don’t assign any values to array.
C) File Handling:
File handling are frequently utilized excessively to read and compose the information from
text files. File input stream and file output stream classes are not prescribed to utilize on the
off chance that you need to read and compose the information data then these are called Byte
stream classes.
Function Description
D) Structure:
E) Conditionals:
Conditional are statement which modify the generally direct execution stream of a program
depending upon the result of expression, which test for the presence of a specific "condition".
It performs distinctive calculations or activities relying upon whether a programmer
determined boolean condition assesses to true or false. Conditional statement in C
programming language are if statement, if else statement, nested if else statement, switch
statement and ternary statement.
There are five types of conditional programming which are listed below:
1. If Statement.
2. If-else Statement.
3. If…else if….else (Ladder statement).
4. Nested if-else statement.
5. Switch statement.
If statement
It is a powerful decision making statement which is used to control the flow of execution of
statements. It allows the computer to evaluate the expression first and then depending on whether the
value of the expression is true or false it transfers the control to a particular statement.
If-else statement
It is the extended form of the simple if statement. If the test expression is true then the true block
statement immediately following if statement are executed otherwise the false block statement are
executed. Which means either true block or false- block will be executed not both.
Ladder statement
It is the other way of putting ifs together when multipath decisions are involved. A multipath
decision is a chain of ifs in which the statement associated with each else is an if. This construct is
also known as else if ladder.
When a series of decisions are involved we have to deal with multiple if.-else statement.
Depending upon the design of questions the statement executes whether the test expression is
true or false.
Switch statement
It is the statement which tests the value of a given variable against a list of case values and
when match is found a bock of statement associated with the case is executed.
(Balagurusamy, n.d.)
F) Control Structure:
Control structure is a block of developers which pick the heading to go in view of parameters
and dissect the factors. Initials parameters and conditions are known as preconditions. It is the
gaze of factors before inflowing the control structure. For example: looping. Loops provide a
way to repeat commands and control how many times they are repeated. C provides a number
of looping way. C provides a number of looping way like while loop, for loop and do while
loop.
2. While loop
3. Do…while loop
4. Nested loop
For loop
It is the entry controlled loop that provides a more concise loop control structure. The general
form of the for loop is
While loop
Do-while loop
This loop tests its given condition at the bottom of the loop. It’s almost like a while loop
expect one feature that it ensures to execute at least minimum one time, although the fact the
starting case of inner of while is initialized to be false. Its general form is
do
{
Body of the loop
}
While (test-conditions)
Nested loop
Nested loop is the loop found within a loop. There are three types of nested loop which are as
follows:
Nested for loop
Nested while loop
Nested do while loop
G) Function
It is a set of statements which carry out task together. C functions can be classified into two
categories namely library function and user-defined function. Main is an example of user-
defined function while printf and scanf belongs to the category of library functions. The main
distinction between these two types of function is that library functions are not required to be
written by us whereas a user-defined function has to be developed by the user at the time of
writing a program.
i) User-defined function
The function written by user is called user-defined function. There are two types of
user-defined functions.
Returning function
It is the data type of the value where the function returns.
Non-returning Function
It is the data type of the value of the function that doesn’t return.
H) Pointer
A pointer is a derived data type in C. It is built from one of the fundamental data types
available in C. Pointers contain memory addresses as their values. Since these memory
addresses are the location in the computer memory where program instructions and data
are stored, pointers can be used to access and manipulate data stored in the memory.
I) String
A string is a sequence of characters that is treated as single data item. Any group of
characters (except double quote sign) defined between double-quotation marks is a string
constant. Characters string are often used to build meaningful and readable programs the
common operations performed on character strings include:
Reading and writing strings
Combining strings together
Copying one string to another
Features
Object oriented programs focuses on information as opposed to technique. The programs are divided
into elements known as objects. The data structure are composed to portray objects. The function
that work on data of an object are tied together in data structures. The data is covered up and can’t be
accessed by outer or external function. The objects communicate with each other through function.
New data and function can be added whenever it is needed. They follows base up configuration plan.
Class
Data encapsulation
Inheritance
Abstraction
Polymorphism
Object
Characteristics
The Objects Oriented programming language supports all of the components of ordinary
programming language. Likewise, it supports some critical ideas and wording which has made it
prominent among programming strategy.
A) Class:
Lots of languages offers primitive data types like int, long and float. Their data
representation and response to arithmetic, assignment and relational operators are defined
as the part of the language. However the language does not know user-defined data types.
The programmer defines its format and behavior by defining a class. A class can be
described as a set of similar objects. In different words, it's a well-known call for all
comparable items. A class is user-defined facts and behaves just like the integrated
B) Data Encapsulation:
In object oriented programming, binding of information and function into a single class type
variable is called encapsulation. The number of member data and member function relies
upon the needs. The protection of the information from direct access by the program is the
way toward hiding figures or data.
C) Inheritance
(Rouse, 2005) In object-oriented programming, inheritance is the idea that when a class of
object is characterized, any subclass that is characterized can acquire the meanings of at least
one or more general classes. This implies for the programmer that a object in a subclass
require not convey its own particular meaning of information and methods that are generic to
the class (or classes) of which it is a part. This not just accelerates program improvement; it
additionally guarantees an inherent validity to the characterized subclass object. There are
different types of inheritance like single inheritance, multiple inheritance, multilevel
inheritance, hierarchical inheritance and hybrid inheritance.
1. Single Inheritance
In this type of inheritance one derived class inherits from only one base class. It is the most
simplest form of Inheritance.
2. Multiple Inheritance
In this type of inheritance a single derived class may inherit from two or more than two base
classes.
3. Hierarchical Inheritance
In this type of inheritance, multiple derived classes inherits from a single base class
4. Multilevel Inheritance
In this type of inheritance the derived class inherits from a class, which in turn inherits from
some other class. The Super class for one, is sub class for the other.
D) Abstraction
Abstraction is an idea which encourages to extract out the basic data of an object. In OOP,
Abstraction Facilitates the simple conceptualization of real world objects into the software
program. It is the best approach to speak to the information in an applied level without any
details.
E) Polymorphism
The expression "poly" implies many and "morphs" implies forms. It relates various objects
using a similar technique and plays out the task. In this way, it has brought the element of
reusability. Real life example of polymorphism, a person at a same time can have different
characteristic. Like a man at a same time is a father, a husband, a employee. So a same person
posses have different behavior in different situations. This is called polymorphism. Function
F) Object
They are the basic unit of object-oriented programming. They are identified by its unique
name. An object represents a particular instance of a class. There can be more than one
instance of an object. Each instance of an object can hold its own relevant data.
Limitation
Object oriented programming are slower than other programming programs because of its
size. Increasingly the size the speed of the projects isn't run rapidly so that program requests
more system so run the system quicker.
It requires a lot of effort to create object-oriented program which is large in size because
programmer should spend more time in writing code.
Event Loops
Event loops are the program which are incorporated with the environment. It continues
testing to distinguish in the case of anything occurs in the program.
Time driven
Event driven programming, time driven is a paradigm, it's a code that keeps running on a
period trigger, time driven can be a particular code that keeps running on a particular time,
which could be once per hour, once per week or once every month, this implies it's a pre-set
to do task. For example, windows refresh is the case of time driven, which user can set when
to refresh or when to check and download the refresh.
Forms
Form contains all the different controls which the user permits to interface with the program
in different courses for example buttons, boxes and menus.
Flexibility
Flexibility, in each protest it has a decent selection of occasions in which the program can
react to. Programmers have control over place code and begin it.
Abstract class are the class designed to b used as base class. It is a base class which cannot b
instantiated. In other words, you can create object of the class. A pure virtual function can be
declared by using a pure specifier (=0) in the declaration of a virtual member function in the class
declaration.
Syntax
class AB {
public:
virtual void f() = 0;
};
Program
#include <iostream>
// Base class
class Shape {
public:
void setWidth(int w) {
width = w;
void setHeight(int h) {
height = h;
protected:
int width;
int height;
};
// Derived classes
public:
int getArea() {
};
public:
int getArea() {
};
int main(void) {
Rectangle Rect;
Triangle Tri;
Rect.setWidth(5);
Rect.setHeight(7);
cout << "Total Rectangle area: " << Rect.getArea() << endl;
Tri.setWidth(5);
Tri.setHeight(7);
cout << "Total Triangle area: " << Tri.getArea() << endl;
return 0;
Output
Total Rectangle area: 35
Total Triangle area: 17
Interface
Interface is the signatures of various properties, indexers, methods and activities which are used as a
class and structure.
Generics
Generics ensure the process to outline safest data types systems without displaying the real data
types. It helps to provide higher quality of code.
Delegates
Delegates are the principle of event driven which holds references to strategies with a particular
parameter list and return type.
objects and data fields, approach bottom-up based forming the attributes and codes in a single unit.
Event-driven programming works on the occurrence of the event which the event handler specifies
what to do after the event has occurred. All three-programming paradigm is orthogonal, which means
they all can be used all together. In procedural programming, it is just the bunch of instructions,
where as in OOP, it is some blocks of code defined to do the certain task. In event-driven
programming paradigm, it is also the blocks of code to do something after the event occurs. In
procedural programming, functions are given more priority but data are given more priority in OOP
paradigm. Unlike other paradigm, OOP needs deeper understanding before implementing it and even
though it is complex to under, it makes complex problem easier. But, in event-driven programming,
it is easy to implement this paradigm unlike the other paradigm and can be easily tracked the flow of
control. Procedural programming is only useful in back-end programming, event-driven in only
front-end programming or GUI designing but object-oriented programming paradigm is useful for
both front-end as well as back-end programming.
Introduction to IDE
IDE is the software or tools where the program written on algorithm form is applied. While saying so
it does not mean algorithm is mandatory in order to write any program on IDE. IDE has been really
fruitful for every developer or programmer since they do not require several tools for writing a single
program. Without IDE a developer must deploy, integrate, select and manage all the tools separately.
In general it is the platform where the design for building an application and its coding is done in one
place. While coding or writing any program on IDE it’s somehow obvious to face the problem of
bug.
Microsoft Visual Studio is a suite of devices for making programming, from the planning stage
through UI design, coding, testing, troubleshooting, analyzing code quality and execution, conveying
to clients, and gathering telemetry on utilization. These tools are designed to cooperate as
consistently as could reasonably be expected, and are altogether exposed through the Visual Studio
Integrated Development Environment (IDE).
You can utilize Visual Studio to make numerous type of application, from basic store applications
and games for versatile customers, to extensive, complex frameworks that power enterprises and data
center. You can make applications and games that run on Windows, as well as Android and iOS,
sites and web service based on ASP.NET, JQuery, AngularJS, and other prevalent systems,
applications for stages and gadgets as various as Azure, Office, Share point, Hololens, Kinect, and
Internet of Things, to give some examples cases, diversions and designs serious applications for an
assortment of Windows devices, including Xbox, utilizing DirectX.
Advantages of IDE
The tools and features available here are supposed to help to organize resources,
prevent mistakes and provide shortcuts.
It enforces company project and standards.
It is good in project management.
Disadvantages of IDE
Text Box
A Text Box control is utilized to show, or acknowledge as input, a single line of
content. This control has extra usefulness that isn't found in the standard Windows
text box control, including multiline altering and password character masking. A text
box is utilized to show text on a form or to get client input while a C# program is
running. In a text box, a user can type data.
Button
A button is a control, which is an intelligent segment that empowers users and
application to communicate with each other.
Group Box
In a Group Box different controls can be placed. When outlining user interface in
Windows Forms, you can utilize this control to make a square shape where you can
put different controls.
Combo Box
C# controls are situated in the Toolbox of the Visual Studio which are utilize to make
objects on form. A Combo Box shows a content box joined with a List Box, which
empowers the user to choose things from the list or enter a new value.
Label
Labels are C# control which are used frequently. We can utilize the Label control to
show message in a set area on the page. Label controls can be utilized to add
descriptive text to a Form to provide the user with supportive data.
Roles of compiler
A compiler is a program that processes statements written in a specific programming
language and transforms them into machine language or "code" that a PC's processor uses. Its
not true that the computer understand code. The computer understands only machine code. A
few programs come in both 32-bit and 64-bit variants, and those utilizing a 32-bit working
framework can't run 64-bit programs. Compilers transform the code that the programmer
composes into machine code.
Debugging
Visual Studio gives an amazing debugging experience regardless of what language we utilize
– from C#/VB and C++, to JavaScript and Python, to XAML and HTML, every single
language has debugging support. Visual studio can debug code wherever our code runs from
launching a local Windows app on the desktop or in the Android emulator, to attaching a
remote Azure instance, iOS device, or gaming console; or to any web browser. We can debug
issues offline by using capabilities such as IntelliTrace and deep analysis of dump files.
The Visual Studio debugger gives us a chance to control execution, that is, choose precisely
where we need to stop every one of the strings in the process, and investigate state by then.
We can break all at any time, step over statement, steps into and out of functions, run to click,
edit and continue, and the widely adored, set breakpoints.
When we stop the application where you need it, Visual Studio offers numerous courses for
us to review the estimation of variable, to shape or check a theory. We can monitor a value
while venturing through our code; look at nearby variable and assess complex expression
without leaving the debugger.
Form Builder
Form is a platform for user to interact with an application. Control is an individual object
which is added to the form for allowing interaction. Controls like textbox, combobox, label
and so on are added to the form by using toolbox. Toolbox can be accessed by clicking on
the Toolbox tab to the left of the Visual Studio main window. Controls are dragged and
dropped in the required location. The positioning of form is maintained and size are adjusted.
In this way forms are made in Visual Studio2013.
Windows Console
Windows Console is one of the first Windows NT GUI apps, and is one of the oldest
Windows apps in general use. Windows console accept the inputs from keyboard, mouse,
touch, pen etc. It also translates input to relevant characters. Windows Console accept text
output from a connected Command-Line app or tool. It helps to update the display as
required, based on the received output like output text. Move the cursor, set text color etc. it
handles the system interaction like launching when requested, managing resources, resizing
like minimizing and maximizing and terminate when required.
External libraries
During program developing we may face lots of steps where the feature we want may not be
available. In order to avoid that case external libraries function is available on visual studio so
that developer may not lack any source of file. The example of collection of external libraries
is shown below:-
Conclusion
In this task I have described about procedural, object oriented and event driven paradigm. The
relationship and difference between them is also shown. Also I have analyze the common features
like visual studio tools, database connectivity options, options available in solution explorer and
debugging option.
Part 3
You are required to make use of appropriate structure, including headings, paragraphs,
subsections and illustrations as appropriate, and all work must be supported with research and
referenced using the Harvard referencing system. . As part of the application process they
senior management team want to see that you can implement algorithms using an IDE as
required.
You are asked to create a fully working, secure application that has been developed using an
IDE and adheres to coding standards.
1. Evidence of how the IDE was used to manage the development of your code.
3. An evaluation of the debugging process in the IDE used and how it helped with development.
Introduction
An algorithm is the set of instruction which is written step by step as per the scenario given. While
IDE is the software or tools where the program written on algorithm form is applied. While saying so
it does not mean algorithm is mandatory in order to write any program on IDE. IDE has been really
fruitful for every developer or programmer since they do not require several tools for writing a single
program. Without IDE a developer must deploy, integrate, select and manage all the tools separately.
In general it is the platform where the design for building an application and its coding is done in one
place. While coding or writing any program on IDE it’s somehow obvious to face the problem of
bug. Which can only be solved by debugging process so that the program written to build an
application is bugless. IDE also provides lots of debugging facilities like break points, call stack,
tracer etc. Debugging process really helps a lot for a developer to develop the secure and robust
applications. IDE provides coding standards while developer is writing a code so that they may be
able to do it clearly and figure out the bugs. The coding standard includes line spacing, syntax
coloring, indentation etc. Coding standard also plays the major role while working in team as well as
individually.
In this task I will show the design and snapshots of the code of the projects which we were given to
make for Chaudhary traders. The use of IDE to manage the development process of the program, the
explanation of debugging process with the debugging facilities provided by IDE, the role of
debugging process to develop more secure and robust applications along with the coding standard
Splash form
This is the first page which we get to see on our projects. It is alike as the cover page of the
application/project we made for Chaudhary traders.
i) Design view
Login
This is the second page we get to see on our project. In this form user are provided the
username and password so that authorized person can only have access to the application of
the project. It can also be said that for security purpose this page has been designed.
i) Design page
Main form
This forms discloses after the appropriate username and password has been provided by the
authorized person. It is also termed ads dashboard.
i) Design view
Customer
This is one of the form of our project. After we select customer form from dash board we can see this
page. The detail of customer like customer id Customer name, address, telephone etc. are included
on these form.
i) Design view
Customer Diary
i) Design view
Products
It is one of the form of the project where the detail related to product like product name, its selling
price, its cost price, amount fresh and damaged quantity etc. are shown.
i) Design view
Purchase
It is the other form of project where all the detail belonging to purchase and supplier are included.
i) Design view
Purchase details
i) Design view
Purchase report
i) Design view
Sales
On these form the sales id, customer id, quantity of product, date of sales, sales aret etc. are included
so that it can be easy to look the detail of all sold product.
i) Design view
Sales Details
i) Design view
Sales reports
i) Design view
Supplier
On these form the information about supplier id, their name, telephone number, address and remarks
are included.
i) Design view
Supplier Diary
i) Design view
Users
It is the form where the detail about users are kept.
i) Design view
Stock report
i) Design view
2. Graphics Design
Different types of forms can be made by using different tools. Toolbox are used to make
forms. Form are the container which allows users to interact with application. Then controls
are added to form and adjust their size and position. In this way form is created. Controls are
accessed from toolbox. Some controls that are used to make form are listed and explained
below briefly:
3) Code editor
In order to manage the numbers of code IDE has also designed the facilities as code editor
options to frame and manage the code systematically. It is used to edit the source code before the
execution of code is done. The editing facilities like changing fonts, formats, color etc. with
additional features like using different styles of writing as bold, italic etc. are very useful while
writing code and seems attractive as well. In the picture below we can see the role of code editor.
4) Auto completion
It helps us to finish the auto code completion. It is useful to complete the name of classes, methods
and keywords. It is available within the code editors. Code completion is also called as IntelliSense
which have more abilities. We can see on the picture below, here we are trying to write supplier and
on our just type of four letter supp we can see the list of extension methods for completion of our
code.
5) Compiler
Compiler compiles the higher level language into machine understandable language. The method of
converting from high-level to low-level language are called compilation. IDE provides this facilities
of compilation in order to make developer to easily access the development process of the program.
6) Debugger
Debugging is one of the most essential things which IDE access since it is obvious to have bugs
while writing the code. There are lots of ways to remove bugs or debugging process. Use of break
points, tracer, watch point etc. are helpful for debugging so that arisen bug may be solved.
7) External libraries
During program developing we may face lots of steps where the feature we want may not be
available. In order to avoid that case external libraries function is available on visual studio so that
developer may not lack any source of file. The example of collection of external libraries is shown
below:-
Debugging process
Debugging is the process of detecting and removing of existing and potential errors (also called as
‘bugs’) in a software code that can cause it to behave unexpectedly or crash (Anon., n.d.) There is a
bit of difference between bug and debug. When the code we wrote does not behave the way they are
supposes to work then it is claimed as having bug on it. Which generally means the program has
error or fault. Whereas debug means the methods to make the written code error less or trying to
remove the bugs found. Writing code has its simple form as well as it can be vast. It depends upon
the scenario for which we are writing codes. But the simple or vast nature of scenario do not
determine the error either to come or not. Error can come but it only rely how to solve it. It’s not like
we will never face the problem of error while coding there may be possibility of occurrence of error
or bug. The one who is coding also must have idea of debugging which can lead to the
accomplishment of application reaching the users demands.
Debugging
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a
computer program or a piece of electronic hardware, thus making it behave as expected. (Anon.,
n.d.) There are lots of steps involved for doing debugging of the programs or code. It ensures that no
any error and difficulties is faced by any representative who will be using these facility. Some of the
steps involved are described below:-
4) Prove analysis
After the error has been analyzed we have to prove the existence of error. If we are not able
to prove the existence of error to the place where we had suspected then debugging can be
worthless so the existence must be well proved.
5) Eliminating the Defect
After the defect is found, the reproducing, reducing, understanding and analyzing the bug
is done, now it is possibly to implement the fix to the program or an application. But we also
have to take care that the similar type of bug is not produced again an even if it occurs, the
problem should be properly traced and tracked. Also, we must learn form that problem and
the techniques procedures be properly considered and implemented if the bugs are likely to
appear again.
3) Call Stack
Through the help of call stack we can view the function or procedure calls that are currently
available on the stack. The Call Stack window shows the order in which methods and
functions are getting called. The call stack is a good way to examine and understand the
execution flow of an app.
4) Watch point
Watch point is one of the feature of debugging facilitated by IDE. We can use watch
windows and quick watch to watch variables and expressions. This windows are only
available during debugging session.
5) Tracer
It is the most important feature of debugging the programs or an application. It helps the
programmer to determine where and what is causing the error or bug in the program. With
the run time tracing feature provided by IDE, each call of the function can be traced with the
help of function’s trace identifier and also the value of operands which the functions are
applied to. During debugging process by the help of breakpoints, or setting the breakpoints,
tracing is easy to do as the complier includes enough information in the executable so that the
debugger can relate the source that a programmer wants to debug with machine code then the
debugger will do the rest.
6) Immediate window
It is one of the important way of doing debugging. In order to print variable values, to
evaluate the expressions etc.it is used.
In the above given picture we can observe and learn how the debugging process is done if bug is
appeared. The work of programmer would be really difficult if IDE would not have provide this
facility. So, there needs a proper selection of tool while they determine to build an application on
IDE. Since, IDE helps the developer debug their code accurately and efficiently. Most of the time
due to our speed level of coding or time limitation we may lose some necessary syntax while coding
which eventually makes us suffer lots of bugs while in lots of cases we also can see that the place
from where bug comes is not under our control. Looking my scenario where I have to work I have
also faced bugs problem while building an application which lead being failure of the application.
The example is shown below:-
So, this bug comes unknowingly in my code while developing an application. So, I used a
breakpoints feature provided by an IDE to debug my code. I put the breakpoint where I the bug is
likely to appear in my code. As there was no bug that appeared during the execution of the program.
The example is shown below.
Then I sifted the breakpoint to another line and another. Then the bug appeared in my code. So, the
bug appeared in my code again and executed. Now, looking between the different breakpoints I set to
detect the bug, finally I was able to detect the bug which was disturbing the execution of an
application which is shown below.
Since, the bug has been detected, now know what is causing the bug in the application. In this case, a
simple comma is creating the bug in my application. We can fix the bug now and we can see if the
program is working or not. Now, the application was fully working just by adding a comma as
shown below.
From the above process we know what was causing the bug in an application that made it to behave
in appropriately. Then, using the debugging option provided by the IDE, it got easier for me as a
developer to debug my application which was causing the error in the working of it. I debug the bug
as I found them, use it to see if it works. As it worked, I implemented the changes in my code. Now,
we know how the debugging tools available in the IDE works and how it helps the developer to fix
the bug that causes the disturbance in the working of an application. So, we can understand that the
debugging options and tools helps us to develop more robust application. Also, the security of the
application can be enhanced and it can be further improved if the bug is noted in the future and we
1) Syntax coloring
Syntax or code are the instruction which are written in higher level language. While writing
syntax on IDE the coding standard facility of syntax coloring is provided. So that it may be
easy to distinguish the parts of syntax and look attractive as well.
2) Bracket matching
Bracket matching is the other coding standard used on IDE. While writing code the use of
bracket is used several time. So without the use of coding standard like bracket matching
there comes lots of confusions for knowing which brackets belongs where. So it plays
effective role to bring clarity and easy to distinguish between codes.
3) Indentations
It is a gap or placement of the text or code farther to the right or left separating it from the
surrounding. The program followed by the use of indentation method make a code base. To
keep the code clean as well as to navigate between the codes and understand the flow of
program it is used. It helps to know the working method of loop and control structure etc.
4) Variable declarations
Variable declarations are also one of the coding standards that a programmer use. Using the
proper variable declarations method makes code looks good and it can be easily understood
by others if the look in your code. Messy and improper variable declarations is difficult to
understand as it is difficult to find out how the variable has been declared and where it has
been used. Unorganized declaration of variables can lead to confusion. Some of the proper
method of variable declarations is show below.
6) Zoom
Zoom also falls as the common characteristics of coding standard since this facility helps to
see the code written more clearly, mainly to the place where there is the more use of commas
and semi-colons.
7) Line wrapping
It is that features of coding standard which splits a single line into multiple lines to make it
easier to read. Normally in coding practice a line can be lengthy which cannot be viewed in
the same screen from beginning to end in the same screen as we may have to drag the panel
to view the whole line. So to avoid that we split a line into multiple lines.
8) Naming conventions
These rules are usually applied when creating text scripts for building software programs.
They ranges from capitalization and punctuation to adding symbols and identifiers to perfrom
certain functions. The naming convention I used while making my application are described
below:-
I) Camel Case: Camel Case is a naming convention in which the first letter of each word in a
compound word is capitalized. Example label Date, text Box Name etc.
II) Pascal case: Pascal case is a subset of Camel Case where the first letter is capitalized. That is,
user Account is a camel case and User Account is a Pascal case. The conventions of using these are
different. You use camel case for variables and Pascal case for Class names or Constructors.
Conclusion
In this I have shown the design and snapshots of the code of the projects which we were given to
make for Chaudhary traders inventory management system. The use of IDE to manage the
development process of the program, the explanation of debugging process with the debugging
facilities provided by IDE, the role of debugging process to develop more secure and robust
applications along with the coding standard available has been explained.
Bibliography
Anon., 2017. Computer Hope. [Online]
Available at: https://www.computerhope.com/jargon/e/event-driven-prog.htm
[Accessed 10 May 2018].