Programming Assignment
Programming Assignment
Contents:
1. Introduction to algorithm
2. Features of algorithm
3. Advantages of algorithm
4. Disadvantages of algorithm
5. Basic example of algorithm with flowchart
6. Outline process
7. Development environment
8. Software that I prefer for design an application
9. Programming language
10. Platform environment
11. Architecture design of inventory management system
12. Data dictionary
13. Algorithm and flowchart of inventory management system
14. Step taken from writing code to execution
15. Implementation of algorithm
16. Implementation of algorithm in IDE
17. Relationship between algorithm and code variant
18. Suitability of language
19. Limitation of language
20. Conclusion
Introduction to Algorithm:
Suppose computers were infinitely rapid and computer memory was free. Would you have any
reason to take a look at algorithms? The answer is sure, if for no other reason than that you would
still like to demonstrate that your solution method terminates and does so with the correct answer.
So, Algorithm is the step by step representation of program written in simple language just to
understand how the program actually work. They are generally created independent of underlying
language, i.e. it can be implemented in more than one programming language. The concept of
algorithm has existed for centuries.
Features of Algorithm:
• Input /Output
Algorithm must have 0 or more well-defined inputs. Some algorithm may not take any input
but also algorithm can take 0 or more input. Similarly, it must generate at list one output like
a function algorithm must generate some result. Otherwise no use of making algorithm.
• Definiteness
Every instruction should be unambiguous and it should have clear and exact meaning. We
can’t write statement which can’t understand and which have no meaning.
• Finiteness
The duration of algorithm must be finite. Algorithm should always terminate after certain
steps like a function.
• Independent
Algorithm should have step by step direction which should be independent to any other
programming code.
Advantages of Algorithm:
➢ Easily written and Easy to understand
Algorithm is written in simple language without using code and it is not dependent in any
language. So, it can be easily written and easy to understood anyone even without
programming knowledge.
Every step in an algorithm has its own logical sequence. So, it is easy to debug. By using
algorithm, the problem is broken down into smaller pieces or steps hence, it is easier for
programmer to convert it into an actual program.
➢ Less error
When we write a program, if it is based on a correct algorithm, it has less error or no error.
So, with the help of this less reediting can be minimized.
While writing an algorithm we only concentrate on solving problem rather than syntax error
and code error. If we do program without algorithm, listing of problem might be appear one
after the other like syntax errors, code errors, query trouble and so on. So, it helps to
concentrate on problem only while writing algorithm.
Dis-advantages of Algorithm:
➢ Time Consuming
First writing algorithm and then converting it into flowchart and then finally writing program
or coding. It takes more time.
➢ Difficult to show big tasks, looping and branching because they are complicated to create.
➢ Virtualization
It is written in easy language without using any programming language. So, it is just a
virtualization of program, it mayn’t feature like actual program.
➢ Lack of clarity
Step 1 – Start
Step 5 – If (a > b)
Step 7 – Else
Step 9 – Stop
Outline process works by reducing the fee of software program while simultaneously improving
quality and shortening production time. Outline process achieves goals by following a plan that
removes an unsuspected difficulty of software development projects. That plan starts by evaluating
existing systems for deficiencies. Next, it defines the requirements of the new system. It then creates
the software through the stages of design, development, testing, and deployment which are describes
below:
• Planning
The purpose of the first phase is to consist a details steps from the beginning of the process to
until the end. The study of economical, technological and other problem while designing and
developing project or product. It also finds out the scope of the problem and determine
solutions resources costs, time, benefits and other items should be considered here.
The second phase is where getting input from all stakeholders, including customers,
salespeople, industry experts, and programmers. It’s also where system analysis takes place
or analyzing the needs of the end users to ensure the new system can meet their expectations.
Systems analysis is vital in determining what a business’s needs are, as well as how they can
be met, who will be responsible for individual pieces of the project, and what sort of timeline
should be expected.
• System Design
The third stage describes, in detail, including screen layouts, features and operations that will
satisfy the functional requirements of the proposed system. It clearly defines all the
architectural modules of the product along with its communication, entity relationship
diagram and data flow representation with the external the third modules (if any).
• Development3
Now the real work begins! The development stage marks the end of the initial section of the
process. Additionally, this stage signifies the start of the production by writing code for
product. Different high-level programming languages such as C, C++, C#, Java and PHP are
used for coding. The development stage also characterized by instillation and change.
This stage involves system integration and system testing (of programs and procedures)
normally carried out by a Quality Assurance (QA) professional to determine if the proposed
design meets the initial set of business goals. However, this stage refers to the testing stage of
the product where product defects are reported, tracked, fixed and retested, until the product
meets original specifications.
As soon as product is given to the customer, they will first do beta testing. If any changes
required or if any bugs are caught, then they will report to the engineering team. Once those
changes are made or bugs are fixed then the final deployment will happen.
Once when the customers start using the developed system then the actual problem comes up
and needs to solve from time to time. The process where the care is taken for the developed
product is called maintenance.
Development Environment:
A development environment is a group of strategies and tools for developing, checking out and
debugging an application or program. The development environment has three server tiers, called
development, staging and production. All three tiers together are normally referred to as the DSP.
▪ Development Server: Here the developer tests code and checks whether the application runs
Microsoft Visual Studio is an integrated development environment (IDE) product from Microsoft. It
is commonly used to develop computer programs, as well as websites, web apps and mobile apps.
An example of an IDE product is Microsoft’s Visual Studio .NET. This software uses Microsoft
software development platforms such as Windows form, Windows API, Windows Store and so on.
Visual Studio enable to write code accurately and efficiently without losing the current document
context. It guides with live assistance as write code, no matter what language is use, from C#/VB and
C++ to JavaScript and Python. It can easily zoom into details such as call structure, related functions,
check-ins, and test status. It can also identify, and fix code issues. It can produce both local and
managed code. It can create database connectivity to store data by using MySQL Workbench. So, I
have used Visual Studio to design application.
MySQL Workbench
MySQL is an open source software. As I said before it helps to create database connectivity to store
data. MySQL for Visual Studio provides entry to MySQL objects and data from Visual Studio. As a
Visual Studio package, MySQL for Visual Studio combine directly into Server Explorer providing
the ability to create a new connections and work with MySQL database objects. Here data can be
easily insert, update, retrieve and delete. PHP (Hypertext Preprocessor) is an open source software
and works fine with MySQL Server. It is a server-side scripting language that help to create dynamic
websites. What actually happens here is, the PHP code will be executed on the server and at the
browser side its HTML code will be displayed.
XAMPP
XAMPP is an open source free software developed by Apache friends. XAMPP software package
contains Apache distributions for Apache server, PHP, Perl etc. And it is normally a local host or a
local server. This local server works on desktop or laptop computer. It gives appropriate environment
for testing MYSQL, PHP, Apache and Perl projects on the local computer.
Programming Language:
A programming language is a special language programmer use to develop software programs that
implement specific algorithms. It is also a set of instructions for computers to execute. Computer
programming languages allow to provide instructions to a computer in a language the PC is familiar
with. There is an array of computer programming languages that programmers can use to
communicate with a computer just as many human-based languages exist. The part of the language
that a computer can understand is known as a “binary.” There are dozens of programming languages
used in the industry today. Some of them are Python, C, Java, C++, C#.NET, JavaScript, Swift and
so on.
However, there are many advantages of C# language but some are the important advantages of C#
language which are described here.
• Object-oriented
• Cross platform
.NET framework is most important requirement for C# programming. You have to install the
.NET framework to run application well.
In C# programming, a very efficient system installed that collect and erase rubbish
automatically present on the system. However, we called that C# language is very efficient in
managing the system because it doesn’t create a mess in the system, and the system doesn’t
get hanged during execution.
The major benefit of C# language is its strong memory backup. C# programming language
contains high memory backup in order that memory leakage problem and other such types of
problem isn’t always taking place because it occurs within the case of C++ language.
• Easy to development
C# language has a rich class of libraries that make many functions easy to be carried out The
C# programming language has a power on maximum of the programmers of the world and
has a record inside the programming world.
• Better integration
An application written in .NET will have could have higher integration and interpretability as
compared to other NET Technologies. Actually, C# programming runs on CLR which
making it easy to integrate with components written in other languages.
• Cost-benefit
Protection cost is much less and is much secure to run in comparison to other language.
• Familiar syntax
It is pretty easy to pick up and work in productively with a working knowledge of languages
like C, C++, Java due to the fact its core syntax is much like C-style languages.
• Programming support
We can purchase assist from the Microsoft in C# programming. If any trouble happens, we
can clear up it with the help of Microsoft.
C# programming has features like Properties and Indexers which are not available in Java
language.
• Most powerful
point of view.
So, C# is a modern, type safe programming language, object-oriented language that allows
programmers to quick and without difficulty build solution for the Microsoft .NET platform. Due to
those benefits and features that I mention, I choose C# programming language with .NET
Framework to design and develop my project.
Platform Environment:
Platform environment is an environment where the development of piece of the application or
software is carried out. While developing a new desktop application for windows PCs, you have to
make sure which application platform are you going to use. All Windows application platforms let
you create desktop apps like Word, Excel, and Photoshop that run in the classic Windows desktop
and take full advantage of that environment's specific features.
UWP, WPF and Windows Forms are the platforms provide managed runtime environments (the
Windows Runtime for UWP, and.NET for Windows Forms and WPF) with many advantages,
especially inside the areas of productivity Customizable UI and application security. Among these I
used Windows Forms platform to design and develop inventory management system because it is
fast and secure for the .NET Framework. This is a forms-based, fast application development
platform with a large built-in collection of visual and non-visual drag-and-drop controls. Windows
Forms contains a variety of controls/tools like text boxes, buttons, radio buttons, data grid views to
display data from database, toolstrip and menu strip for toolbar and menus, picture box to add picture
etc. The .NET Framework introduces an infrastructure called Code Access Security that lets you
differentiate the permissions, that code has from the rights that the user has. While using Visual
Studio you can create a window forms smart client application that display data, request input from
user and communicate with remote computers over a network.
Data Dictionary:
A Data Dictionary is a group of names, definitions, and attributes about records elements which
might be being used or captured in a database, information system, or a part of a research project. A
Data Dictionary provides information about each attribute, of a data model. It is used by SQL Server
to execute queries. It is automatically updated when the objects are added, removed, or changed in
the database. An attribute is an area within the database that holds information. It helps to make
easier to analyze. Here, I have designed a data dictionary of Inventory Management System. It’s.
You can get detail information about each field name with their attributes, datatype, length,
constraint and description.
Login Module:
Step 1: Start
Step 6: Stop
Step 1: Start
Step 6: Stop
Step 1: Start
Step 6: Stop
In the computing, code generation is the process by which a complier’s code generator converts
source code into the form of 0 and 1 i.e. binary which can be executed by the system. System doesn’t
understand other language written by source except binary. So, to translate source code into machine
language generation process of code is used. And then system accept and execute the converted
code. After complication take place complied program is displayed in the screen in high level
language by take some space from memory. The process that take place while executing the program
is describes below:
o Editor
This is the environment where programmer write a code. Like Dev-cpp (for C, C++), Visual
Studio (for C#, python), Python (for python) and so on.
o Role of Pre-processor
The source code passed through the pre-processor produces a source code file with its
preprocessing commands and sorted out properly. Then it is finalized for the compiler and
goes for further processing. The main three roles of the preprocessor are: it performs as
comment remover. If there is comment code present in program, it removes comment code.
Then it also helps in execution process by replaces macro name with the code. Then finally it
includes header file in source code.
o Role of Complier
A complier is a program that reads a program which is written in high level language and
translates into an equivalent program in binary language. Scans the whole program and
translates it into machine code. Commonly, programmer writes program in a programming
language like java, pascal, python, C, C++, C# and so on. It helps in conversation with
machine and human by translating high level language to machine language. So, it plays role
like linker between computer and human. The translation process should also detect and
report the presence of errors in the sources program.
o Role of Interpreter
Interpreter perform line by line execution of the source code which is written in high level
language. Interpreter read code line by line, convert it into machine understandable from,
execute the line, and then proceeds with the next line. The main role of the interpreter is to
convert the source code directly and execute it.
o Role of Assembler
An assembler is a program that takes basic computer instruction which is written in assemble
language and converts them into the machine code which is direct understandable by system.
o Role of Linker
The linker links all the functions and files required by the object code and converts the object
code to executable code. The converted code is stored with a .exe extension. The linker gives
error if the file or function that has to be linked does not exist.
o Role of Loader
A loader is the part of operating system that is responsible for loading programs. It is one of
the essential stages in the process loader loads the executable files into main/primary memory
and prepares them for execution. In this stage it can also generate errors. These errors are
o Role of Memory
Loaded executable files take some space from the main/primary memory to display output
whenever programmer execute a program. Main memory is essentially the RAM (Read Only
Memory) of the PC, laptop, computer or any machine that you are running the code.
This is all about the code or program execution process. This document helps you to know the
background process of code execution or how the actual program works.
Implementation of an algorithm:
Algorithm is the step by step representation of program written in simple language just to understand
how the program actually works that helps to write the code and flowchart is the blueprint of the
program where we depend on to make the original. Both algorithm and flowchart help in coding in
logical way. It helps to understand the flow of program. It plays important role in deployment of the
application. Here you can see the connection between algorithm and code and the important role of
algorithm, flowchart and code that how I have used them to design the application.
Login Module:
Algorithm UI Design
Step1: Start
Step2: Run application
Step3: Enter email and password
Step4: Press the Sign-Up button
Step5: If the user is authorized then login
successful, go to dashboard
Else login unsuccessful, stay in login
Page
Step6: Stop
I have designed a User Interface for Login Form which is based on algorithm that you can see in
above table. At first, we have to run our application which provide us a Login Form. If we are
already an admin user of inventory management system, we have to enter email or username and
password which bring us to the dashboard Else we have to create an account and after becoming
admin user we can now Sign Up and move to dashboard. In case I have not used algorithm then I
never know how it works because algorithm help us to understand the flow of program of
application. It helped me during development process because each and every form of my
application I have applied algorithm. So, implementation of algorithm with IDE is very important.
Suitability of language:
I have been playing with .NET Core for six months now and have been very impressed with it. C#
language is the most powerful programming language for the .NET Framework and easy to learn.
And it is also one of the top five programming language among the world. The best thing about C# is
wide versatility of it that can be used for a wide variety of types of applications. Its protection cost is
much less and is much secure to run in comparison to other language. It is pretty easy to pick up and
work in productively with a working knowledge of languages like C, C++, Java due to the fact its
core syntax is much like C-style languages. I am not so much familiar with other programming
language than C#. So, even it has some limitation I find C# programming language is suitable.
Limitation of language:
Although C# is suitable it has some disadvantage. They are:
• C and C++ runs very much faster than C# because the compilation of codes goes two way,
from C# code to IL (intermediate language) then from IL to machine code.
• C# is less flexible than C++. C# depends on .NET framework, anything that is not found in
Conclusion:
Hence, this report describes about the algorithm along with their advantages, features, disadvantages,
uses and example. Also, this report tells about the important software, outline process, suitable
language, data dictionary, architecture design along with algorithm and flowchart of the project we
developed i.e. inventory management system. And this document shows that code variant and
algorithm are interrelated to each other.
Conclusion:
Hence, I have produced a report that describes about the algorithm along with their advantages,
features, disadvantages, uses and example. Also, this report tells about the important software,
outline process, suitable language, data dictionary, architecture design along with algorithm and
flowchart of the project we developed i.e. inventory management system. And this document shows
that code variant and algorithm are interrelated to each other. I have also presented a mini project
presentation on application development process that include algorithm, flowchart,
encryption/decryption, compression/decompression and outline process of software development.
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.
In this part, I am going to produce a report explaining about procedural, object oriented and event
driven paradigms along with some characteristics and the relationship between them. Here in this
report I will provide all the required details about of process of outline to be function while using or
building application. I will analyze the common features that a developer has access to in an IDE.
Furthermore, I will critically evaluate the source code of an application which implements the
programming paradigms, in terms of code structure and characteristics.
Report:
Student Name
Contents:
1. Procedural programming language
2. Basic I/O
3. Control Structure
4. Conditional structure
5. Structure and Union
6. File handling
7. Pointer
8. Array
9. Function
10. Object oriented programming
11. Class and Object
12. Data encapsulation
13. Inheritance and its type
14. Polymorphism
15. Abstraction
16. Delegates
17. Event driven programming
18. Relation between OOP, PPL and Event driven programming languages
19. Example of OOP, PPL and Event driven programming languages
20. .NET database connectivity
21. Evaluation of source code of application
22. Conclusion
Introduction:
Programming paradigm is a method to solve problem using some programming language.
Programming paradigms are a way to categorize programming languages based on their features.
Languages can be classified into multiple paradigms.
Basic I/O:
I/O stands for Input and Output in the system. Input is the user giving something to the program,
and output is the program giving something to the user. In programming, the most basic form of
input/output (I/O) is displaying some text to a user and allowing the user to enter some text back. For
example, let's say we wanted to write a simple calculating program where the user inputs two
number 3 and 5, and the system outputs the sum of those two number i.e. 8. In C programming, the
most basic function to output text to the screen is printf() and take user input typed on the keyboard
is scanf(). So, let's write a program in C that simply displays our sum of two number. We will use the
printf() function.
Conditional Structure:
Condition are those in which we can choose either this or another. Conditional statements help you
to make decision based on certain conditions. In programming there will also be condition like
during login account where if username and password given by users match to database, the user is
successfully logged else user is not logged in and permission is denied. These conditions are
specified by a set of conditional statements having Boolean expressions which are evaluated to a
Boolean value true or false. There are following types of conditional statements in C.
1. If statement
2. If-Else statement
3. If-Else-If statement
4. Switch
If-statement:
The “if” statement is used to execute a statement or a block of statement if the given condition is
true. If test expression is evaluated to true, statements inside the body of If will be executed and if
test expression is false than statements inside the body of If will be skipped. It is commonly used in
the scenario where we need to perform the different operations for different conditions. The syntax
of the if statement is given below:
Flowchart of if statement:
Here, I have written a program to find a number weather it is greater than 10 or not by using if
statement. There is condition a>10 so if the user inputs value of a is greater than 10, “a is greater”
will print.
I enter value of a is 11. Because it is greater than 10, program execute and print “11 is greater”.
If-Else statement:
The basic “if” statement can be extended by adding an “else” statement. This provides a second
choice of statement to be executed if the condition is false. If test expression is evaluated to true,
statements inside the body of If will be executed else statements inside the body of If will be skipped
and statements inside the body of else will be executed. The if-else statement is used to perform two
operations for a single condition. Here, the main point is that if and else block cannot be executed
simultaneously. Its general form is:
Here, I have written a program to find a number weather it is odd or even by using if-else statement.
If the user inputs number is divisible by 2 i.e. reminders come 0 when it is divided by 2, “enter
number is even” will be print. And if input number is not divisible by 2 than else code will be
execute and “enter number is odd” will be print.
When I enter 8, first it checks the condition weather it is true or false. As well all know 8 is divisible
by 2, condition become true than if code execute and print “8 is an even”.
The If-Else If ladder statement allows us to create a chain of else-if statements. It is used in the
scenario where there are multiple cases to be performed for different conditions. In If Else-If ladder
statement, if a condition is true then the statements defined in the if block will be executed, otherwise
if some other condition is true then the statements defined in the else-if block will be executed, at the
last if none of the condition is true then the statements of else block will be executed. There are many
else-if blocks possible. It is similar to the switch case statement where the default is executed instead
of else block if none of the cases is matched. The syntax of the if else-if ladder statement is given
below:
I have written a program to find the grade based on obtained marks in subjects by using If Else-If
ladder statement. If the user inputs mark is greater than 80 it will print “grade a”. Similarly, if mark
is greater than 70 and above 80 it will print “grade b” and this process will continue until get match
with any if or else if condition likewise in code. When it gets match it will print the statements
related to the condition and if it doesn’t get match with any condition than it will execute else
statement and print “invalid marks”.
As I already said above, when I enter 72 number as obtained mark it shows me “grade b”.
Switch:
A switch statement is used to select from multiple choices based on a condition or expression. The
expression must produce a result of type char int. Otherwise the statement will nit compile. It is an
alternate to if-else-if ladder statement which allows us to execute multiple operations for the different
possible value of a single values. The break statement is necessary to come out of the switch
statement after executing particular case. The default case is option and is executed when the
expression doesn’t evaluate to any of the case. The syntax of the if else-if ladder statement is given
below:
Flowchart of switch:
I have written a program to add, subtract and divide two number using switch. After you enter two
numbers, it will ask you for operator and when you give operator if operator gets match with any of
those cases it will execute related statement otherwise it will execute default and print “wrong input”.
I enter 6 and 8 number and I choose subtract operator. So, that it prints “-2” as a result. If I give any
others operator except those which I include in program, it will print “wrong input”.
Control Structure:
‘Control Instructions’ enable us to specify the order in which the various instructions in a program
are to be executed by the computer. In programming, “control structures” are the structures used to
alter the flow of execution of the program based on the given parameters. To make decision we need
to alter the program flow. In a program, we use control structures to make decisions and alter the
direction of program flow in one or the other path or paths available. Looping is the one of the useful
control structures.
Loops: A loop is used to execute a statement or block of statement repeatedly. The number of times
the statement or blocks of statements is executed and controlled by a condition and the loop executes
until that condition is satisfied. There are four loop statements:
1. For loop
2. While loop
3. Do…while loop
4. Nested loop
For Loop:
A for loop has 3 parts separated by semicolons (;). The first part, initialization, is executed before the
execution of loop starts. This is used to initialize a counter for the number of loop iterations.
Execution of the loop statements continuous as long as the condition, in second part is true. This
condition is checked at the beginning of each loop iteration. The altering expression is for increment
or decrement the loop counter. This is executed at the end of each loop, iteration.
Syntax:
While Loop:
Syntax:
Do…While Loop:
The do-while loop is called as an exit-control loop. In an exit-control loop, the statement or block of
statements are executed first. Then, the conditional expression is evaluated. If it is true, then the
block of statements is executed once again. This process continues as long as the conditional
expression is evaluated to true. When the conditional expression is evaluated to false, the control is
passed to the statement immediately after the while loop. The body of a do while loop is executed at
least once, because the program floe has to pass through the body of the loop before reaching the
conditional expression.
Syntax:
Nested Loops:
The loop which contains a loop inside another loop is known as the nested loop. When we " nest "
two loops, the outer loop takes control of the number of complete repetitions of the inner loop. It can
contain the for loop inside a for loop or a while loop inside a while loop. It is also possible that a
while loop can contain the for loop and vice-versa. The most commonly nested loops are For Loops.
Output:
Structure:
Structure is one of the user defined data type in C/C++ that allows to combine data items of different
kinds. It is used to represent a record. ‘struct’ keyword is used to create a structure. It contains
several named variables inside. Example: you want to store information about person: his/her name,
age and salary. You can create different variables name, age, salary to store this information
separately. if you need to store information of more than one person than you need to create different
variables for each information per person.
Syntax:
Example of Structure:
Union:
A union is a special data type that allows to store different data types in the same memory location.
To define a union, we must use the ‘union’ statement in the same way as we did while defining a
structure. We can define a union with many members, but only one member can contain a value at a
time. It is an efficient way of using the same memory location for multiple-purpose.
Syntax:
Example of Union:
File Handling:
A file is a storage area on the disk where a group of related data is stored, and that data is referenced
by a common name which is called as file-name. This process is called file handling. Data of file is
stored in secondary storage like hard disk, floppy disk etc. each file must have a unique name. the
data stored in a file is stored permanently and is non-volatile in nature. The four basic operations that
can be performed on a file are read, write, open and close.
Pointer:
Pointers is a variable that stores/holds the memory address of another variable. A Pointer is used to
allocate memory dynamically i.e. at run time.
General syntax:
The pointer variable might be belonging to any data type such as int, float, char, double and so on.
Here are some few examples:
The process of assigning address of a variable to a pointer variable is called Pointer Initialization.
Pointer variable can only store address of a variable of the same data type. In C language ‘&’
operator is used to determine the address of variable.
Example of pointer:
Function:
A function is a block of code that performs a specific task. During programming there are might
occur many situations where we might need to write same line of code for more than one. This may
lead to unnecessary repetition of code and becomes boring for the programmer. So, we can declare
and define a group of statements once in the form of a function and it can be called and used
whenever required. It is user defined functions. Types of function:
Return Function: A return function is a function which returns some value after the implementation
of the function. The return function is used when we pass user defined function.
Syntax:
Void Function: A void function are created and used just like return function except it doesn’t
returns any value after the implementation of the function. Instead of a data type, void functions use
the key ‘void’. It performs a task, and then control returns back to the caller but, it doesn’t return a
value.
Syntax:
Array:
An array is a collection of elements of similar data type referenced by a common variable name.
Example: we can define an array named ‘marks’ to represent the individual subject marks of a
student.
Declaration an array: we can declare an array by specifying its data-type, name and number of
elements that it can hold.
Syntax:
Types of array:
Single Dimensional Array: A single-dimensional array is the easiest form of an array that requires
only one subscript to access an array element.
Syntax:
Multi-Dimensional Array: A multi-dimensional array has more than one dimension. It is an array
of arrays, an array that has multiple levels. The simplest multi-dimensional array is two-dimensional
array. Two-dimensional array is also called a matrix, or a table of rows and columns.
Syntax:
Output of an example:
Limitation of OOP:
Some of the limitation of object-oriented programming are, solving a problem using OOP approach
takes more time than the time taken by structured programming approach. It requires intensive
testing procedures. Without proper design and planning, it is difficult to apply. It is inefficient and
can cause duplication.
Syntax:
Object is a variable of class type. It is an instance of a class. Any number of objects can be created
from a single class. When program is executed, objects communicate by sending message to one
another without knowing details of each other data or code.
Syntax:
Data Encapsulation:
Encapsulation is an OOP concept, which packs the data and the code that manipulates the data into a
single unit. It keeps the data safe from outside access and misuse. The implementation details of a
class are kept hidden from user so it is also known as data hiding. Only user can perform a restricted
set of operations on hidden class members by executing special functions called methods. In C++,
the basic of encapsulation is a “class”. Encapsulation will not have any syntax.
Syntax:
Types of Inheritance:
1. Single inheritance: A derived class with only one base class is called as single inheritance.
The derived class will have all the properties of base class along with its own members.
Syntax:
Syntax:
3. Multiple inheritance: A class can inherit the properties of two or more classes. This is called
multiple inheritance. The derived class then contains all properties of base classes and its own
members.
4. Hybrid inheritance: When more than one type of heritance is applied or used, then it is
called as hybrid inheritance.
Syntax:
5. Multipath inheritance: Class derived from two classes and those two base classes have one
common base class is called multipath inheritance.
Syntax:
6. Heirarchical inheritance: when multiple classes derived with same base class is called
Heirarchical inheritance.
Syntax:
Example of inheritance:
Polymorphism:
Polymorphism is a Greek word which means “taking many forms”. It means different objects
respond differently to the same message. It is the ability of a message to be displayed in more than
one form. Example: A man at a same time can have different behavior. Same as a man at a same time
is a father, a husband, an employee. So, same man has different behavior in different conditions. This
is known as polymorphism. In C++, this is implemented in two ways. They are:
2. Dynamic (run time) polymorphism: A polymorphism which occurs at run time is called
static polymorphism. In dynamic polymorphism the complier known which method is going
to call at run time. It can be achieved by using method overriding. Method overriding means
creating same method with same signature in parent and child class. It can be done in parent
and child class.
Example of dynamic polymorphism:
Data Abstraction:
Data abstraction is the key feature in the OOP that refers to the act of hiding implementation details
while just presenting the essential information to the outside world. It reduces code complexity. It
hides unnecessary details and expose the essential parts to the user. By hiding unnecessary details, it
helps to reduce complexity and effort. Example: database system hides the details of how is stored,
created and maintained.
Example of abstraction:
Delegates:
A delegate is an object-oriented, managed, secure and kind-safe feature pointer inside the .net
framework. A delegate signature consists of its name, return type and arguments passed to it. Instead
of passing method, a delegate passes a method to some other method. Delegates are used in lots of
contexts, along with implementing callbacks and occasion handlers, access thread factors and
multiple kinds of approach specifications. Due to the fact a delegate does not recognize the class of a
referenced object, it is used for anonymous invocation. The problem with events is how objects talk
with each other and recognize what information is being sent during event occurs, delegates come
into play here. A delegate defines a unique function pointer template or blueprint that both the sender
and receiver use to speak on the same level.
Service Oriented
It is one of the key features of the event driven programming that used to write programs which slow
down the computer as a service oriented by consuming little of the computer processing power and
run in the background of OS.
Time Driven
In event driven programming, time driven is a code that run in the time trigger. It can be specific
code that runs on a specific time. The example of event-driven programming language is windows
update, which user can set when to update or when to check and download the update.
Event Handlers
When user click button, it will display a message, and it will close the message when user click the
button again, this is an event handler. In event driven programming, event handler is a function or
method that run a specific action when a specific event is triggered.
Trigger Functions
Events
Events such as mouse, keyboard and user interface, that needs to be triggered in the program in order
to happen, so that user interacts with an object in the program, for example, click a button by a
mouse, press key by a keyboard etc.
Event-driven programming is simple and easier because it is very visual, for example you can place a
button by just select it and place it onto a form and write a code for it. User can insert a code scripts
into an existing application by pausing the code while it’s running that make developing using event-
driven programming is easy. So, it is simple and easier program compared to other type of
programming.
Limitations:
Limitations od the event-driven programming languages are: it is only useful in GUI programming.
Classes are often hard to implement in other applications. It is complex to master. It is often not
portable to another Operating System. In the case of the .NET framework under windows that uses
event driven programming.
Similarities:
• Procedural, Object Oriented and Event Driven programming paradigms are used complete
task and solve problems.
• All of them are programming languages.
• They have controllers to manage the overflow of control of program.
In the above program we have got two variables, firstnum and secondnum. Each gets declared and
assigned a numeric value. Another variable called sum is also declared. Then sum is assigned that
result of the add() function. The control flow jumps to the add() function down below, where the two
number are added, and then the result is returned, and the program picks up where it left off, printing
out the result and then terminating.
• Code Editor
The shell is the environment where programmer write code. Sometimes code goes wrong
while developing a software. So, there comes code editor role play. Code editor is a text edit
area where programmers write, edit and save a document of code. It is the best tools of IDE
which help programmer or developer to correct the code. Programmers can execute the code
one step at a time which helps to test the code line by line before creating the final
completion program. It has features that assist with the writing and edition of code that
includes:
✓ Auto-completion:
While you start to write the first part of the function, it suggests or completes the
function and any arguments or variables. These features designed save time while
writing code.
✓ Bracket matching:
This feature helps to detect missing brackets if you forget to close a bracket while
coding. It is used for languages that need pairs of brackets to mark out blocks of code.
It helps to read and understand code faster.
✓ Syntax checks:
This feature helps to correct the code by recognizing incorrect syntax. It highlights
errors or bugs if present.
• Compiling
This is another tool of IDE that reads a program which is written in high level language and
translate it into an equivalent program in binary language. Commonly, programmer writes
program in a programming language like java, pascal, python, C, C++, C# and so on. It helps
in conversation with machine and human by translating high level language to machine
language. In this process, if errors are present it will detect and report the presence of errors
in the sources program. Depending on how big the program is it takes a time to compile and
if no errors are present in program an executable file will create.
• Debugging
This is a tool of IDE that is used to detect errors in program. It may suggest the type of error
and which line it is on if debugger find errors so finding bugs is easy using this feature.
Breakpoints is a debugging tool. It helps to debug the program easily. Debugging is done
when the program fails to work. Some of the steps for debugging are:
1. Replicating of the bugs
2. Understanding the bug
3. Locating the bug
4. Finding the root cause
5. Fixing the bug and restarting the program
• Auto Documentation
This tool describes the structural function and purpose of the code by observing the modules
and variables and its expected behavior are collects into a text file that can be used by the
other programmers or developers to understand why and how the code was created.
• Libraries
Libraries provide functions that can be imported and used at the start of the program. Those
function are not including in the core part of the programming language. Example: turtle
graphics library is a function that provides access to graphics tools in python.
• Automation tool
This tool is useful when a program has many thousands of lines of code. It includes testing or
compiling code. The purpose of automation is to minimize bad software, increase the quality
of the software and save time and money. These tools automatically do the process that that
might in any other case be executed by means of hand.
Functionalities:
At first, we have to import mysql connector file. The step to import that file into the visual studio file
is given below:
Step1: First download MySQL connector zip file. Step2: Then, open Microsoft Visual Studio.
You can see MySQL.data.dll file name inside the
zip file.
Step3: Go to file, click on new menu Step4: Make any form or click on console
application. Then, put name of the project.
Step5: There you can see the solution explorer menu Step6: Right click on the reference. Then, add
at the right-hand side. reference.
Step7: Open the folder where you have saved the Step8: Add MySQL.data.dll in the reference. Then,
MySQL connection file. browse and press ok.
Step9: You can see the reference in the visual studio. Step10: After that Create a DBConnect class.
After importing that file, we need to keep code to create a connection to a database. Let’s look at an
example, we will connect to a database which has name of inventory_management_system.
Username and password that are used to connect to database is given below:
• Username: inventory_management_system
• Password: programming
Here I have designed a simple windows forms application where “Connect” button is used to connect
to the database.
Step – 1. First step is to create a new project in Visual Studio. After opening Visual Studio, you
need to click menu option New->Project.
Step – 2. The next step is to choose the project type as a Windows Forms Application. We also need
to set name and location of our project.
Step – 3. After creating a new project, import that mysql connector dll file to this new project file.
And then from toolbox add a button to the Windows Form. Put the text name of the button as
Connect. This is how it will look like
Step – 4. Now it’s time to write code to connect to database. In this step, double click on the form to
add event handler to the code for the button click event. Again, double click on button Connect and
add the below code.
Code Explanation:
The first step variable declaration. It will be used to create the connection sting and the connection to
the SQL Server database.
The next step is to set or create the connection string that needs to be specified clearly for C# to
understand the connection sting. It contains three important parts: first one is Server or Data Source
which is the name of the server on which the database resides. In our case, localhost is the name of
server. Second part is database name which you are going to connect. And third part is User ID and
Password that are required to connect to the database. in our case, User ID is root and Password is
programming.
The third step is to assign the connecting string to the variable cnn. SqlConnection object contain
connecting string to the variable cnn that is used to established connection to the database.
After that, we use open method of the cnn variable to open connection to the database and display a
message to the user that the connection is established. When the operation complete successfully
then we close the connection to the database.
When the above code is executed in Visual Studio, click on connect button once the form displayed.
And then you can see that database connection was established. Hence, the message box was
displayed.
Output:
I have used concept of object-oriented programming language to build source code because it is
based on the objects rather than action and methods rather than logic. Object-oriented programming
is structured into class and objects and through the objects class can be called easily so the
reusability and maintainability of the code can be done. It is easy to add new data and function
whenever necessary and adding new tools is also easy comparing to the procedural programming. It
facilitates secure data or object from unauthorized access. As you can see in the example, I have
created a public class DBConnect. Class is created to set connection between database and form.
I have used Event Driven Programming paradigm based on UI programming to design user friendly
pages. Events such as click, hover effect, mouse click, key pressed etc. and its other tools are used in
my application to satisfy the company. It is a computer programming paradigm in which the flow of
the program is determined by the occurrence of events. Such as user actions (key press, mouse
clicks), sensor outputs from other programs are monitored by the code written in the source know as
event listener that detects weather the event has occurred or not. It is the dominant paradigm used in
graphical user interfaces (GUI) and other applications like java script that are centered around
performing certain actions in response to user input. In event driven programming all the events are
given job to do and the events are directed as per the source code and all the events action performed
are defined in the source.
To design above UI, I have used different tools like label, panel, textbox, button, datagridview, color
effect, combobox, datetimechecker etc. available in Visual studio.
Object oriented and event driven programming paradigm are the language that source code based on.
The main positive aspects of using this programming paradigm is that source code follows the rule of
these language. Some of the positive aspect are as follow:
The data can be secure because I have hidden unnecessary part of the code and encrypted data like
password. I have used comment that tells function of the code which can easily understand by other
programmers and developers. It is better than procedural programming because modifying the code
was easy to add new features. Database connection class was made which can call any time
whenever need.
Source code is slower then procedural programming. OOP is based on Procedural programming
language. So, it is necessary to learn PPL to understand OOP. Source code is vast and larger than
PPL.
Conclusion:
Hence, this report describes about the paradigms- procedural oriented, object oriented and event-
driven programming along with their advantages, limitations and features. I have also talked about
the conditional statement, loop, class and object and other example of different paradigms. This
report also explained about the IDE and the IDE I have used for the development of application. I
have mentioned the step that I have used to connect database and C#.NET in this report.
Part 3
The submission is in the form of five documents/files:
Development Document
In the process of developing Inventory Management System application, first things that I have done
is collecting the data from various sources. After that I analyzed the collected data. Based on the
collected data I prepared data dictionary. Then I created database inventory management system and
tables in MySQL as per user’s requirement. Then I used Visual Studio to design different pages like
login page, dashboard etc. which are needed for application. Finally, I have typed the source code for
each page.
In the design of the application form, I have used different tools that are in Visual Studio like panel,
button, label, data grid table, text box, date time etc. in the different form pages of application I
made. The application was developed to keep the records that we enter in the form. The records of
sales, suppliers, customers, staffs, purchase, etc. are kept by the help of inventory management
system. We can insert, update, save, create and delete the records as per our needs. And the
application made is very much reliable, efficient, attractive and it works perfectly.
Screenshots of design and code view of different form pages of the Inventory Management
System:
Student Name
Contents:
1. Introduction
2. IDE to manage development process
3. Use of IDE in development process of application
4. Others IDE Tools Used
5. Benefit of using IDE
6. Disadvantage of IDE
7. Comparison of Using IDE with not using
8. Conclusion
Introduction:
IDE enable to write code accurately and efficiently without losing the current document context. It
guides with live assistance as write code, no matter what language is use, from C#/VB and C++ to
JavaScript and Python. I have faced many problems in coding during development of application but
IDE me helped to solve all the problem related because it is the powerful environment of developing
application. Main problem is the code error and bug for the developer while programming. It has
many removing errors and bugs facilities i.e. debugging facilities. I have used different tools of IDE
to make it reliable, effective and attractive.
Code Editor:
The shell is the environment where programmer write code. Sometimes code goes wrong while
developing a software. So, there comes code editor. Code editor is a text edit area where
programmers write, edit and save a document of code. It is the best tools of IDE which help
programmer or developer to correct the code. We have used this feature to execute all the code one
step at a time which helps to test the code line by line before creating the final completion program.
It has features that assist with the writing and edition of code that includes:
• Auto-completion:
While you start to write the first part of the function, it suggests or completes the function and
any arguments or variables. Auto completion suggests names of classes, variables, methods,
keywords, and any other symbols that are available. This feature provides intelligent code
completions based on language and analysis of your type. If service find possible completions, it
will suggest as you type. It will filter the list members to include only members containing your
typed character If you continue typing character. To insert the selected member, you have to
press ‘Tab’ or ‘Enter’.
• Bracket matching:
This feature helps to detect missing brackets if you forget to close a bracket while coding. It is
used for languages that need pairs of brackets to mark out blocks of code. It helps to read and
understand code faster.
As you can see in the screenshot given below:
You can see red underline in private modifier. That is the notation of bracket error. I just forget to
close bracket in above code in shown screenshot. There is no pair of brackets so service highlight
below modifier to tell that I missed to close the bracket.
• Syntax checks:
This feature helps to correct the code by recognizing incorrect syntax. It highlights errors or bugs
if present. Syntax error refers to the structure of a program and the rules about that structure.
• Auto Documentation
This tool describes the structural function and purpose of the code by observing the modules
and variables and its expected behavior are collects into a text file that can be used by the
other programmers or developers to understand why and how the code was created.
• Libraries
Libraries provide functions that can be imported and used at the start of the program. Those
function are not including in the core part of the programming language. Example: turtle
graphics library is a function that provides access to graphics tools in python.
• Automation tool
This tool is useful when a program has many thousands of lines of code. It includes testing or
compiling code. The purpose of automation is to minimize bad software, increase the quality
of the software and save time and money. These tools automatically do the process that that
might in any other case be executed by means of hand.
Disadvantage of IDE:
Although IDE is the one of the popular Microsoft products developed to build an application or
computer program, it also has some disadvantage and they are: IDE requires more memory and
processing power because it use graphical interface. It’s tools may be complex for beginning
programmers and each IDE will have their own unique learning curve requiring time to learn. Some
IDEs don’t allow user to interact with the database connectivity. It can’t automatically fix errors
without knowledge of code efficient.
1. Completer
Auto-completion facility is available in IDE that completes the function and any arguments
or variables. It suggests names of classes, variables, methods, keywords, and any other
symbols that are available. There is no such auto completion facility is available in scripting
language. We have to complete code ourselves.
2. Bug and Error
IDE can detect errors in program. It has also facility of debugging through breakpoint, watch
point, tracer etc. Without using IDE, we have to find the bugs. it is difficult to find error in
complex program.
3. Design and Form
Using IDE tools and techniques make application reliable, efficient and attractive. Tools like
panel, button, label, data grid table, text box, date time picker, check box etc. make
application more understandable than not using IDE tools.
Conclusion:
Hence, this report clearly shows that using IDE is much easier than not using IDE to build an
application. Its tools play vital role to manage development process. IDE enable to write code
accurately and efficiently without losing the current document context. IDE is for prefect
programmer who has lot of experience and for the fresher IDE is much more helpful to learn and
work with.
Student Name
Contents:
1. Introduction to debugging
2. Debugging process with diagram
3. Debugging facilities in IDE
4. Example of program along with step to debug them
5. Conclusion
Introduction to Debugging
Programmers write programs in a language we call code. But, due to the fact nobody is perfect,
computer programmers sometimes make mistakes when writing their code. These mistakes are called
bugs. The process of removing these bugs from program is called debugging. A complex program
can have lots of lines of code and it in normal for new programs to have some bugs. Debugging and
Testing program are the important part of programming. It is used to detect errors in program. It may
suggest the type of error and which line it is on if debugger find errors so finding bugs is easy using
this tool. Debugging is done when the program fails to work.
The first step of debugging process is replicate bugs. You have to replicate the bug yourself, even if
someone else has already done it because you know your codebase better than someone else. Then
make a note of the of the replication that you have found which helps to communicate the details of
error later on.
You will have more evidence zeroing in on the scenario causing the issue if your result in the same
workflow. And if not, your time will be saved by not looking into mechanics that aren’t part of the
problem.
After replicate the bug, now it’s time to understand the bug. It is tough and more time-consuming
task. So that we can use available tools like source Navigator to understand bugs. To know the
dynamic behavior of the program debugger set breakpoint and watch point. Using this tool help us to
understand the bug in better way.
After understanding the bug, the next step is to locating the bugs. It is the main step of the debugging
process. By locating the bug, we can fix them. The code that causes the visible incorrect behavior
and which is actually incorrect are the two types of source code location. Visible incorrect behavior
is like memory corruption during a program and actual incorrect is like syntax error, programmer
mistake. It is difficult to find the actual incorrect in code so that we have to assume that error may be
anywhere in source code.
The last step is to fix the bug after reproducing, understanding and locating the bugs. We can leave
the debugging after fixing a bug. It is necessary to test the program after fixing bug to make user
weather any other bugs present in source code or not. We can restart the program and it is ready to
use after testing successfully.
Breakpoints:
Breakpoint are the one of the most important debugging techniques. It is used for debugging the
programs by pointing the line of program at certain stages in order to find and solve the problem.
Breakpoints can set wherever you to pause debugger execution. Example: to see the state of code
variables. You can set breakpoint on any of executable code like logic of program which crash the
program as certain point like not connect to database or mistakes. Breakpoint can’t set on the
namespace of class declaration but it can set on the variable declaration and loops. It is set to debug
the source code or function which has capacity to delete and edit. It can set multiple lines of code at
once.
To set the breakpoint in source code, click in the left margin next to a line of code or you can just
select the line and right-click and select Breakpoint > Insert breakpoint. It appears in red dot in the
left margin. Example of the breakpoint I have used during the time of development of Inventory
Management System application which is given below:
When I debug source code, execution pauses at the breakpoint, before the code on that line is
Watch point:
Watch point is the special kind of breakpoint. Watch point allow the option of monitoring the content
of individual variables because wile using watchpoints, the debugger will not activate until the
contents of a particular field change and debugger stops when the value of the monitored variable
changes. It can be used to interrupt a program when the contents of a structure change. The system
will automatically stop when the condition gets satisfied. We can set 5 watchpoint at a time. To set
watchpoint you just have to right-click an object and choose Add Watch while debugging. Example
of the watchpoint I have used during the time of development of Inventory Management System
application which is given below:
Tracer point:
The debugging tools that contains in a functional use to make a note of the program operation while
managing the application is called tracer. It is a run time function which is active while developing
application to detect the bugs in the program. Tracer is used to track runtime error along with
breakpoint which helps to find error. Each function present in the program can be traced by tracer
and it is use to fix the bug by programmer.
Command Step:
Command step is the step to connected program options that allows to execute. Types of step
commands:
• Step into: it enters break mode before the first line of code is executed.
• Step over: it executes the procedure as a unit, and then steps to the next statement in the
current procedure.
• Step out: it executes the remaining lines of a function in which the current execution point
lies.
• Step back: Step back also known as reverse debugging which is used to rewind the last step
that helps to return the program in the prior level. This helps to check the statement that user
executed.
In the above code select query is incorrect because there is no any table name as sale in database of
inventory_management_system. The steps to debug the error is given below:
1. Press Start Debugging button (Debug > Start Debugging) in the Debug Toolbar. You can also
press shortcut key F5 that starts the system with the debugger attached to the app process. We
haven’t gone anything special to examine the code so that page just loads and you see the
console output.
Breakpoint are the one of the most important debugging techniques. Breakpoints can set wherever
you to pause debugger execution. You can take a look at the values of variables, or the behavior of
memory, or whether or not a branch of code is getting run by using breakpoint.
1. Set a breakpoint in source code, click in the left margin next to a line of code or you can just
select the line and right-click and select Breakpoint > Insert breakpoint. It appears in red dot
in the left margin.
2. Again, press F5 or Start Debugging button to start app and the debugger runs to the line of
code where you set the breakpoint.
As you can see in the above screenshot, I have set a break point in line 30/31. There is yellow
color highlight in line 30/31 that means line is debugging. You can see in the below
screenshot that show that there is error in line 30. That red highlight line means there is error
or bug present in that line.
3. You know that in which line bug is present. Now its time to find the bug, understand and fix
the bug. As I set that error, I know that there should be sales in the place of sale in the above
program. I fix that bug and restart the program and it worked.
4.
Security and robustness come from the design phase. Debugging is the process of detecting bug or
error that done after the design and after the implementation. Test-driven Development means
building automated unit and regression tests early in the development cycle, and the maintaining and
running them throughout. Debugging can help show implementation problems, but the really tough
part is design. If the design went wrong, the whole thing is to collapse. This is effectively investing
in proactive debugging, and it produces more robust software applications.
To make our application more secure we should use the encryption tools for securing password and
to make robust it should be operated in all the OS and C# which is one of the powerful or robust
programming languages for the .NET platform. It is highly supported language so that our
application also supports almost all OS and C#.NET. C# programming language contains high
memory backup in order that memory leakage problem and other such types of problem isn’t always
taking place because it occurs within the case of C++ language. So, making our application more
secure and robust C#.NET programming language has helped.
Conclusion:
Hence, this report explains about the debugging process with the diagram. I have mentioned step by
step process of debugging which is used for making application more secure, and robust. I have also
explained about the features of debugging. We came to know that debugging helps to check the error
in the program and codes and also helps to solve it for efficiency of the application.
Student Name
Contents:
1. Introduction to code standard
2. Advantages of code standard
3. Necessity of coding standard in team and for individual
4. Recommendation to use coding standard
5. Screenshot of code design pattern I have used
6. Working Process of Inventory Management System application
7. Future Improvement or Enhancement of Inventory Management System
8. Conclusion
Indentation is discussed in all coding standards at some level which is used by the complier to
identify the scope of the functions. Languages such as java, C# has no actual effect on the
compilation of code itself which makes the code more human understandable and gives indication of
scope without affecting the program directly. Example of indentation is given below:
Type 1 Type 2
if (g < 17 && h < 22 || i < 60) { return true; } else if (g < 17 && h < 22 || i < 60)
{System.out.println (“incorrect”) ; return false; } {
return true;
}
else
{
System.out.println(“incorrect”);
return false;
}
Indentation is meant for the human user. It can be seen when examining both pieces of code above
that the type one is the much easier to read then type 2. I have used a simple if-else loop to
demonstrate how even the simplest of code can become confusing when indentation is now used
effectively.
Commenting code:
“Programmers should include comments whenever it is difficult to understand the code without the
comments.”
Variable Declarations:
Variable declaration is another coding standard that I have used in my program. It is always included
in coding standards. Variable declarations are regularly neglected when programming however, in
the large programs there can be the difference between understanding code or not. It should be
demonstrating the function of the variable which they store. Example of variable declaration:
Example:
If (a < h && z <o && t<e)
{
return true;
}
else
{
return false;
}
This code does follow indentation rules and it is difficult to understand because the code had been
given generic names that don’t help to explain the variables. In the given example, I have used a
basic if loop to demonstrate that even the most basic functions can be made confusing without
correct variable declarations. It must be remembered that almost all programs will be more complex
than this and therefore making the code even less difficult to read. Appropriate naming variables can
reduce the need for comments in source code which makes it more self-explanatory.
Naming Convention:
Naming convention is a code standard rule for choosing the character sequence to be used for
identifiers which denote variables, functions, types and other entities in source code. It makes easy to
understand the source code. It is used to enable code quality review tools to focus their reporting
mainly on significant issues other than arguing over syntax, naming standards and style preferences.
Camel Case:
Camel case also known as camel caps that is the practice of writing phrases such that each word in
the middle of phrase begins with a capital letter without space like iPhone, iPad, eBay, johnSmith
etc. It is used for variable name in the programming. Programming languages prefer camel case, each
word except the first is capitalized. Example:
Pascal Case:
It is basically camelCase but starting with a capital letter. In Pascal case, each word is capitalized as
in ThisStringIsPascalCased. Pascal case means upper camel case.
Some of the example of naming guidelines that I have used in my program are:
//non-private variable
variableName
//private variable
_variableName
//methods
MethodName
//parameters
parameterName
//Properties
PropertyName
Mainly, it is for safety, security and reliability. Its compliance with industry standards like ISO. It is
used to consistent code quality no matter who writes the code and software security from the start.
And main things, it reduces development cost and accelerate time to market. Coding Standard can
provide huge advantage when it implemented correctly. They can make a great different when
maintaining software which is the most important step in SDLC. Having a coding standard however,
means other developers and programmers can look over the source code, possibly identifying
possible security flaws/bugs in the code as well as maintained and modify the code if needed.
Software contain fewer bugs and generally be of a higher quality if software complies pre-existing
coding standard because present error with the code can be fixed in the SDLC process and it is easier
to test. Coding Standards contains less bugs which means less time and money has to be spent
maintaining the code. It has also huge effect on teamwork. Programmer can learn different ways and
programming styles within a team.
Several times when program fails, coding standards helps to reduce the risk of failures. Coding
standards help both working in a team or an individual because the standard of the code determines
which type of programmer you are so that the working in a big company and not using coding
standard is not the best practices. Working in a team ensures that everyone in the team is using the
efficient and proper code and you can share views and ideas regarding the development and coding
for the program. We can follow coding standard which determines the values of the programmer in
both team and individual work. So, the necessity of coding standard in team and for individual is
comparatively same.
We run application, login page will open where we have to enter correct email and password. When
we enter email and password, application check it with admins data stored in database and when it
matches, dashboard of the application will open. If the given email or password is incorrect, it will
display message. We can also create new account if we don’t have an account and enter into the
dashboard. After login to the application, it brings us to the dashboard. It is the main page of the
application from where all other pages can control. We can easily choose any page and enter the data
in any database as per the requirements. If we click on staffs on the entry form then form page of
staffs will open and we can insert, delete, update and save data and information here. When we add
some data in the form, we can see it in data grid view in that form. Similarly, all the tables like
customers, products, sales, purchase, suppliers and reports work as the staffs.
Performance, scalability and security are the features of Inventory Management System application
that can improve by application performances.
1. Performance:
In software development field, performance refers to the working speed and time responded
by the application to run. Inventory Management System is a simple application so that It
might get slow when many data are added in the application in same time. For the effective
application performance of the application should be boost up so that application will open
faster with many data.
2. Scalability:
Scalability refers to the capacity of a system to handle a growing amount of work. A system
is said to be scalable if it can increase its workload when additional resources are added. In
case of Inventory Management System, it has low level of scalability. So, it should be
improved to smooth run of application when workload increases.
3. Security:
Inventory Management System has been provided users account which take care of the
security of data, protecting the data from unauthorized access. Without correct email and
password unauthorized person cannot entered into it. It will display message if given email or
password is incorrect. For the better security strong password is required and data backup and
system recovery can provide for data loss.
Software Maintenance
After the application is developed and it worked properly as expected then the application is ready to
be use. After using this application, we can face a lot of problems that may be the bugs or crashes in
the future. In this case, software maintenance is required. The maintenance helps to maintain the
software standard that reduces the risks and error that can occur in the future. So, we need to have
the application maintenance time to time if there are errors in the system.
Some of the main enhancement that should be done for the betterment of application is given below:
• Hardware:
Improvement on hardware makes application performance efficient and effective. It helps to
decrease system respond time. As we know Inventory Management System is based on two
main software, Visual Studio and MySQL. It can be further improved in the performance by
improving hardware and processer. It takes some time to load because storage of this
application to store data is not sufficient. We can increase the storage so that more data can
be stored and that’s helps to run smoothly and perfectly.
• Software:
This application is completely depending on the software Visual Studio and MySQL
Workbench. Visual Studio for designing application and MySQL for creating relational
database of Inventory Management System where data gets store. So, it is important to update
software time to time with the greater version that helps to boost up the system and its
processer which gives better performance.
• Security:
Security refers to the data security level. High level security helps to application more secure.
For the secure of all data stored in the database high level security is needed. In the Inventory
Management System, there is no such type of security that can secure all database. There is
only user authentication in the name of security, which is not sufficient security for database.
Different job logs, audit log, schedule backup can be applied for the security. Unauthorized
access can be preventing from different software and hardware firewalls. Data backup and
system recovery facility can be added in case data accidently loss.
Conclusion:
Hence, report clearly describes about coding standards along with their examples and benefits. I have
provided how I have used coding standards during development of Inventory Management System
application with screenshots. Finally, I have described about working process and further
improvement of Inventory Management System Application. From this report, we came to know that
for better program we should know about the coding standard and have knowledge to implement it.