0% found this document useful (0 votes)
313 views21 pages

Qualification Unit Number and Title Assignment Due Assignment Submitted Learner's Name Assessor Name

The document summarizes an assignment for a programming course. It includes definitions of key terms like algorithms and programming paradigms. It outlines criteria for a good algorithm, such as being simple, using memory efficiently, and executing quickly. It also describes the 7 steps for building an application, such as defining specifics, researching competitors, and designing screens and navigation. The assignment involves explaining algorithms, programming paradigms, and evaluating source code that implements different paradigms.

Uploaded by

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

Qualification Unit Number and Title Assignment Due Assignment Submitted Learner's Name Assessor Name

The document summarizes an assignment for a programming course. It includes definitions of key terms like algorithms and programming paradigms. It outlines criteria for a good algorithm, such as being simple, using memory efficiently, and executing quickly. It also describes the 7 steps for building an application, such as defining specifics, researching competitors, and designing screens and navigation. The assignment involves explaining algorithms, programming paradigms, and evaluating source code that implements different paradigms.

Uploaded by

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

Qualification BTEC HND Diploma in Computing and Systems Development

Unit number and title Unit 19: Programing

Assignment due Assignment submitted

Learner’s name Nguyễn Tấn Sang Assessor name Hoàng Đức Quang

Learner declaration:
I certify that the work submitted for this assignment is my own and research sources are fully acknowledged.

Learner signature Date 20/2/2019

P1
P2
M1
M2
D1
D2
Assignment title
Assignment 1: Programming principles, features and design.

In this assignment, you will have opportunities to provide evidence against the following criteria.
Indicate the page numbers where the evidence can be found.
Assessment criteria
Expected evidence
Task no.
Assessor’s Feedback

LO1. Understand Algorithm.

P1. Algorithm (800 words max excluding pictures/diagrams)


- Definition of algorithms, characteristics of algorithm with explanation and example
- Define criteria to measure a good algorithm. Explain how to measure it with example
- Explain the 7 steps of building an application

1
LO2. Understand programming paradigms.

P2. Programming paradigm (500 words max)

Give introduction / explanations of what procedural, object-orientated and event-driven paradigms are; their characteristics.
2
Unit Number and Title 1: Programming
Academic Year 2018
Unit Tutor Doan Trung Tung
Assignment Title Assignment 1
Issue Date
Submission Date
IV Name & Date

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

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, conduct an analysis of a suitable Integrated Development
Environment (IDE)
P1 Provide a definition M1 Determine the steps D1 Examine the
of what an algorithm is taken from writing code to implementation of an
and outline the process execution. algorithm in a suitable
in building an language. Evaluate the
application. relationship between the
written algorithm and the
code variant.

P2 Give explanations of M2 Analyse the common D2 Critically evaluate the


what procedural, features that a developer source code of an
object-orientated and has access to in an IDE. application which
event-driven paradigms implements the
are; their characteristics programming paradigms,
and the relationship in terms of the code
between them. structure and
characteristics.
Assignment Brief
You currently work for a software development company that produces software for a small
dentist hospital. As you are part of the research and development, your role includes
investigation into new processes that can benefit the company. One area of research that you
have been tasked with is the use of algorithms and how they can be used to build more
efficient software. This will have an impact on the software developed as efficient software
can result in running faster or consuming less resources.

You will need to explain what an algorithm is, with examples of their use, comparing their
efficiency, and how it will relate to the application development process, down to the
implementation in a suitable language.

The research and development team you work with have been tasked with further
investigation into how best to build more efficient, secure software. You have been asked to
look into programming paradigms and the advantages and disadvantages of using different
programming language approaches.

You will need to create a report covering findings from research into the characteristics of
different programming paradigms – procedural, object-orientated and event-driven
programming.

Your report should include an explanation of each paradigm, an analysis of suitable IDEs, and
an evaluation of source code that would be generated for an application.

Submission Format
The 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 limit is 2,000–
2,500 words, although you will not be penalised for exceeding the total word limit.
Index: Page:
-Declare 1
-Index 2
-A. Pass 3
+P1. Definition of algorithms 3
+Example of algorithms. 4,5
+ Criteria to measure a good algorithm 5,6
+ The 7 steps of building an application. 6,7

+ Procedural, object-orientated and event-driven paradigms are; their characteristics . 7,8,9,10


-B. Merit
+M1. 10,11
+M2. 12
C. Distinction.
+D1 13
+D2. 14,15
Reference 16
A.Pass:
P1. Definition of algorithms, characteristics of algorithm.
-Definition: The algorithm is a step-by-step procedure to perform a calculation, used to calculate data and deduce
automatically, therefore Definition of algorithms are a set of rules that step by step solve a problem in the definite process.
- Characteristics of the algorithm:
The steps must be clear, to achieve a certain result and with the appropriate data, the algorithm must produce the correct
result.
Applicable to many other problems with the same structure, with different data and must have certain steps and end
points.
Simple, easy to understand, optimize memory and execution time and each step in the algorithm always executes exactly
like the script (program) without knowing the final goal (not self-speculation).
For example: Let sequence A contain N distinct integers (From A1 to AN) and an integer G need to find. Need to know
whether or not i index when Ai = G. If it has i index, message indicate the indicator.
-Determine the problem: + Input: The sequence A consists of N different integers (from A 1 to An) and integer G.
+Output: The index i when Ai = G or message does not contain any term of A equal the value G.
-Algorithm solving:
Step 1: Enter N, a sequence of N digits and G values need to find;
Step 2: loop 1 to i;
Step 3: If Ai == K then inform i index and end;
Step 4: else i ++;
Step 5: If i > N, then statement The sequence A does not have any value equal K and end;
Step5: Come back to step 3.
- Flowchart:
- Criteria to measure a good algorithm.
+ Write program for easy algorithm, simple: comply with the general rules achieve to be convenient for maintenance and
repair.
+ Memory number of use at least: Each algorithm accounts for a certain amount of system resources. We should choose
the least resource-intensive algorithms of the system and has high efficiency.
+Executing program in short time: Different algorithms have different execution times so time is the most important factor.
+For example: The second code runs three times faster than the first. The jump orders, although very little system
resources and as well as being easy to maintain, but in large numbers can slow down the execution speed of the program.
Therefore, depending on the direction.
- The 7 steps of building an application:
1. Define the specifics: To make your app idea tangible, you need to define it in technical terms. That is, you have to put
the app concept into certain categories based on three main factors: Target platform, Development type, Monetization
model.
2. Get your bearings: At the second step of mobile app development process, check out your future competitors by looking
into the apps based on concepts resembling yours. No implementation can be exactly what you were thinking about.
3. Design the software (framework): +A design is a path from the problem to a solution in code and programmers often use
a flowchart.
+ Specify problem-solving direction, easy to check at the stage if any errors occur, subdivide the problem and solve for
each section.
4. Search for developers: Finding a mobile team to implement your concept is the most important step in the entire app
development process.
5. Guide and Cooperate: + Having found and hired a vendor, you don’t relieve yourself from responsibility. If you want to
get a great app in the end, you should continue working on the application side by side with the developers.
6 . Get the app published: Unless you develop an enterprise app, which you need to integrate with the in-house systems,
the next step of the app development process is publishing the app on a store
7. Further maintenance: You can’t ever say your app is ‘complete,’ not even after its publication. There’s always room for
growth and improvement, so you’ll probably want your app to have regular maintenance and updates.

P2. Procedural, object-orientated and event-driven paradigms are; their characteristics.


- Procedural programming is a system of procedures and functions. A computer program can be written based on three
structures: sequence, decision, and loop. In it, each procedure and function are a sequence of ordered commands so
Procedural programming methods go hand in hand with top-down analysis.
In structured programming, we are often interested in developing functions with little regard for the data - which they
used to handle the work. (This makes the data difficult to control).
To associate functions with one another we often use global variables or pointers.
Common programming-oriented programming languages are Pascal, C, Foxpro, ...
-OOP is a programming model based on the concept of "objects," which may contain data, in the form of fields, commonly
called attributes; and code, in the form of procedures, commonly referred to as methods. An object of the object is the
procedure of the object can access and regularly modify the data fields of the object to which they are linked (objects have
the concept of "this" or "self"). In object-oriented programming, computer programs are designed by making them out of
objects interacting with each other.
+Attribute: The properties of a class include variables, constants, or internal parameters of that class. Here, the most
important role of attributes is variables, since they can be changed during the operation of an object.
-Event-driven programming is a computer programming paradigm in which control flow of the program is determined by
the occurrence of events. These events are monitored by code known as an event listener. If it detects that an assigned
event has occurred, it runs an event handler (a callback function or method that is triggered when the event occurs).
An event is a defined action that occurs on an object.
 Mechanisms for sending messages between classes or objects.
 Send a message to another class when an event is generated.
 Each event is essentially a delegate.
The Publisher class determines when an event occurs.
 The Subscriber layer determines what action will be taken to respond to the event. •
 An event may have multiple Subscriber classes.
 A subscriber can handle multiple events from multiple Publisher classes.
Events that do not have a Subscriber class will never appear.

B.Merit:
M1: Determine the steps taken from writing code to execution in general and in C#.
The steps are taken from writing code to execution in general.
1. Coding
2. Compilation and running the project
3. Testing and debugging
The steps are taken from writing code to execution In C#.
+The steps taken from coding to implementation in C # are almost identical to other programming languages except
for certain C # specific conventions.
Names need to express meaning explicitly. Avoid naming ambiguities, accepting names with a letter for obvious objects
who understand.
1. Some naming rules : +Names need to express meaning explicitly. Avoid naming ambiguities, accepting names with a
letter for obvious objects who understand.
+Do not add the containing class name to the attribute name.
+The variable name, the bool method, must be immediately meaningful if it returns true or false. To do this, use the
prefix "Is", "Can", "Has" before the variable name, method.
2. Prefix some controls: +Mandatory naming all controllers involved in the background processing. The name of the
control is set in Pascal style with the prefix as follows:
3. Command Conventions.
+Each statement is on a line.
4. A source codes.
+Use {} to mark a block of source code. Each bracket is on one line (Exception, enum type, compact property or
initialize the value of the array may not be needed).
+In if statements, for, for each, ... If there is only one command, it may not be necessary to mark the source block.
5. Surrender and spacing.
+Write a tabular space for commands contained within the block {}. Write a way around a tab for the statement
immediately after if, else, while, for, for each.
+Write a space around the double and triple operators.
+Write a space after the "," and ";".

M2: Integrated Development Environment.


-An integrated development environment (IDE) is a software suite that consolidates basic tools required to write and test
software.
-Microsoft Visual Studio is a powerful IDE that ensures quality code throughout the entire application lifecycle, from design
to deployment. Some windows are used for writing code, some for designing interfaces, and others for getting a general
overview of files or classes in your application. Microsoft Visual Studio includes a host of visual designers to aid in the
development of various types of applications. These tools include such as Windows Forms Designer, WPF (Windows
Presentation Foundation) Designer, Web development, Class designer, Data designer and Mapping designer.
-Developers must match the IDE they use with the type of application they want to produce. For example, if a developer
wants to create an application on iOS, then they need an IDE that supports Apple's Swift programming language. Types of
IDEs range from web-based and cloud-based to mobile, language-specific or multi-language.
+Restructuring: such as smart rename variables, move the selected line code to function separately. Move to a location
code, the function parameter and the other for other priority.
+Menu context options in “GO TO DEFINITION” bring you directly to the place where the function or object defined. Other
navigation commands by right-clicking the Edit.
Reference

C. Distinction .
D1. Evaluate the relationship between the written algorithm and the code variant.
-Written algorithms” offer a general approach towards a problem, often ignoring the implementation details, which can
surpass the original problem in complexity.
-That being said “written algorithms” are “developed” in what we call pseudo-code, a language that imitates programming
languages, but takes the form desired by the writer.

-As you can see, the “written algorithm” simply presents the general approach towards the problem. It doesn’t specify how
the solution is build. The gory details are left at the discretion of the programmer. He must take into consideration things
like memory management, data types, data manipulation etc., alongside with algorithms and data structures, in order to
write the code variant. Thus, the code variant is more complex than the “written algorithm”.

D2. Evaluate the source code of an application which implements the programming paradigms, in terms of the code
structure and characteristics.
+ The data model introduced in the last section shows that several tasks in the development of scientific application
inherently require different programming paradigms by definition to model the underlying issues best.
+ In scientific computing there is a multitude of software tools available which provide methods and libraries for the
solution of very specific problems. It is clear that such tools impose restrictions in various ways. The quest for highly
reusable software components is still ongoing and demands different programming paradigms for an efficient realization.
+ These various paradigms were developed to cope with the important issue of enabling an efficient transformation of
algorithms and concepts into code. One of the main issues is related to the given code reusability thereby identifying the
concepts of monomorphic and polymorphic programming, one of the basic concepts for code reuse and orthogonal
program development. Classical languages, such as different types of assembler or C, use a straight-forward monomorphic
programming style based on the imperative programming paradigm. In the field of scientific computing, only one- and
two-dimensional data structures were initially used to develop applications, due to the limitations of computer resources.
The imperative programming paradigm was sufficient for this type of task. Code which is developed this way supports only
single data types and cannot be reused at all.
+ With the improvement of computer hardware and the rise of the object-oriented programming paradigm, the shift to
more complex data models was possible. Modern high-level languages such as C++ or Java implement means for
polymorphic programming which make code reuse possible, e.g., by inheritance. Whereas several new programming
languages such as Ruby and other derivatives do not bother the user with the data types and therefore offer various
automatically casted types, statically typed programming languages such as C, C++, or Java offer different strategies.
Implications to application development can be observed clearly by studying the evolution of the object-oriented paradigm
from imperative programming. The object-oriented programming paradigm has significantly eased the software
development of complex tasks, due to the decomposition of problems into modular entities. It allows the specification of
class hierarchies with its virtual class polymorphism (subtyping polymorphism), which has been a major enhancement for
many different types of applications. But another important goal in the field of scientific computing, orthogonal libraries,
cannot be achieved easily by this paradigm. A simple example for an orthogonal library is a software component which is
completely exchangeable, e.g., a sorting algorithm for different data structures. An inherent property of this paradigm is
the divergence of generality and specialization.
Reference
Scnsoft.com. (2019). App development process: 7 steps from an idea to a feasible product. [online]
Available at: https://www.scnsoft.com/blog/app-development-process [Accessed 9 Feb. 2019].
Course4coders.site90.com. (2019). COURSE4CODERS | A portal For Learner. [online] Available at:
http://course4coders.site90.com/basics_object.html [Accessed 9 Feb. 2019].
Medium. (2019). The Knights of Programming Paradigms – Sarah Christoff – Medium. [online]
Available at: https://medium.com/@sarah.christoff/the-knights-of-programming-paradigms-
5ae8b1a92f01 [Accessed 9 Feb. 2019].
Definitions, E. and Hope, C. (2019). What is Event-driven Programming?. [online]
Computerhope.com. Available at: https://www.computerhope.com/jargon/e/event-driven-
prog.htm [Accessed 9 Feb. 2019].
SearchSoftwareQuality. (2019). What is integrated development environment (IDE)? - Definition from
WhatIs.com. [online] Available at:
https://searchsoftwarequality.techtarget.com/definition/integrated-development-environment
[Accessed 9 Feb. 2019].
Anon, (2019). [online] Available at: https://www.quora.com/What-is-the-difference-between-the-
written-algorithm-and-the-code-variant [Accessed 9 Feb. 2019].
Iue.tuwien.ac.at. (2019). 4.2 Evolution of Programming Paradigms. [online] Available at:
http://www.iue.tuwien.ac.at/phd/heinzl/node32.html [Accessed 9 Feb. 2019].

Nguyễn Tấn Sang


ID: GCS17525
Class: GCS0702

You might also like