Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
25 views

Programming Assignment

The document is a summative assignment feedback form for a programming unit, detailing the assessment criteria, student information, and feedback from the assessor. It includes guidelines on submission standards, plagiarism, and the importance of coding standards, as well as a declaration from the student confirming the originality of their work. Additionally, it outlines the assignment requirements for developing a leave management system for a toy company, including functional requirements for both employee and admin applications.

Uploaded by

himesh raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Programming Assignment

The document is a summative assignment feedback form for a programming unit, detailing the assessment criteria, student information, and feedback from the assessor. It includes guidelines on submission standards, plagiarism, and the importance of coding standards, as well as a declaration from the student confirming the originality of their work. Additionally, it outlines the assignment requirements for developing a leave management system for a toy company, including functional requirements for both employee and admin applications.

Uploaded by

himesh raja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 88

Higher Nationals - Summative Assignment Feedback Form

Student Name/ID BALAKRISHNAN HIMESHKAR / E021831


Unit Title Unit 01 – Programming
Assignment Number 1 Assessor MS.LASANTHIKA
JAYASEKARA
31/08/2024 Date Received 07/09/2024
Submission Date 1st submission

Date Received 2nd


Re-submission Date submission

Assessor Feedback:

LO1. Define basic algorithms to carry out an operation and outline the process of programming an applicat

Pass, Merit & Distinction Descripts P1 P2 M1 D1

LO2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct
an Integrated Development Environment (IDE).

Pass, Merit & Distinction Descripts P3 M2 D2

LO3. Implement basic algorithms in code using an IDE.

Pass, Merit & Distinction Descripts P4 M3 D3

LO4. Determine the debugging process and explain the importance of a coding standard.

Pass, Merit & Distinction Descripts P5 P6 M4 D4

* Please note that grade decisions are provisional. They are only confirmed once internal and
external moderation has taken place and grades decisions have been agreed at the assessment
board.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Assessor Feedback:

Grade: Assessor Signature: Date:


Resubmission Feedback:

• Please note resubmission feedback is focussed only on the resubmitted work

Grade: Assessor Signature: Date:


Internal Verifier’s Comments:

Signature & Date:

• Please note that grade decisions are provisional. They are only confirmed once internal and

external moderation has taken place and grades decisions have been agreed at the assessment

board.

BTEC HN Summative Assignment Feedback Form


Issue Date: June 2021 Owner: HN QD
DCL1 Public (Unclassified) Version 1.0

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Important Points:

1. It is strictly prohibited to use textboxes to add texts in the assignments, except for the
compulsory information. eg: Figures, tables of comparison etc. Adding text boxes in the body
except for the before mentioned compulsory information will result in rejection of your
work.
2. Avoid using page borders in your assignment body.
3. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
4. Ensure that you give yourself enough time to complete the assignment by the due date.
5. Excuses of any nature will not be accepted for failure to hand in the work on time.
6. You must take responsibility for managing your own time effectively.
7. If you are unable to hand in your assignment on time and have valid reasons such as illness,
you may apply (in writing) for an extension.
8. Failure to achieve at least PASS criteria will result in a REFERRAL grade.
9. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You will
then be asked to complete an alternative assignment.
10. If you use other people’s work or ideas in your assignment, reference them properly using
HARVARD referencing system to avoid plagiarism. You have to provide both intext citation
and a reference list.
11. If you are proven to be guilty of plagiarism or any academic misconduct, your grade could be
reduced to A REFERRAL or at worst you could be expelled from the course
12. Use word processing application spell check and grammar check function to help editing
your assignment.
13. Use footer function in the word processor to insert Your Name, Subject, Assignment No,
and Page Number on each page. This is useful if individual sheets become detached for any
reason.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


STUDENT ASSESSMENT SUBMISSION AND DECLARATION
When submitting evidence for assessment, each student must sign a declaration confirming
that the work is their own.
Student name: Assessor name:
Balakrishnan Himeshkar Ms.Lasanthika Jayasekara
Issue date: Submission date: Submitted on:
24/04/2024 30/08/2024 07/09/2024
Programme: Pearson BTEC HND in Computing

Unit: Unit 01 – Programming


Assignment number and title:
Building a Leave Management System for Grifindo Lanka Toys (Pvt) Ltd.
Plagiarism
Plagiarism is a particular form of cheating. Plagiarism must be avoided at all costs and students
who break the rules, however innocently, may be penalized. It is your responsibility to ensure
that you understand correct referencing practices. As a university level student, you are
expected to use appropriate references throughout and keep carefully detailed notes of all your
sources of materials for material you have used in your work, including any material downloaded
from the Internet. Please consult the relevant unit lecturer or your course tutor if you need any
further advice.

Guidelines for incorporating AI-generated content into assignments: The


use of AI-generated tools to enhance intellectual development is permitted;
nevertheless, submitted work must be original. It is not acceptable to pass off AI
generated work as your own.

Student Declaration
Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the
consequences of plagiarism. I understand that making a false declaration is a form of malpractice.

Student signature: E021831@esoft.academy Date: 07/09/2024

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Unit 01: PROGRAMMING
Assignment Brief
Student Name/ID Balakrishnan Himeshkar / E021831
Number
Unit Number and Title Unit 01 – Programming

Academic Year 2024/2025


Unit Tutor
Assignment Title Building a Leave Management System for Grifindo Lanka Toys
(Pvt) Ltd.
Issue Date

Submission Date

Submission Format
The assignment submission is in the form of the following.
• The submission should be in the form of an individual written report written in a
concise, formal technical style using single spacing and font size 12. • Student has to
submit the complete GUI System with the database.

Unit Learning Outcomes

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


LO1. Define basic algorithms to carry out an operation and outline the process of
programming an application.

LO2. Explain the characteristics of procedural, object-orientated and event-driven


programming.

LO3. Implement basic algorithms in code using an IDE.

LO4. Determine the debugging process and explain the importance of a coding standard

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Transferable skills and competencies developed
Computing-related cognitive skills :
• Demonstrate knowledge and understanding of essential facts, concepts, principles and
theories relating to computing and computer applications
• Use such knowledge and understanding in the modelling and design of computerbased
systems for the purposes of comprehension, communication, prediction and the
understanding of trade-offs
• Recognise and analyse criteria and specifications appropriate to specific problems, and
plan strategies for their solutions
• Critical evaluation and testing: analyse the extent to which a computer-based system
meets the criteria defined for its current use and future development
• Methods and tools: deploy appropriate theory, practices and tools for the design,
implementation and evaluation of computer-based systems.

Computing-related practical skills :


• The ability to specify, design and construct reliable, secure and usable computer based
systems
• The ability to evaluate systems in terms of quality attributes and possible trade-offs
presented within the given problem
• The ability to deploy effectively the tools used for the construction and documentation
of computer applications, with particular emphasis on understanding the whole process
involved in the effective deployment of computers to solve practical problems
• The ability to critically evaluate and analyse complex problems, including those with
incomplete information, and devise appropriate solutions, within the constraints of a
budget.

Generic skills for employability:


• Intellectual skills: critical thinking; making a case; numeracy and literacy
• Self-management: self-awareness and reflection; goal setting and action planning
• Independence and adaptability; acting on initiative; innovation and creativity

• Contextual awareness, e.g. the ability to understand and meet the needs of individuals,
business and the community, and to understand how workplaces and organisations are governed.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Assignment Brief and Guidance:

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Activity 1

A. The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence


relation.

Fn = F n-1 + F n-2

B. Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n.


For example, factorial of 6 is 6*5*4*3*2*1 which is 720.

n! = n * (n - 1) * …….. 1

Define what an algorithm is and outline the characteristics of a good algorithm. Write the
algorithms to display the Fibonacci series and the factorial value for a given number using
Pseudo code. Determine the steps involved in the process of writing and executing a
program and carry out an analysis of writing the code phase by discussing the potential
challenges faced.

Take a sample number and dry run the above two algorithms. Show the outputs at the end
of each iteration and the final output. Examine what Big-O notation is and explain its role in
evaluating efficiencies of algorithms. Write the Python program code for the above two
algorithms and critically evaluate their efficiencies using Big-O notation.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Activity 2

Compare and discuss


whatis meant by a Programming Paradigm
andthe main
characteristics of Procedural
, Object oriented andt-driven
Even paradigms
and the
relationships among. them
Write small snippets of code as example for
three
the above
programming paradigms using a suitable programming
) andclanguage(s
ritically
evaluate the code samples that you
givenhave
aboveinrelation to
their structure and
theuniquecharacteristics.

Activity 3 and Activity 4 are based


thefollowing
on Scenario.

Grifindo
LankaToys is a small
-scale Toy building companyiswhich
inSri Lanka
and
currently they have
20 employees working
thisatcompany
. Grifindo Lanka Toys is the Sri
Lankan branch of Grifindo Toys Company which is in UK and previously they have hired your
freelance company to develop their payroll system and now they are hiring you again to
develop their leave management system for the Sri Lankan
Grifindo
Lanka
branch,
Toys
Company
.
Specifications forleave
the management
system as follows,

This leave management system has two user roles, and they are
Admin,
Employee
and theyand
are having two separate desktop applications to interact with the centralized
. Developerdatabase
can consider the centralized database
as a local database for the development purposes.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Functional requirements for the Employee and Admin as follow.

1. Employee Application.

• Employee should be able to login to the system with the employee number and
the given password.

• Employee should be able to apply for a leave through the system.

Note:- Normally an employee has 14 annual leaves, 7 casual leaves for a year and
2 shorts leaves per a month. Employee can apply casual leaves as they want
before their defined roaster starts. Annual leaves can be applied before 7 days
prior to the leave date. Short leave duration is 1 hour and 30 minutes and can be
applied for up coming time slots.

• Employee can view the status of applied leaves (Whether applied leaves are
approved or not).

• Employee can delete applied leaves.

• Employee can view their remaining leaves and history of applied leaves.

2. Admin Application

• Admin should be able to login to the leave management system.

• Admin should be able to register new employees to the system.

• Admin should be able to define the number of annual leaves, casual leaves for a
year and 2 short leaves per every month for every employee. (Newly joined
employees will less number of leaves compared to permanent employees)

• Admin should be able to define the roaster starting time and end time for each
employee.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


• Admin should be able to approve or reject applied leaves of each employee.

• Admin should be able to view leave reports of,

▪ Individual employee leave history for a given date range.

▪ All employees leave history for a given date range.

Activity 3

3.1. Write the complete pseudocode for the employee apply leave function of the
above system. Use the visual studio IDE (using C#.net) to implement the above two
applications. Ideally there should be two separate classes for the above two applications and
the developer can decide the methods which need to include in those classes. Design the
suitable database structure for keeping the data of the above system.

3.2. Analyze the features of an Integrated Development Environment (IDE) and


explain how those features help in application development. Evaluate the use of the Visual
Studio IDE for your application development contrasted with not using an IDE.

Activity 4

4.1 Design and build two small GUI systems for the above scenario and those two applications
should be complete functional systems with all the functions which has described in the
above scenario with the database structure which has designed in activity 3.

4.2 Examine debugging process and the features available in Visual studio IDE for debugging
your code more easily. Evaluate how you used the debugging process to develop more
secure, robust application with examples.

4.3 Explain and outline the coding standards you have used in your application development.
Critically evaluate why a coding standard is necessary for the team as well as for the
individual.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Reading:
Aho, A. V. et al. (1987) Data Structures and Algorithms. 1st Ed. Addison-Wesley. Hunt,
A. et al. (2000) The Pragmatic Programmer: From Journeyman to Master. 1st Ed.

Addison-Wesley. McConnell, S. (2004) Code Complete: A Practical Handbook of


Software Construction. 2nd Ed. Microsoft Press.

HN Global:
HN Global HN Global (2021) Reading Lists. Available at:
https://hnglobal.highernationals.com/learning-zone/reading-lists

HN Global (2021) Student Resource Library. Available at:


https://hnglobal.highernationals.com/subjects/resource-libraries

HN Global (2021) Textbooks. Available at:


https://hnglobal.highernationals.com/textbooks

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01
Pearson Higher Nationals in
Computing

Unit 01: Programming


Assignment 01

Date Submitted:

Balakrishnan Himeshkar
COL00226785 / E021831

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


ACTIVITY 01

ALGORITHMS

WHAT IS ALGORITHM?

An algorithm is a set of precise steps assigned to perform a particular task. This is also can be
described as a recipe to bake a cake. Complicated series of operations used to analyze large
data structures and taking measures to solve them as per the research done on
(DataCamp,Sep 2023)
Algorithms are more essential to computer science that they play huge role in designing
efficient problem-solving outputs. In addition, they are also important for anyone interested
in contributing for data structures according to (geeksforgeeks,May 2024)
The term "algorithm" refers to a collection of guidewords to be followed in computations or
other problem-solving procedures. This adds up the algorithm definition. It is also a process
for handling a mathematical equation in several iterations, sometimes using recursive
operations. It is often easy or complex, depending upon the nature of the problem according
to (the economic times,2024)

As for next briefing, we shall discuss about the types of the algorithms.
Types of Algorithms.
1. Brute force Algorithms:
a. A brute force algorithm involves blind increasing of all possible
solutions to arrive at one or more solutions. A simple example of a
brute force algorithm would be trying to open a safe. Without any
knowledge of the combination that can open the safe, the only way
forward would be trying all possible combinations of numbers to
open it. The same would be the case for someone trying to get

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


access to another person's email account. Trial and error would be
the method employed here; in other words, the solution lies in
applying brute force, and hence the name of the algorithm.

2. Recursive Algorithm:
a. Crucial for this sort of algorithm is the recursion base factor; it is a process of
simplification. Hereby, a problem is divided into smaller versions of the same
problem because some called trouble will call the problem recursively until it
resolves. Solving popular problems include Factorial of a number, Fibonacci
series, and many more using recursive algorithms.
3. Divide and Conquer Algorithm :
a. This is a method which splits the problem by two operations represented by
the dissection of the problem into smaller connected problems and taking us
first into the solution in solving a part of the problems all by yourself, and
then by making a summation in the second operation to come out with the
whole solution.
4. Dynamic Programming Algorithm :
a. It also is known as a memorization strategy. It tries to memorize the result
from the past computation instead of re-computing it. It used relationships
in dynamic programming, which broke down the problem into smaller sub-
problems, some of which overlap and store the solution for future use.
5. Greedy Algorithm:
a) Here, the algorithm iteratively determines a solution. It may be able to
guarantee that the solution stays out of those possibilities that previously
looked feasible.
6. Backtracking algorithm:

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


a) An algorithmic evolutionary technique for an attempt to solve a problem by
an incremental, step-by-step, recursive effort to build it up.

7. Randomized Algorithm:
a) A procedure was making choices in the process of a computation uses at
least one random number.
8. Sorting Algorithm:
a) This means the methodical arrangement of data in either ascending or
descending order depending on the sorting technique applied. If positions
data to its place very fast.
9. Search Algorithm:
a) The actual process for searching one key among data items which are sorted
or unsorted is defined by the algorithm of the search.
10. Hashing Algorithms:
a) Although hashing methodologies provide an index with key identification,
they operate similarly to search algorithms. A Hashing Algorithm can be used
for the checking of the passwords.

Characteristics of a Good Algorithm

According to (javatpoint,2024), An Good algorithm should possess most of the desirable


features that include correctness, efficiency, clarity, and generality. Correctness The
algorithm should produce correct output for all possible valid inputs. Efficiency is said in a
set of rules which could solve a problem in minimum time with preferably an optimal best
utilization of resources. It means clarity and understandability, or that the set of rules is
more implementable and maintainable by the builders. Generality refers to the fact that

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


one set of rules can be applied to instances of a problem that are novel or generalized for
use in a variety of situations.
1. Well-defined Input: The input of any algorithm should be very well described. That
is, a specific programmer knows what type of data to input, how many pieces of
given data, and in which form this data can be used.
2. The Computation Yields a Well-Defined Output: The computation gets results you
want. The least that any algorithm might produce in computation is an output that
you expect the result of to be able to materialize. In some regard, precision of
output requires information about what type of data to return, how much, and in
what format.
3. Definiteness: An algorithm should be precisely expressed and described. It should
also clearly specify every single step to the output point. That is, it defines properly
a set of actions that transform an input into an output.
4. Finiteness: The algorithm should encapsulate all the steps that take place to reach
the desired solution. It in principle must be executable and have the resources
needed for execution. It should avoid any redundant steps that would render the
algorithm inappropriate.
5. Independency: An algorithm should give a sequential process to solve a problem. It
must be independent of any computer coding. It should be developed in such a way
that it could work on every platform where a programming language exists.

PSEUDO CODES

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


WHAT IS A PSEUDO CODE?

Pseudocode can be described as a casual type of programming description that doesn't


require any information concerning the theoretical aspect or normal syntax of the
programming language. Pseudocode is used for developing a preliminary draft or blueprint
of a program. In pseudocode, a flow of a program gets condensed; however, it lacks
support information. To be sure that the programmers understand the requirements of
software project and match their code correctly, they write pseudocode.

FEATURES OF A PSEUDO CODE:

 Most programmers are familiar with this pseudo-code even if they do not have
much acquaintance with programming languages.
 This allows the programmer to completely focus on the algorithmic development
of the code.
 It cannot be compiled into an executable code.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


FIBONACCI SERIES

 Let’s Analyze the Fibonacci Sequence.

Figure 1 - FIBONACCI SEQUENCE

ALGORITHM STEPS FOR THE FIBONACCI SERIES

Step 1: START
Step 2: Declare variable n1, n2, sum, n, i
Step 2: Initialize variables: n1 = 0, n2 = 1, i = 2
Step 3: Read n
Step 4: Repeat this step until i <= n:
sum = n1 + n2
print sum
n1 = n2
n2 = sum
i=i+1

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Step 5: STOP

PSEUDOCODE FOR THE FIBONACCI SERIES

procedure fibonacci: fib_num

IF fib_num less than 1


DISPLAY 0
IF fib_num equals to 1
DISPLAY 1
IF fib_num equals to 2
DISPLAY 1, 1
IF fib_num greater than 2
Pre = 1,
Post = 1,

DISPLAY Pre, Post


FOR 0 to fib_num-2
Fib = Pre + Post
DISPLAY Fib
Pre = Post
Post = Fib
END FOR
END IF
End procedure

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


ALGORITHM FOR THE FACTORIAL VALUE
Step 1: Start
Step 2: Declare Variable n, fact, i
Step 3: Read num from User
Step 4: Initialize Variable fact=1 and i=1
Step 5: Repeat Until i<=num
5.1 fact=fact*i
5.2 i=i+1
Step 6: Print fact
Step 7: Stop

PSEUDOCODE FOR THE FACTORIAL SERIES

function factorial(n):
if n < 0:
return "Invalid input"
else if n == 0 or n == 1:
return 1
else:
result = 1
for i from 2 to n:
result = result * i
return result

DRY RUN ATTEMPTING THE FIBONACCI SEQUENCE AND THE FACTORIAL VALUE.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Dry run: An attempt by a person to manually go through a programmer's code, to find an
incorrect value of variables. In other words, one would normally do a dry run
with a printout of the code, using pen and paper, and seated at a desk, the
programmer would trace the flow of a variable manually to make sure that a
variable was accessed and updated as expected. With this approach, a
programmer will be guided where the code went wrong, and at which point of
writing.

A DRY RUN HAS THE FOLLOWING CHARACTERISTICS:


1. It is performed during design, implementation, test, or maintenance.
2. It is used to identify logical errors; therefore, they will not help in finding out the
execution error.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


DRY RUN FOR FIBONACCI SERIES
TABLE 1 - DRY RUN FOR FIBONACCI SERIES

PROCEDURE NUMBER INPUT(NTERM) COUNT OUTPUT


1 6 0
2 0 0
3 1 1
4 2 1
5 3 2
6 4 3
7 5 5
8 6 8
9 7 13
10 8 21
11 9 34
12 10 55
13 11 89
14 12 144

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


DRY RUN FOR FACTORIAL VALUES

PROCEDURE NUMBER NUM I FACTORIAL OUTPUT


1 6 1
2 1 1 1
3 2 1 2
4 3 2 6
5 4 6 24
6 5 24 120
7 6 120 720
Table 2 - DRY FOR FACTORIAL VALUE

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


STEP INVOLVING IN A PROCESS OF WRITING AND EXECUTING A PROGRAM

Application development, or the making of software, is not as simple as it sounds. There


are several steps and procedures to be followed along the development process.
Something as critical and sensitive as this cannot be built without having a strategy or
technique in place. The following specific strategies must be employed in the application-
development process:

Figure 2 - PROGRAMMING STEPS

1. Problem analysis: The following are the details required at the first step, that is,
programming. At this stage, the problem should be described well. The
requirements on input/output, the requirements about processing, requirements
about the memory of the program, the way error handling is to be done, and the
integration with other programs are all the variables to be thought at this stage

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


itself. These are the most crucial for the programmer, as these questions provide
him with a basis on which he could design his program and resolve any potential
issue that might come in later stages. This process comes to an end when all the
questions of the programmer get resolved and the requirements of the program are
known.

E.g.: AVG OF THREE NUMBERS (N1+N2 / 2)


2. Algorithm design: These are the activities that need to be executed at different
levels. These are developed in straightforward English. It can also be referred to as a
procedure or technique. Algorithms are employed just like formulae by programs to
tell computers what is to be done. The job of a programmer is to construct
algorithms as compact and effortless to comprehend. Logically, algorithms are
described hierarchically by modularization. Using modules or an entire concept, the
programmer constructs a logical thought process that the machine is to follow.
After this, the program then undergoes more vital thinking with pseudocode.
Pseudocode uses such expressions as if, else, and then to connect the rules of the
program with the hardware.

E.g.: PSEUDOCODE TO FIND AVG OF THREE NUMBERS.

BEGIN
Input A, B
SUM = A+B
AVG = SUM / 2
DISPLAY AVG
END

3. Flowcharts: Flowcharts are a pictorial tool that depicts the order of sequences/steps
or stages to be involved when a program is in execution. Now, all the steps

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


mentioned in the second step have been drawn diagrammatically so that it would
be easier for better understanding. The design flowcharts helps us in refining our
programming because through this we set the logic and hence can trace the design
flows, thus editing them.

Figure 3 - FLOWCHART TO PRINT SUM OF TWO NUMBERS

4. Coding: A program designed needs development or coding. During this stage, the
programmer writes instructions called code in some computer language to solve
problems. Each step in the coding process is based on the information that we
obtained in the earlier steps of the process. Requirements together with resources
indicate what language is chosen. Grammatical errors, spelling mistakes,
punctuation missing commas, and blank labels are also removed during this stage.

Following are a few tips to help you code more effectively:


 Apply descriptive names for the variables and label them accordingly.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Use simple language.
 Modularity in view of generalization at the module level.

Figure 4 - PYTHON CODE FOR SUM OF TWO NUMBERS

5. Debugging: As much as frequently we may test that faults may arise during the
coding; we remove all the errors in this stage from the software. Here, manually the
software is run multiple times with the help of a method named DRY RUN until all
errors have been corrected and the system becomes error-free.
Typical errors that may happen to the programs include the following:
 Non-initialized variables.
 Reversing the operands' order.
 Errors with the characters and numbers.

6. Testing: In this development stage of the program, we have to test the program
with fictitious data comprising typical unexpected and invalid data to find out
whether the behavior and output produced is correct the moment data is supplied

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


to the software. Pertinent test cases related to the software are used here. Even
prior to the design of the program, a strategy on test has to be developed.

7. Final Output: The TRUE DATA reaches the software at the end after passing through
all the stages previously defined. Here, the programmer expects the working of the
program to be complete after the test done at the end.

8. Documentation & Maintenance: This is one of the major steps in software


development. Many programmers usually bypass this stage. The biggest
beneficiaries will be the people entrusted with managing the software and the end
users. This way, it is way easier to make changes later on if need be. It is also
essential for redesigning and maintenance. Maintenance entails refreshing and
changing the program based on evolved conditions and practical experience in the
field.

Two Types of Documentations:


1. User Documentation (User Manual)
2. Technical Documentation (Technical Comments)

BIG-O NOTATION

Big O notation denotes how complex or fast, an algorithm is.It will be useful to know how
fast or slow the algorithms can work in a project. Big O notation doesn't represent
accurately the actual speed of a method in seconds. This is, therefore, since there are lots
of variables that tend to frequently affect an algorithm's time it takes to run. Big O notation
can also be used to compare different algorithms on how many operations it goes through.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


There are three major analytical methods employed in the Big O notation:
 Worst-case: the last item or the item that does not exist.
 Best-case: the most advantageous situation - first try.
 Average-case: the average of the best- and worst-case scenarios.

The other important aspect that ought to be considered when programming pertains to the
efficiency of the algorithm. Algorithms should be as efficient as possible in terms of
performance and resource utilization.

The effectiveness of an algorithm is dependent on the programming environment. It


depends on CPU speed, the efficiency of the operating system, the capacity of the memory,
the time taken for loading the CPU and memory, and the capacity of the memory. Besides
this, the effectiveness of the program may also depend on the coding techniques and the
code itself.

BIG-O NOTATION IS AND EXPLAIN ITS ROLE IN EVALUATING EFFICIENCIES OF ALGORITHMS

 Time and space resources of computation


 Performance in the best, worst, and average cases.

WAYS TO COMPARE ALGORITHMS EFFICIENCY MEASURE THAT IS INDEPENDENT OF THE


MACHINE

 Growth ratio
 Complexity measure
 How many seconds does this take?

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 How many bytes of memory does this use?

AN ALGORITHM IS A WELL-DESCRIBED SEQUENCE OF ACTIONS THAT SOLVES A PARTICULAR


PROBLEM. ACTIONS MUST BE:
 Well-defined
 Clear

The ideal, worst, and typical cases linear exploration


 Best performance: We look for the item at the first position and glance at one
position.
 It’s the worst performance: it checks every location because the item is either not in
the array or at the last position.
 Average case: In this case, it looks half of the array if the item to be searched is in
the array.

BASIC OPERATIONS

The time to perform the basic operations are always the same, in other words at most of
time C for some constant C, or in another sense, the time it takes to perform the operation
is said to be either constant or does not grow with the number of the operands. If we are
not sure how an operation is performed, we should use our best judgment. As an example,
can we perform an operation in constant time?
For example, there is no way to sum up a list of 32-bit integers faster than it takes to add
two 32-bit integers. The more elements are in the list, the longer the addition will take.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 5 - BIG-O COMPLEXITY CHART

PYTHON CODE FOR THE ABOVE TWO ALGORITHMS

Python is an interpreted, object-oriented, dynamically semantics, high-level programming


language. Due to fewer syntaxes, it is easier to read than Python; therefore, it reduces
program maintenance costs.

Python's efficiency and productivity enhancer, as remarked by many programmers, makes


them fall in love with Python. Since there is no compilation stage, the edit-test-debug cycle
is extremely effective. Python scripts are fairly easy to debug. However, the edit-test-debug
cycle is short, and often it is just sufficient to insert a few print statements in the source
code, and that forms the simplest way to debug a program.
Python is an interpreted, dynamical semantic, high-level, and object-oriented general-
purpose programming language. With simple syntax, Python can be easily readable in
nature thereby reducing the program maintenance cost.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


PYTHON CODE FOR THE FIBONACCI SEQUENCE

Figure 6 - PYTHON CODE FOR FIBONACCI SEQUENCE

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 7 - OUTPUT OF PYTHON CODE FOR FIBONACCI SEQUENCE

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


PYTHON CODE FOR THE FACTORIAL SERIES.

Figure 8 - PYTHON CODE FOR THE FACTORIAL SERIES.

Figure 9 - PYTHON OUTPUT OF FACTORIAL SEQUENCE

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


ACTIVITY 02

PROGRAMMING PARADIGMS

One way to understand the paradigm of programming is that "programming is a way of


describing your ideas in a shape in which it is calculable, which means it can be actually
processed or transformed into other forms with the help of a computer." In other words, it
is a set of rules, principles, and design concepts influencing how code should be written
and organized in a program. This is the paradigm used by each programming language.
Programming languages define their functionality through paradigms. In other words,
programming languages use paradigms to perform machine code operations at an
increased degree of understanding. Various paradigms are followed by different
programming languages. The most widely accepted language that follows an appropriate
paradigm shall be selected by the developer to write the application.

The paradigms of programming come broadly into two categories: These groups are
divided based on the unique features found in their respective languages and how they
structure code.

 Imperative programming
 Structured Programming
 Procedural Programming
 Object Oriented Programming
 Database Query Language
 Declarative Programming
 Functional Programming
 Logic Programming

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


PROCEDURAL PROGRAMMING

Procedures are what constitute procedural programming. They could be otherwise referred
to as subroutines, methods, or even functions even though it goes by the name "functions"
depending on the context. They are actually pretty different from each other. Procedures
don't provide a return value instead; its primary goal is to execute a task and give the
desired result. Functions, on the other hand, produce an output result and has very
minimal side effects.

Procedural programming is the default starting point for new programmers. This is done so
that the procedural code may instruct a device in general to solve a problem in a limited
number of logical steps. This paradigm uses a linear top-down methodology and treats
methods and data as two separate components. The method section describes the steps
that need to be followed. These techniques will be covered under the primary curriculum.

PROCEDURAL PROGRAMMING CHARACTERISTICS

 Top-down approach is used for design and creation in procedural programming.


 Functions are predefined in higher-level languages. These can be directly used
within the code to achieve several objectives.
 Global variables have been declared outside each function in the code, hence they
can be used within the functions.
 Information and operations are separated.
 The rationale behind the software is easily understandable.
 One of the ways a function can get its data is by invoking another function.
 The functions subroutine and the procedures can also receive parameters.
 Breaking down gigantic programs into smaller processes and manageable features.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


LANGUAGES THAT SUPPORT PROCEDURAL PROGRAMMING PARADIGMS

• C
• C++
• Java
• Python
• Pascal
• ColdFusion

CODE SNIPPETS FOR PROCEDURAL PROGRAMMING

Procedural programming is characterized by the division of the code into two major parts:
the process and the main code. A process in the main code is called by the software, which
then executes it there. Another subfield is procedural programming. It integrates selection,
iteration, and sequencing of structural programming.
In this example, the procedural paradigm is demonstrated by a calculating function.

The above was created in the Python language, making use of the Python IDE.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 10 - PROCEDURAL PROGRAMMING ALONGWITH OUTPUT

Above, the picture shows the "grandtotal" function previously provided. It uses a very
simple method to find the total of all of the numbers in a list. The numbers of the list part
of the "For" iteration method that was used to find this are shown by the variable x here. In
this, the total of the list will be kept by adding the list's integers to its x value. A list that
was later made available in two lists, A and B, each comprising integers. The print
command on the next line states the line that should be printed in the output and to which
the lists A and B were supplied as arguments to the function.

OBJECT ORIENT PROGRAMMING

At one point or another in their careers, nearly all developers make use of object-oriented
programming, or simply OOP-a basic paradigm of programming. The aim of this kind of
programming is to avoid the disadvantages of procedural programming. As it was

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


mentioned above, the paradigm of procedural is the first that any developer learns;
however, it boasts a great deal of disadvantages, which make it impossible to use on
complicated projects. A programmer can also protect the crucial aspects of data with the
assistance of OOP. The object-oriented programming methodology considers the elements
of the program as objects. Every object can execute a set of activities by utilizing data.
Some fundamental concepts of programming can be seen in OOP. All these designs make
use of objects and classes.

FOLLOWING ARE THE IMPORTANT CHARACTERISTICS OF OOP CONCEPTS

 Class: A class, in general, is a user-defined data type. In more detail, it can be said
that the blueprint of the arrangement of methods and attributes is done in classes.
These are used to build the specific objects based upon this blueprint.

 Object: The 'real world' thing is the software application, which is depicted as an
object. Ex: anything like a person, a dog, a vehicle, etc. Everything that exists has an
identity and state. The definition of an object is done by attributes and methods.

 Methods: Methods represent the behaviors. Actions are performed with the
methods and a method may modify object data, too or return information about
the object. The code of the method is defined inside of the class definition.

 Attributes: The information stored is called an attribute. The Class template defines
the attributes. Individuals’ objects have information in the Attributes field when the
objects are instantiated. The behavior of an object is defined by the information
contained in the attribute field of an object.

FOLLOWING ARE THE FOUR MAIN PRINCIPLES OF OOP CONCEPT

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Encapsulation: Encapsulation refers to the process of bundling data and procedures
that operate on that data within a single unit.

 Inheritance: This is the method by which one class is derived from another class.
The class from which it is acquired is called the parent class, and the inherited class
is known as a child class.

 Polymorphism: This term refers to a condition or phenomenon whereby there is


one object with multiple behaviors.

 Abstraction: It is the act of showing only the required information in simple form
and hiding the detail.

OBJECT ORIENTED PROGRAMMING CHARACTERISTICS

 Object-oriented is design-driven with a bottom-up creation.


 It is relatively easy to add more features and data to program code.
 The program is broken down into things, or objects.
 The functions used in this case will enable the objects to communicate with one
another.
 No external functions can access the data.

LANGUAGES THAT SUPPORT PROCEDURAL PROGRAMMING PARADIGMS

• C++
• Java
• Python
• Ruby

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


• PHP
• JavaScript

CODE SNIPPETS FOR OBJECT ORIENTED PRGRAMMING

Creation in OOP is more complicated than in procedural programming. This snippet of code
shows how one can represent methods, classes, objects, and instance properties.
Wrote code for the OOP concept using Python IDLE.

Figure 11 - OBJECT ORIENTED PROGRAMMING

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 12 - OUTPUT OF OBJECT ORIENTED PROGRAMMING

The following examples illustrate two classes defined; the Person class is the parent class,
while Employee is the child class. The Person class is said to be an ancestor for the class
Employee. From what is shown in the display function above in the code, we can access

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


methods of the person class using the employee class. The details() function illustrates how
we can override the behavior of the parent class in a child class.

EVENT DRIVEN PROGRAMMING

Today's programmers majorly use the event-driven paradigm. The main users of this
language are software engineers. As the name suggests, event drive programming is a
paradigm where events govern the flow of a program. These events may range from
anything to clicking a mouse or even a button. Event listeners monitor these events and
then trigger event-handling methods.
EVENT DRIVEN PROGRAMMING PARADIGMS CHARACTERISTICS

 Service Oriented: This is the capability to use event-driven programming to develop,


for example, programs for services. It takes up minimum CPU power of the machine
and runs in the background of the operating system.

 Time Driven: This paradigm of programming is event-driven. This code executes at


the exact instant that was preprogrammed previously in the program. You could
program this to run once every hour, once each month, etc. based on the codes of
the software.

 Event Handlers: A handler is a function called as a response to some predefined


event.

 Trigger Functions: These will contain the code to be executed upon a certain
condition.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Events: Events that have to be fired within the application include mouse, keyboard,
and user interface. The interaction that has to take place on the part of the user is
on program objects by mouse clicks or by keyboard selection.

LANGUAGES THAT SUPPORT EVENT DRIVEN PROGRAMMING PARADIGMS

• Visual basic.

• Visual C++, Java.

CODE SNIPPETS FOR EVENT DRIVEN PARADIGMS PRGRAMMING

A simple calculator has been developed using the Visual Studio 2019 in the C# language for
demonstrating a sample code for event-driven paradigm. The following are the pictures
which denote evidence of the developed calculator and the programming that enabled it to
function.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 13 - CLEAR

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 14 - ADDITION

Figure 15 - ADDITION RESULT (5+5=10)

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 16 - SUBSTRACTION

Figure 17 - SUBSTRACTION RESULT (7-5=2)

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 18 - MULTIPLICATION

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 19 - MULTIPLICATION RESULT (56*2 = 112)

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 20 - DIVISION

Figure 21 - DIVISION RESULT (64/2 = 32)

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 22 - CODE SNIPPET FOR EVENT DRIVEN PARADIGM PROGRAMMING - CALCULATOR

Figure 23 - CODE SNIPPET FOR EVENT DRIVEN PARADIGM PROGRAMMING - CALCULATOR

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 24- CODE SNIPPET FOR EVENT DRIVEN PARADIGM PROGRAMMING - CALCULATOR

 Form: This is the topmost hosting container for your application. Calculator is
basically a Windows Form hosting other controls.
 TextBox: This is where the numbers to be used and the result will appear. In this
example, it is the input area above that contains the display of the numbers to
be used and the operation to be performed.
 Buttons: Every number, operators displayed as +, -, *, / and functions like CE, C
represent a button. These buttons perform an action on click.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


The above snippet depicts the general structure of an event-driven diagram. In other
words, an event, such as by a mouse click, will make the event handlers available, and the
code block inside gets executed to generate a functional outcome. Further, the application
provides a direct route and does not allow any process diversions. All the components of
the software should have codes delivered cyclically as required. Anything that must be
done in design view needs to be coded so as to generate some sort of output.
Event driven programming differs from other programming languages in a few major ways,
particularly the friendly GUI-based environment. The developer can create his or her own
GUI-based system using the software's most basic tools, drag and drop it into the design
plane, then code it suitably to complete the process. The buttons will be the center of the
design view because they will be used to generate the events.
Thus, the main task of that type of tool will be displaying or adding data to the user
interface.
These technologies give additional choices to the developers. A developer has to code the
output of every single instance. The developer will have a lot of work ahead because he will
be making all the decisions and loops in the software. Another advantage is that the coding
is a lot easier and simpler using event-driven programming. Most scripts and utilities are
shown, which makes them more practical to apply rather than the principles of OOP. They
explain precisely the code that was utilized and the motivation for its development.

DIFFERENCE BETWEEN PROGRAMMING PARADIGMS


PROCEDURAL VS OBJECT-ORIENTED

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Figure 25 - PROCEDURAL VS OBJECT - ORIENTED

Consider the resemblance that these two paradigms’ similarities. We can observe that:

 Event handlers employ processes, an IF, and when processes are to be displayed
when different conditions occur.
 In general, event handlers can be added to procedural paradigms to make these
more compatible.
 As procedural and event-driven programs both employ the top-down approach to
problem-solving, they can be seen as a kind of simple task-solving systems.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


EVENT DRIVEN VS PROCEDURAL

Figure 26 - EVENT-DRIVEN VS PROCEDURAL

INTEGRATED DEVELOPMENT ENVIRONMENT(IDE)

With an IDE, a developer can very easily implement the design of various components of a
program in a functional context. An IDE is basically an application that contains all the
features that may be required to program within just one application. This includes
everything else that is provided in a package bundle. An IDE provides the following tools,
and these are found crucial by developers.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Code editor: These are used to write and edit the program code. They are much
more evident as compared to text editors because they work much more
straightforwardly and easily. The compiler is used to change the source code into
machine-executable code.
 Debugger: These debuggers help the programmers in finding bugs in their
applications.
 Automation tools: These help the developers with automating the processes that
are monotonous to perform.
 Mistakes: The IDE will highlight the problem and give, if possible, the exact position
of the problem. Runtime, syntactic, and semantic errors are the most common kinds
that one encounters with IDEs.
 Syntax highlighting: this differentiates the codes depending on what they mean. Just
imagine the parameters, classes, etc.

IDEs are designed to enhance developer productivity. It also saves time and energy and
accelerates the development procedure. It gets updated with the latest practices and
revised guidelines and conveys those updates to developers giving them state of the art
technology in the process. A developer could gain a lot from an IDE. Some of the
advantages of using IDE are listed as follows:

TYPES OF INTEGRATED DEVELOPMENT ENVIRONMENTS

1. Multi- Language IDE


 Eclipse – It is a free and open-source IDE meant for many frameworks.
Although it was first developed for Java, plugins eventually enabled expansion.
Now it supports languages, including Python, C, C++, Java, PHP, and Javascript.
 NetBeans – Free and open-source IDE which provides all functions of an IDE.
Supports Java, PHPP, JS, C, C++, Python etc.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Komodo IDE – Enterprise level IDE with a higher price tag. Supports Pearl, PHP,
Ruby, Python etc.

2. IDE for mobile development.


 PhoneGap, Flutter and Titanium mobile from appcelerator.

3. Cloud based IDE – A growing segment of IDEs which provides programmers the
advantage to access their codes from anywhere, which is an added advantage.
 Nitrous is an IDE for cloud-based development, supporting Node, Python,
Ruby, Is, etc.
 Cloud9 supports nearly 40 languages.
 Heroku is a PaaS system that runs in the cloud.
4. Apple and Microsoft proprietary IDEs.
 Microsoft Studio is the software used to develop applications on the platform.
It provides support for languages like Visual C++, C#, F#, VB.NET etc.
 MonoDevelop: It supports languages like Visual Basic, etc.
Espresso: XML, HTML, PHP, CSS, JS etc.
 Compiler: These are programs utilized for the conversion of code in source
form into code that the machine can execute.
 Debugger: These are programs that assist programmers in debugging their
applications.
 Automation tools: These help developers automate routine processes.
 Problems: The IDE will detect the problems and show the exact location of the
problem.
 Runtime, syntactic, semantic errors are the common three types that could be
seen in the IDEs.
 Syntax highlighting: This differentiates the codes based on their unique
meaning. Consider parameters, classes, etc.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Bracket matching: It helps in determining whether brackets are closed, and
whether their indentation is correct. This makes the source code much easier
to read.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


ACTIVITY 03

PSEUDOCODE FOR THE SYSTEM'S EMPLOYEE APPLY LEAVE FUNCTION.

Figure 27 - PSEUDOCODE FOR EMPLOYEE LEAVE FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


IMPLEMENTATION OF THE ABOVE TWO APPLICATIONS USING VISUAL STUDIO IDE (USING
C#.NET) AND DESIGN A SUITABLE DATABASE STRUCTURE FOR KEEPING THE DATA OF THE
ABOVE SYSTEM.
1. LOGIN FORM

Figure 28 - LOGIN FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


2. FORM (ADMIN)

Figure 29 - ADMIN FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


3. FORM (EMPLOYEE)

Figure 30 - EMPLOYEE FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


4. FORM (REGISTER)

Figure 31 - REGISTER FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


5. FORM (APPLY VIEW)

Figure 32 - APPLYING FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


DATABASE CONNECTION FOR GRIFINDO TOYS

Figure 33 - DATABSE CONNECTION

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


ACTIVITY 04

GUI INTERFACES

1. Login FORM

Figure 34 - LOGIN FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


2. ADMIN FORM

Figure 35 - ADMIN FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


3.EMPLOYEE FORM

Figure 36 - EMPLOYEE FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


4. REGISTER FORM

Figure 37 - REGISTER FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


5.APPLY LEAVE FORM

Figure 38 - APPLY LEAVE FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


6.OVERALL VIEW FORM

Figure 39 - OVERALL VIEW FORM

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


WHAT IS DEBUGGING?

As has been said above, one of the most critical features of an IDE is debugging.
Before delivering any software application or system to the clients, the developer must
make it error-free. This is simply because a firm puts utmost emphasis on customer
satisfaction. Software development basically constitutes a multi-stage process that includes
designing, coding, testing, and other steps. Every line of code of the software needs to be
tested and debugged to provide an error-free software.

Debugging is the process of attempting to fix a bug. It involves finding out where,
examining, and removing mistakes. The process starts when the software fails to act as
expected. It is tested until it detects the problem or error.

This would be very huge or very small according to the severity of the error of the
application. Third-party applications too can be used for debugging large projects. The
Visual Studio IDE used by the student in doing this project had an inbuilt debugger which is
triggered on with the one of the systems.

BENEFITS OF DEBUGGING

Immediately reports the erroneous condition that has been encountered. The
debugging process in the Visual Studio IDE highlights all the bugs along with their
location and a hint when the application is executed.
Offers details about the issue that make addressing it simpler.
In software development debugging provides little time and trouble for the
developer.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


DEBUGGING PROCESS

1. Identify the mistake: If the developer can identify the mistake, then it'll be easier to
understand and correct.
2. Locate the fault: Find out where in the system the error is situated.
3. Analyze the error: The error analysis provides two major objectives. They include
ensuring that the risk of any collateral damage has been mitigated and assure that all
errors have been found around an error.
4. Analysis verification: The tests automate the test frameworks.
5. Lateral damage cover: this is the location where all unit tests should be collected to
verify that all of them pass.
6. Correct and test: clear off all errors and run all the test scripts so that they all pass. All in
all, debugging is the most important thing when it comes to developing applications
since it enables developers to find out problems and clear faults.

DEBUGGING FEATURES IN VISUAL STUDIO IDE

The Visual Studio IDE is a very good tool in developing systems and applications. This is due
to the excellent features that it has been offering. Among those, the top one is the
debugging feature. Debugging is one of the key terminologies for the application
development process. It comes as a built-in structure for the developers with Visual Studio.
The various functionalities of the Visual Studio Debugger can be utilized by a developer to
debug applications based on their needs. Below is a list of some of the debugging tools
available in the Visual Studio IDE.

 Setting breakpoints
Breakpoints are utilized where the line of code or the section of code that the

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


developer wants to go into detail with is selected. This is one of the basic features that
shows the reliability of debugging. A breakpoint mainly indicates where the debugging
process should suspend and provides information about variable values used, memory
usage, and whether a code branch is processed or not. There are a few types of
breakpoints seen in software. Some of them are:

1. Break when value changes - when a breakpoint is set to a non-static property


setter it will get caught when changing a property value for any objects. The
same behavior can be obtained for a single object with the help of locals.
2. Conditional breakpoint: A condition can be provided to a breakpoint based
upon which it will break only under a specific circumstance. Example: providing
a loop condition or an IF condition.
3. Trace Break point - stopping the execution is the most common action in case
of a breakpoint hit. But there is an option a developer can set to print some
traces in the output window without stopping.

 To skip over functions, step over the code.


 Certain functions and methods will be employed by the Visual Studio. For this
reason, the debugger avoids using any of the system functions or methods. For
that reason, a developer can immediately begin debugging the code that is of
interest.
 Enter a property.
 Using this, developers can override the default behavior of the debugger,
which always skips controlled properties and fields. That means the developer
can choose an available alternative by choosing step into specific.
 Click the mouse to directly go to a place in your code.
 This is like the run into precise spot feature, but it only takes a mouse click. An
execution can be done from one point of line in the code.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 Run to cursor option
 The above command sets a temporary breakpoint on the current line of code
and helps to initiate a debugging process. It also, in some way, makes
modifications to the code at the same time it helps the user in setting quick
temporary breakpoints and initiates a debugger.
 Edit code while debugging
 This is another useful feature seen in visual studio. A code can be edited
during a debugging session. For an instance when a bug is found in the code,
the debugging process will stop and point it out. Here the developer can make
the necessary changes in the code and resume the debugging process.
 Evaluate variables using the Autos and Locals panes.
 The variables and their types along with values have been shown in the cars
window. This window always shows variables either in current line or in the
previous line. However, in the Locals pane the variables now in scope are
shown. With this facility a developer can track what variables are currently
being used in the system.
 Examining an exception
 The debugger throws the developer back to the line where the error occurred
in case of an exception. Here, the developer can choose to correct it or guide
on how to do it. The exception helper also allows the developer to add a
watch and observe information on the error.
 Above-listed various facilities are some of the most popular and primary
debugging tools available in Visual Studio. Developers can continue system
development tasks with the help of this type of feature. Some of the above-
mentioned features are shown in snaps below.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


USING DEBUGGING TO CREATE APPLICATIONS THAT ARE MORE
RELIABLE AND SECURE

 Debugging plays an important role in application development. There are many


advantages to debugging a system. While an error-free program is the most
important of all, debugging is equally important for building a secure system.

 The process of finding and fixing bugs is the main goal of debugging. When
unauthorized users look for ways to break into the system, that is most immediately
the line of defense regarding debugging security. Once an application has been
developed, continuous review and maintenance are carried out.

 This is one of the steps involved in the SDLC paradigm. The various issues of the
system can be corrected gradually with frequent upgrades. Debugging the faults will
save the system from hackers and all other unauthorized access. It is better to debug
the system before the deployment to identify mistakes and defects so that the
system is secure as well as successful.

 This means the system is also to be debugged on a computer that is not only reliable
but also secure. It is a sensitive process and in a secure environment, by a person
trusted or by the developer himself.

 This ensures there are no possibilities of any hazard within the entire debugging
process.

 Debugging securely with extra processes added


 Other developers include in their project the system procedures of another person.
This might be easier for the developer, but it is a very high-risk activity. If an
untrusted user's process is attached to the system, the IDE automatically raises a
security alert. Even if the developer chooses to ignore this, the system is still
reasonably threatened.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 In this way, the entire debugging process can be guaranteed safe.
 Secure debugging with added procedures

 Other developers use other people's system methods for their project. While this is
much easier for the developer, this is a very insecure thing to do. The IDE will
automatically throw up a security warning when a process belonging to an untrusted
user is attached to the system. The system will remain at risk even if the developer
decided to suppress this.
CODING STANDARDS

 Coding standards are rules or guidelines that give a set of specifications on how a
programming language is supposed to be written.
 Coding is basically a way of life for developers. Behind every system and program, there
is a lot of code, and behind each code, there is a developer with his style of working. The
application is developed in the coding phase. The major aim of the coding phase is to
write down the system design planned during the design phase using a high-level
language and then unit test the code.
 Not everyone can code the way they want to. A good piece of programming code has to
follow certain standards and guidelines. Every developer in the world follows these
guidelines. Coding standards help the developers and the other stakeholders who are
involved in system development in several ways. The following outlines the justification
of the existence of coding standards:
 Coding standards give codes developed by different developers a unique
appearance.
 Simplifies the code, making it more readable and easier to maintain.
 It allows code reuse, faster detection of bugs, thereby making a
programmer more productive by offering best practices for coding.
 Globally, several coding standards are followed. Some of them depend on
organizations, while others depend on languages. However, there are a few basic

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


coding guidelines that a coder needs to follow while writing the code. A few of them
are listed below.

1. NAMING FUNCTIONS, CONSTANTS, GLOBAL VARIABLES, AND LOCAL VARIABLES.


 The variables should be relevant to the content, meaningful, and intelligible.
 Global variables shall start with a capital letter, such as GlobalData while local
variables shall be using camel case lettering, like localData. Only letters of
capital form are to be used for forming constant name.
 It is recommended that variable names should not include any numbers.
 It should define the purpose for which the function is being used.

2. THE INDENTATION
 Indentation - Through indentions, code can be made more readable and
understandable. It is the developer's job to write the code in a manner simple
enough for other developers to understand the code. Following are a few ways
to appropriately modify the program's space.
 When two function arguments are separated by a comma, a space must be
added.
 A block nested inside a block must have proper spacing and indentation.
 Indentation of the beginning and ending is needed for every block.

3. RETURN VALUES AND ERROR/EXCEPTION HANDLING MUST BE APPROPRIATELY SET.


 Every function must return something. If it works out well, it will return a result
of success; if it doesn't, an error result will appear.
 The above image illustrates that too. If the code gets successfully executed then
the code block inside otherwise if returns the result, else the code block inside
else will be executed.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


4. USING A STRAIGHTFORWARD CODING APPROACH
 Building a system with complex code makes it difficult and expensive in
debugging and maintenance. It also must be understood by all other
developers for any future modifications.

5. POSSESSING A THOROUGHLY DESCRIBED CODE


 For comprehension, a code block should be commented appropriately. It is
always a good practice to have comments in the code for better readability.

6. One line per statement


 It is a good practice to have one statement per line while coding, as this keeps
the code clean and easier for readers to understand.
 Above are the photos showing that student used one code per line, hence
making the codes clear and readable.
 Although the ones are only a few, these basic standards form the backbone of
all the others. Clearly, as seen above, the principles followed by the students
prevail in the system and are used therein. The codes will be clearly
understandable in the system, as was illustrated by the graphics presented
here, by just following the rules of coding in a careful manner.

THE IMPACT OF CODING STANDARDS ON BOTH THE TEAM AND THE


PERSON

 Coding standards give a project a certain caliber and personality. It was introduced in the IT
sector for some reason. Imagine if everyone was allowed to code their way; the team and
everyone would be in an anarchical situation. The overall development in the IT sector has
taken place due to such restrictions, as these have kept the developers within a given
bracket. Many of these people may also question the use of this coding.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 The obvious response from many would be that it is to keep code clear and understandable,
but it goes beyond that.

 Besides helping an individual to be a better programmer, following these standards helps in


developing better team dynamics, developing better understanding; hence, it is wrong to say
that coding standards are used only for making things look good.

CODING GUIDELINES FOR A GROUP


 As explained earlier, coding standards differ among languages and organizations. We
can add new criteria under this topic by stating that we can add the coding
requirements for a particular team too. In a long-term project environment, the
members of the team discuss and eventually reach a mutual decision over a set of
rules to be followed during the project.
 THE PROCESS OF CODING
 This way, big, complex, and messy codebases are not created. To write decent clean
code, developers should work together to set some standards for their team. In this
way, it will be easy for every developer in the team to understand the code.
 In fact, it requires so much concentration and consistent effort from a development
team in order to satisfy the quality goal and thus maintain acceptable code quality
within the team. Without appropriate conventions, the requirements would be
difficult to meet at the level of the whole team, and the project structure's complexity
and development time could be increased.
 On the other side, if the codes are correctly completed according to the standard,
then it will save the time and raise the standard of the team through which the
highest productivity can be achieved in the coding sector.
 Another major advantage of implementing standards is that they encourage team
collaboration, and the group can collectively work together to maintain a smooth
workflow. Furthermore, it will be very difficult to maintain and debug the code soon if

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


these standards were not implemented or followed. A few benefits of following
coding standards as a team are mentioned below.

CODING GUIDELINES AS AN INDIVIDUAL.


 Coding standards are also used not only in team works but also in individual works
too. As a team, developers will get together and end up with a coding guideline to
follow and reach the final objective, but as an individual, everyone must practice it
whenever we code. This is because adopting the correct strategy from the beginning
will boost our potential of becoming effective developers in the future.
 The practice of basic coding standards can get an individual ready for the future
teamwork environment and build up the habit of following rules and norms. A
person's comprehension about the work they are doing can also be increased by
understanding the importance of following a certain standard. Besides those, there
are more advantages of sticking to a coding standard:
- Increased productivity: Every developer spends a significant amount of his
time in resolving problems in testing and debugging that could have been
avoided by the proper application of standards and guidelines. Therefore,
sticking to these coding standards will facilitate the developer to find
mistakes and troubleshoot codes later on in the project with ease.
- Project failure risk: Inadequacies in system development are considered a
significant source of project failure. During a solo project, one could not
handle additional funds or time in case of increased funds or time. It is,
therefore, highly recommended that early employment of coding
standards be considered to at least reduce minor risks and hazards that
might grow and become significant concerns later.
- Minimizes complexity: The application of coding standards contributes to
minimizing the chances of error in complex programming.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


 It is quite clear from the above-mentioned reasons and explanation that following
code standards can help an individual develop his coding skills, which will be helpful
on a professional level. Lastly, I would like to mention that following a code standard
can help a team and an individual to move forward in the IT sector. The above-
mentioned comparisons and explanations show the importance of coding standards
for teams and individuals.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


CONCLUSION

The Programming module covers how a process of writing a set of instructions gives the computer
the way to execute a task. Programming commonly employs computer programming languages,
including but not limited to JavaScript, Python, and C++.
By addressing a variety of tasks and activities, the programming module assignment was
successfully finished with a great amount of work, satisfying all learning outcomes. In this paper,
the student will be showing how important algorithms are, while stating how to build a successful
algorithm. Explanation will be conducted for Pseudocodes, algorithms, and the python language.
How to use Big-O notation and how that relates to the algorithm will also be shown.

Then, the student discussed the paradigms of programming and their characteristics. The inter-
relationships of object-oriented, procedural, and event-driven were critically analyzed. The
structures and distinctive characteristics of the three programming paradigms presented here are
accompanied by fragments of their code.

The student has developed a simple Grifindo leave management system for applying leaves and
approving leaves by employees and administrator respectively. Activities such as add, delete, and
update are added to databases and GUIs successfully.

The assignment shows proof that the Pseudocodes are working and produces results.
It then elaborates on the process of debugging within the Visual Studio IDE, including how it allows
the building of an application that is much more reliable and secure. Lastly, it talked about the
relevance of coding standards, whereby it was concluded by pointing out how using code standards
benefits an individual or team effort.
This assignment is mainly targeting the coverage of the given areas above. Apart from that, during
our study of the module, we also made ourselves thorough in how to build applications. We also
learnt about the software requirements, I/O requirements, and other computer system
components utilized for various employees at different levels in organizations for building a system,
etc.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


REFERENCES

DataCamp (Sept,2023)https://www.datacamp.com/blog/what-is-an-algorithm
GeeksforGeeks. Muskan.
o Available at: https://www.geeksforgeeks.org/most-important-type-of-
algorithms/
Characteristics of an Algorithm. There are some characteristics which… | by Shlok
Bhatt | Medium, 2023. Available at:
https://medium.com/@bhattshlok12/characteristics-of-an-algorithm-
49cf4d7bcd9
What is an Algorithm in Programming? - Definition, Examples &amp; Analysis (no
date) Study.com | Take Online Courses. Earn College Credit. Research Schools,
Degrees &amp; Careers. Available at:
o https://study.com/academy/lesson/what-is-an-algorithm-in-
programming- definition-examples-analysis.html
Saeed, A. (2023) Asim Saeed, Techyv.com. Available at:
o https://www.techyv.com/article/stages-steps-involved-programming/
“What is 'Pseudocode'.” Available at:
o https://economictimes.indiatimes.com/definition/pseudocode
Dry run - testing - higher computing science revision - BBC bitesize (no date) BBC
News. BBC. Available at:
https://www.bbc.co.uk/bitesize/guides/zg4j7ty/revision/3#:~:text=A%20dry%20ru
n%20is%20the,print%20out%20of%20the%20code
Big O Notation Explained with Examples :
o https://www.freecodecamp.org/news/big-o-notation-explained-with-
examples/
What is python? executive summary (no date) Python.org. ThePSF. Available at:
https://www.python.org/doc/essays/blurb/
Andrew Jamieson - Introduction to big O notation - towardsdatascience.com,
Introduction to Big O Notation. Towards Data Science.
o Available at: https://towardsdatascience.com/introduction-to-big-o-
notation-820d2e25d3fd

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01


Boudreau, E. (2023) What is a programming paradigm? Medium. Towards Data
Science. Available at: https://towardsdatascience.com/what-is-a-
programmingparadigm-1259362673c2
Bhatia, S. (no date) What is procedural programming? [definition] - key features,
o Hackr.io. Available at: https://hackr.io/blog/procedural-programming
What is object-oriented programming? oop explained in depth Educative.
Available at: https://www.educative.io/blog/object-orientedprogramming
Ltd, A.A. (2024) Event-driven programming features, UK Essays. UK Essays.
Available at:
https://www.ukessays.com/essays/computer-science/eventdrivenprogramming-
features-6167.php
Differences between procedural and Object Oriented Programming.
o GeeksforGeeks. (2024, June 28) from
https://www.geeksforgeeks.org/differencesbetween-procedural-and-
object-oriented-programming/
What is IDE or Integrated Development Environments? Veracode. Available at:
https://www.veracode.com/security/integrated-developmentenvironment

What is an IDE? Red Hat - We make open-source technologies for the enterprise.
Available at: https://www.redhat.com/en/topics/middleware/what-iside
Khillar, S. (2024) Difference between IDE and text editor, Difference Between
Similar Terms and Objects. Available at:
http://www.differencebetween.net/technology/difference-between-ide-and-
texteditor/#:~:text=full-featured%20IDE.-,A%20text%20editor%20is%20simply
%20a%20computer%20program%20and%20a,to%20build%20and%20test
%20software.

BALAKRISHNAN HIMESHKAR | E021831 - PROGRAMMING - 01

You might also like