E194197 1690568405907 289937 Programming

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 78

Higher Nationals

Internal verification of assessment decisions – BTEC (RQF)

INTERNAL VERIFICATION – ASSESSMENT DECISIONS

Programme title Higher National Diploma in Computing

Mrs.Darshani

Assessor Internal Verifier

Unit 01: Programming

1
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Unit(s)

Design &Implement a GUI based system using a suitable Integrated


Development Environment

Assignment title

M.Nadun Nisal Wijayapala

Student’s name

List which assessment criteria Pass Merit Distinction


the Assessor has awarded.

INTERNAL VERIFIER CHECKLIST

2
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Do the assessment criteria awarded match
those shown in the assignment brief?

Y/N

Is the Pass/Merit/Distinction grade awarded


justified by the assessor’s comments on the Y/N
student work?

Has the work been assessed


accurately?

Y/N

Is the feedback to the student:


Give details:
• Constructive?

• Linked to relevant assessment criteria?


Y/N
Y/N
Y/N

3
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
• Identifying opportunities for Y/N
improved performance?
• Agreeing actions?

Does the assessment decision need


amending?

Y/N

Assessor signature Date

Internal Verifier signature Date

Programme Leader signature (if required)

4
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Date

5
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Confirm action completed

Remedial action taken

Give details:

Assessor signature Date

Internal Verifier
signature

6
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Date

Programme Leader
signature (if required)

Date

7
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
8
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Higher Nationals - Summative Assignment Feedback Form

Student Name/ID M.Nadun Nisal Wijayapala E194197

Unit Title Unit 01: Programming

Assignment Number 1 Assessor Mrs.Darshani

28/07/2023 Date Received 1st


submission

Submission Date

Date Received 2nd

9
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Re-submission Date submission

Assessor Feedback:

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

Pass, Merit & Distinction Descripts P1


M1
D1

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

Pass, Merit & Distinction Descripts P2

10
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
M2
D2

LO3. Implement basic algorithms in code using an IDE.

Pass, Merit & Distinction Descripts P3


M3
D3

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

Pass, Merit & Distinction Descripts P4


P5
M4
D4

11
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Grade: Assessor Signature: Date:

Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

12
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
* 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.

Assignment Feedback

Formative Feedback: Assessor to Student

Action Plan

Summative feedback

13
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Feedback: Student to Assessor

14
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Assessor Date
signature

Student Date
signature

Pearson Higher Nationals in

15
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Computing

Unit 01: Programming


Assignment 01

16
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
General Guidelines

1. A Cover page or title page – You should always attach a title page to your assignment.
Use previous page as your cover sheet and make sure all the details are accurately
filled.
2. Attach this brief as the first section of your assignment.
3. All the assignments should be prepared using a word processing software.
4. All the assignments should be printed on A4 sized papers. Use single side printing.
5. Allow 1” for top, bottom , right margins and 1.25” for the left margin of each page.

Word Processing Rules

1. The font size should be 12 point, and should be in the style of Time New Roman.
2. Use 1.5 line spacing. Left justify all paragraphs.
3. Ensure that all the headings are consistent in terms of the font size and font style.
4. 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.
5. Use word processing application spell check and grammar check function to help editing
your assignment.

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

17
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
body except for the before mentioned compulsory information will result in rejection of
your work.
2. Carefully check the hand in date and the instructions given in the assignment. Late
submissions will not be accepted.
3. Ensure that you give yourself enough time to complete the assignment by the due date.
4. Excuses of any nature will not be accepted for failure to hand in the work on time.
5. You must take responsibility for managing your own time effectively.
6. 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.
7. Failure to achieve at least PASS criteria will result in a REFERRAL grade .
8. Non-submission of work without valid reasons will lead to an automatic RE FERRAL. You
will then be asked to complete an alternative assignment.
9. 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 in-
text citation and a reference list.
10. 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

Student Declaration

I hereby, declare that I know what plagiarism entails, namely to use another’s work and to
present it as my own without attributing the sources in the correct way. I further understand
what it means to copy another’s work.

1. I know that plagiarism is a punishable offence because it constitutes theft.


2. I understand the plagiarism and copying policy of the Edexcel UK.
3. I know what the consequences will be if I plagiaries or copy another’s work in any of the
assignments for this program.
4. I declare therefore that all work presented by me for every aspects of my program, will
be my own, and where I have made use of another’s work, I will attribute the source in
the correct way.

18
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
5. I acknowledge that the attachment of this document signed or not, constitutes a binding
agreement between myself and Edexcel UK.
6. I understand that my assignment will not be considered as submitted if this document is
not attached to the attached.

E194197@esoft.academy 28/07/2023
Student’s Signature: Date:
(Provide E-mail ID) (Provide Submission Date)

19
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Higher National Diploma in Computing
Assignment Brief

Student Name /ID Number M.Nadun Nisal Wijayapala E194197

Unit Number and Title Unit 01: Programming

Academic Year 2022/23

Unit Tutor Mrs.Darshani

Assignment Title Design &Implement a GUI based system using a suitable


Integrated Development Environment

20
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Issue Date 19/04/2023

Submission Date 28/06/2023

IV Name & Date

Submission Format

This submission will have 3 components

1. Written Report

This submission is in the form of an individual written report. This should be written in a concise, formal
business style using single spacing and font size 12. You are required to make use of headings, paragraphs
and subsections as appropriate, and all work must be supported with research and referenced using the
Harvard referencing system. Please also provide a bibliography using the Harvard referencing system. (The
recommended word count is 1,500–2,000 words for the report excluding annexures)

2. Implemented System (Software)


The student should submit a GUI based system developed using an IDE. The system should connect with a
backend database and should have at least 5 different forms and suitable functionality including insert,
edit and delete of main entities and transaction processing.

21
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
3. Presentation
With the submitted system student should do a presentation to demonstrate the system that was
developed. Time allocated is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while doing the
presentation, but live demonstration of the system is required. Evaluator will also check the ability to
modify and debug the system using the IDE.

Unit Learning Outcomes:

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

22
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Assignment Brief and Guidance:

23
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
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 the 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.

24
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Activity 2

2.1 Compare and discuss what is meant by a Programming Paradigm and the main
characteristics of Procedural, Object oriented and Event-driven paradigms and the
relationships among them. Write small snippets of code as example for the above three
programming paradigms using a suitable programming language(s) and critically
evaluate the code samples that you have given above in relation to their structure and
the unique characteristics.

Activity 3 and Activity 4 are based on the following Scenario.

Grifindo Toys is a small-scale Toy building company which is located in United Kingdom
(UK) and currently they have 50 employees working at their headquarters. They are looking
for a simple payroll system to calculate the salaries of their employees and you are hired as a

25
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
freelance software developer to build their payroll system.
Specifications for the payroll system as follows,

Grifindo Toys Payroll System mainly contains five components and the specifications for the
components are follows,

1. Employee Component.
 Admin should be able to register employee details to the system (including
monthly salary, overtime rates-hourly, allowances).
 Admin should be able to update all employee details in the system (Update and
Delete including monthly salary, overtime rates-hourly, allowances).
 Admin should be able to view individual employee details, view all employees
details, search employees.
2. Salary Component

Admin should be able to input the date range to calculate the salary. Salary cycle
begin date and the end date should be given to calculate the monthly salary.
Salary cycle begin date and end date will be defined in the settings component
and if the user enters something else the system should display an error message.

The admin should be able to enter the no of leaves an employee has taken with

26
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
number of absent days, no of holidays for the given date range. If an employee
has worked any overtime hours the admin should be able to enter that also when
calculating the Base pay value.

Base Pay need to calculate based on the following points,

Base Pay (Monthly Salary: salary_cycle_date_range, eg: 30 days): Each


employee will be paid monthly

If any employee couldn’t cover salary_cycle_date_range (eg:-30 days) attendance


the system should calculate the no-pay value according to the below mention
formula,

No-pay-value = (Total_Salary/salary_cycle_date_range)
*No_of_absent_days

27
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Base Pay need to calculate according to the below mentioned formula

Base Pay value = Monthly_Salary + Allowances +


(Over_time_rate*no_of_overtime_hours)

Gross Pay need to calculate according to the below mentioned formula

Gross Pay = Base_Pay_value – (No_pay_value +


Base_Pay_value*government_tax_rate)

All the calculated No-pay-value, Base-pay-value and Gross pay value should
record in the database under each employee for each month. This component
should generate reports such as monthly salary report for an employee, overall
salary summary for couple of months for an employee, No-pay-value, base-pay-
value, and gross pay value of all the employees for a given month range.

3. Settings Component

28
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
This component should allow the admin to change parameter values such as

i. Date Range for a salary cycle. Eg:- 30 days


ii. Salary cycle begin date
iii. Salary cycle end date
iv. No of leaves for an employee for a year.

Activity 3

Write the complete pseudocode for the salary component of the above system (report
generation is not needed). Use the visual studio IDE (using C#.net) to implement the
above three components. Ideally, there should be three separate classes for the above
three components 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

29
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
system.
Analyze the features of an Integrated Development Environment (IDE) and explain how
those features help in application development. Evaluate the use of the Visual StudioIDE
for your application development contrasted with not using an IDE.

Activity 4
2.1 Design and build a small GUI system for the above scenario and it should be a complete
functional system with all the functions which has described in the above scenario with the
database structure which has designed in activity 3.
2.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.

2.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.

30
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
31
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
32
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Acknowledgment

Before starting this work, I would want to thank the lecturer, Mrs. Darshani, for all of
her efforts to train my classmates and I. Madom, your advice, encouragement, and
inspiration were greatly appreciated.

Sincerely,
M.Nadun Nisal Wijayapala

33
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Pearson Higher Nationals in

Computing

34
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Unit 01: Programming
Assignment 01

Name : - M. Nadun Nisal Wijayapala

Course Name : - BTEC Higher National Diploma in Computing


Register no : - CMB00176118
E No :- E194197
Lecturer name:- Mrs. Darshani
Dead Line :- 28/07/2023

35
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Task 1

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

What is an algorithm?

An Algorithm is any method or formula that has been applied to solve a problem. It
works by running a specified sequence of actions that describe how you do certain
things, and your computer will be doing the same thing every time. The algorithm works
by following some kind of procedure, made up of inputs. As soon as all the inputs are
followed up, they will display a result which can be called output.

The characteristics of the algorithm are as follows:

36
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
I. Correctness: All valid input should be correctly output by the algorithm. To
achieve the right result, it must solve the problem as intended.
II. Efficiency: To solve the problem, efficient algorithms use a minimum number
of resources available in terms of time, memory, etc. It should be rapidly
implemented, with efficient handling of large inputs.
III. Clear and understandable: A good algorithm is easily understood and must be
described in a clear and comprehensible manner. For developers to understand
its logic, it should be simple.
IV. Finiteness: The algorithm has to be capable of carrying out an infinite number
of steps. Once a period for each input has expired, it should be terminated.
V. Generalities: An algorithm should apply to a range of inputs, which is not
exclusive to special cases. For each scenario, it should be intended to resolve the
problem.
VI. Modularity: You can divide a modular algorithm into smaller, manageable
subroutines or functions. It increases the reusability and maintainability of codes.
VII. Feasibility: it would be practical and appropriate to use available resources and
technologies for implementing the algorithm. It's supposed to be under the
constraints of the system.
Fibonacci series

Algorithm to display the Fibonacci series

37
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
38
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Factorial value series

Algorithm to display the factorial value series

39
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Steps involved in the process of writing and executing a program:

1. Problem Understanding: Understand the issue and its requirements, clearly.


2. Algorithm Design: To solve this problem, you can design an algorithm using
pseudocode or flowcharts.
3. Coding: Translate the algorithm into a programming language like Python.
4. Compilation/Interpretation: The code is compiled in a language such as C++
or interpreted in Python.
5. Execution: The program is running on your computer and performing the tasks
you want it to perform.
6. Testing: To ensure correctness and precision, the program is subjected to tests
on a variety of inputs.
7. Debugging: Where any problems are found during the testing, these issues shall
be identified and corrected.
8. Optimization: If necessary, you can optimize your code to improve
performance.

Challenges faced in writing code

40
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
I. Identifying the problem: We must have a clear picture of the problem and
its requirements.
II. Algorithm design: complex problems can make it difficult to draw up an
effective and appropriate algorithm.
III. Ensuring robustness: It is necessary to deal with corner cases and edge
scenarios.
IV. Debugging: It may take a long time to identify and correct errors in the code.
V. Efficiency optimization: it can be difficult to achieve optimal performance
while minimizing the use of resources.

Dry Run example with simple output

Took sample Number 7 to both algorithms

1) Fibonacci series

41
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Final outputs: 0,1,1,2,3,5,8

2) Factorial

42
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Final output= 5040

Big-O Notation

As a function of its input size n, Big-O notation is used to express the upper bound of an
algorithm's time complexity. It estimates how long an algorithm's run time will be
increasing the input size. For example, the time complexity in the Fibonacci series

43
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
algorithm is O(n) and it's directly dependent on the number of iterations due to its “n”
value. Similarly, because the loop runs from 2 to n, the time complexity of the factorial
algorithm is also O(n).

I. Python code for the Fibonacci series

44
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
II. Python code for Factorial

45
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Efficiency Analysis using Big-O Notation

 Fibonacci series algorithm: Since this algorithm performs n iterations in


a loop, the time complexity of this algorithm is O(2n-2).

46
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
 Factorial Algorithm: The time complexity of this algorithm is also O(n),
as it iterates from 2 to n.

The two algorithms have linear time complexity which means that, due to
the size of the input, their computation runs on a linear basis. They are
quite efficient, even for relatively large inputs, and should be able to do so
well. Both algorithms provide the correct results for the given sample
inputs, as has been observed.

Task 2

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


programming

Programming Paradigm

A programming paradigm is a basic style and approach for the development of computer
programs. This defines how the code is organized, structured, and implemented. A set of
principles, concepts, and best practices guides the development process for each
paradigm.

47
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
1. Procedural Programming Paradigm:

The focus of procedural programming is to develop a set of


procedures or activities that make use of data. The program is
linear in nature, sharing information between the various functions.
It breaks down the problem into smaller subtasks that can be solved
independently, using a top-down approach.

2. Object-Oriented Programming Paradigm:

48
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Object-oriented programming (OOP) revolves around the concept
of objects, which encapsulate data and behavior. The program's
designed to be composed of interacting objects, each responsible
for a specific task. It's intended to support the reusability of code,
modularization, and modeling of actual world entities.

3. Event-Driven Programming Paradigm:

Event Driven programming determines the program flow, which in


this case is defined by events that include user inputs, System
Notifications, or signals from other parts of a program. The code is

49
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
usually composed of event handlers that respond to these events,
and program execution jumps between these handlers as events
occur.

Evaluation

 Procedural Programming Paradigm: The code will use calculate_area


and major functions to follow a procedural approach. The data and actions
are separate, but this brief example does not demonstrate the full power of
dynamic paradigms.

50
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
 Object-Oriented Programming Paradigm: With the Rectangle class that
encodes information and behavior, the code implements an object-oriented
approach. An example of encapsulation in which data length and width are
hidden behind methods is given here. This sample contains no evidence of
inheritance or polymorphism.
 Event-Driven Programming Paradigm: The code uses Tkinter to show
an event-driven paradigm. An event handler that replies to button-click
events is the function button_click. The program waits for user input (the
button click) and then responds to it. Event-driven paradigms are well-
suited for GUI applications and asynchronous programming.

Relationship among the paradigm

 Procedural and Object-Oriented: In Object-Oriented Programming (OOP),


objects often encapsulate procedural code within themselves. OOP allows for

51
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
better organization and abstraction, making complex programs more
manageable.
 Object-Oriented and Event-Driven: In event-driven systems, objects often listen
for events and respond with their methods. OOP's encapsulation allows objects
to be designed as event handlers, making event-driven programming more
structured and modular.
 Procedural and Event-Driven: Event-driven programs can use procedural code in
their event handlers to perform specific tasks when events occur. Procedural
programming can help manage the logic of how events are handled and
processed.

In general, each paradigm is based on strengths and weaknesses but the choice of a
paradigm must be relevant to the nature of the problem and its objectives for software
development. Modern programming is often combining several paradigms to take
advantage of their respective benefits, which in turn will create robust, maintainable,
and efficient software systems.

52
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Task 3

Pseudocode for the salary component

53
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Features of an IDE and its benefits:

 Code Editor: Integrated Development Environments provide a feature-rich code


editor with syntax highlighting, code completion, and formatting, which makes
code writing faster and more efficient.
 Debugging tools: The instruments for debugging, enabling developers to move
through the code, setting breakpoints, inspecting variables, and finding and
fixing problems quickly, are available in IDEs.

54
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
 Project management: Integrated Development Environments offer the ability
to manage projects, making it easier to organize files and dependencies, and to
manage version control systems.
 Code Refactoring: Integrated Development Environment provides automated
refactoring tools to improve code quality and retention, through the suggestion
and implementation of changes.
 Integrated build systems: Integrated build systems are often used by Integrated
Development Environments to simplify the process of compiling and building
applications.
 Version Control Integration: IDEs can seamlessly integrate with version
control systems like Git, enabling easy collaboration among team members.
 Code template: code templates and snippets are offered by the IDE, which
reduces the number of repeated coding tasks for developers while improving
their productivity.
 Integrated Documentation: To help developers understand APIs and libraries,
the IDE can provide documentation pops and tooltips.

Using Visual Studio IDE for Application Development

55
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
The Visual Studio is an excellent, easy-to-use Integrated Development Environment
for .NET development. There are several benefits to be gained from Visual Studio in
developing the Grifindo Toys payroll system:

 .NET Integration: Visual Studio has great support for C#.NET and other.NET
languages, which makes it easier to create applications in a common
environment.
 Rich Toolset: A large variety of tools and features that make it easy to develop,
perform debugging and test are available in Visual Studio.
 UI design: Visual Intuitive Studio is equipped with a Dragan drop UI designer
that allows rapid and intuitive creation of user interfaces.
 Database integration: Visual Studio introduces database tools for facilitating
the development of databases and access to data, which makes it easy to
implement the required database structure.
 Simple Deployment: Visual Studio provides a simple way to install the
application, allowing it to be easily distributed to end users.
 Robust Ecosystem: Visual Studio benefits from a large community of
developers, extensive documentation, and a wealth of third-party plugins and
extensions.

56
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Contrasting with Not Using an IDE

Development can still take place without an IDE, but this process may be more time-
consuming and costly. The following problems and drawbacks are some of them:

 Manual Tool Setup: Without an IDE, developers might need to manually set up
separate tools for editing, debugging, and building the application.
 Limited Code Assistance: advanced code assistance features such as syntax
highlighting, code completion, and debugging are not available in a standard text
editor.
 Debugging Complexity: Debugging code without an integrated debugger can be
challenging, as developers would need to rely on print statements or external
debugging tools.
 Project Organization: When the project gets complex, it may become difficult
for you to manage project files and dependencies on your own.
 Lack of integration: Without the Integrated Development Environment,
developers may have to switch between different tools for programming,
building, and testing which would result in a less efficient process.

57
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
The Integrated Development Environment like Visual Studio makes the development
process much more productive and provides a full range of tools and features to enhance
productivity, code quality, and collaboration. It provides developers with a single
environment, which enables them to simplify their development process and save time
and effort in the absence of an Integrated Development Environment.

Task 4

4.1 Design a Built GUI System

Employee table Design

58
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
59
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Login UI

60
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Employee component

61
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Salary Component

Setting Component

62
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
4.2 Debugging Process and Features in Visual Studio IDE

To detect and resolve bugs or problems in software applications, the debugging


process is crucial. Several features are offered by Visual Studio IDE that help to
facilitate and enhance the performance of debugging:

I. Breakpoint: For program execution to be interrupted on specific


lines, set breakpoints in the code. During runtime, this enables
you to check the state of variables and caller stack.
II. Step Over, Step Into, Step Out: These options let you control
the execution flow during debugging. Step Over executes the

63
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
current line and moves to the next line, Step Into enters a function
or method call, and Step Out runs the remaining code in the
current function and returns to the calling function.
III. Watch and Locals Windows: While the Locals window shows
local variables in the current scope, the Watch window allows
you to monitor the value of variables while debugging.
IV. Immediate Window: Allows you to execute code snippets and
access variables during debugging, providing real-time
evaluation.
V. Call Stack Window: This shows a path to the current execution
point for each method call to help understand how programs are
executed.
VI. Exception Settings: You may modify how Visual Studio handles
exceptions so that you can ignore or break particular errors.
VII. Edit and continue: If you make code changes during
debugging, the program won't need to be restarted to reflect the
changes.

The debugging process is used to develop more secure and robust


applications

64
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Debugging plays a vital role in increasing security and robustness while
developing applications. Examples of how debugging contributes to achieving
these objectives are given below:

I. Identifying and fixing security vulnerabilities: Debugging by


checking the values of variables, as well as understanding what
programs are doing at runtime, will allow you to identify and fix
security vulnerabilities such as improper input validation, buffer
overflows, or SQL injection. This knowledge will help to put in
place the necessary safety measures as well as address potential
vulnerabilities.
II. Validation of the logic and business rules: it is possible to verify
that an application complies with the intended logic and business
rules by stepping through a code during debugging, reducing the
risk of incorrect calculations or processing.
III. Delaying Exceptions Gracefully: Debugging helps you find out
why and allows you to properly handle exceptions so that they
don't cause unexpected application crashes or improve user
experience.
IV. Performance optimization: you can see performance bottlenecks
like ineffective algorithms or resource-intensive operations while
debugging and optimizing code so that it performs more effectively
and responds to requests.

65
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
4.3 Cording Standards and their importance

The code standards are a set of guidelines and best practices that teams or individuals
follow in the development of codes. They assist in the continuous maintenance of
uniform and high-quality code throughout a project. Here is a description of the
programming standards that developers use to develop applications:

 Name conventions: Use the same naming conventions for variables,


functions, classes, and other elements.
 Indentance and Formatting: To improve readability and maintainability,
adhere to a consistent indenting style and code formatting.
 Comments and documentation: To explain complex logic or clarify the
functionality of the code, provide clear and meaningful comments. To help
more developers who use your code, please make sure you have correctly
documented the publicly available APIs.
 Error handling: To gracefully handle exceptions, and to provide users or
log files with meaningful error messages, implement proper error
handling.
 Code Reusability: Encourage code reuse by creating modular and
reusable functions or classes, which reduces redundancy and improves
maintainability.

66
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
 Code review: To ensure that coding standards are complied with and to
spot potential problems at an early stage of development, code reviews
shall be carried out.

The Importance of cording standards

 Maintainability: Consistent coding standards make it easier for team


members to read, understand, and maintain each other's code. Especially in
major projects, or when there's a frequent turnover of team members.
 Collaboration: Code standards are facilitating smoother collaboration of
team members since they all follow an identical set of conventions that
reduce conflicts between code styles.
 Code quality: compliance with the coding standards leads to more code
quality and fewer bugs, as best practice is followed consistently.

67
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
 Flexibility: By providing guidelines to accelerate development efforts and
decrease the learning curve for newly recruited members of teams, a well-
defined coding standard is helping to scale up the development process.
 Security: Simplification techniques that help to write more secure codes
and mitigate security weaknesses of all kinds may be part of the coding
standards.
 Code reviews: To ensure that all codes are assessed according to the
uniform set of instructions, coding standards provide a basis for efficient
code reviews.

To ensure the consistency of code, improve its quality and facilitate collaboration
among development teams, coding standards are essential. Teams will be able to
build better, more reliable, and more resilient applications through the use of code
standards.

68
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Reference

1. Indicative. (n.d.). What Is A Programming Algorithm? Data Defined.


[online] Available at:
https://www.indicative.com/resource/programming-algorithm/.
2. Sagar Bhatia (2022). What is Procedural Programming? Key Features
of Procedural Programming. [online] Hackr.io. Available at:
https://hackr.io/blog/procedural-programming.
3. Amazon Web Services (n.d.). What is an IDE? IDE Explained - AWS.
[online] Amazon Web Services, Inc. Available at:
https://aws.amazon.com/what-is/ide/.

69
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
4. Mikejo5000 (n.d.). First, look at the debugger - Visual Studio
(Windows). [online] learn.microsoft.com. Available at:
https://learn.microsoft.com/en-us/visualstudio/debugger/debugger-
feature-tour?view=vs-2022.
5. Geeksforgeeks (2019). Coding Standards and Guidelines -
GeeksforGeeks. [online] GeeksforGeeks. Available at:
https://www.geeksforgeeks.org/coding-standards-and-guidelines/.

70
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
Grading Rubric

Grading Criteria Achieved Feedback

LO1 Define basic algorithms to carry out an operation


and outline the process of programming an
application.

71
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
P1 Define an algorithm and outline the process in building an
application

P2 Determine the steps taken from writing code to


execution.

M1 Analyse the process of writing code, including the


potential challenges faced.

D1 Evaluate the implementation of an algorithm in a suitable


language and the relationship between the written algorithm
and the code variant

72
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
LO2 Explain the characteristics of procedural, object-
orientated and event-driven programming

P3 Discuss what procedural, object orientated and event


driven paradigms are; their characteristics and the
relationship between them.

M2 Compare the procedural, object-orientated and event


driven paradigms used in given source code of an application

73
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
D2 Critically evaluate the source code of an application that
implements the procedural, object-orientated and event-
driven paradigms, in terms of the code structure and
characteristics.

LO3 Implement basic algorithms in code using an IDE.

74
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
P4 Write a program that implements an algorithm using an
IDE.

M3 Enhance the algorithm written, using the features of


the IDE to manage the development process.

D3 Evaluate the use of an IDE for development of


applications contrasted with not using an IDE.

LO4 Determine the debugging process and explain


the importance of a coding standard

75
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
P5 Explain the debugging process and explain the
debugging facilities available in the IDE.

P6 Explain the coding standard you have used in your code.

M4 Examine how the debugging process can be used to


help develop more secure, robust applications.

D4 Evaluate the role and purpose of a coding standard and


why it is necessary in a team as well as for the individual.

76
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
77
M.Nadun Nisal Wijayapala
Programming
Assignment No 1
78
M.Nadun Nisal Wijayapala
Programming
Assignment No 1

You might also like