You are on page 1of 23

HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Name - Swam Pyae Maung Maung

Student ID – MG16573

1
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Contents
Task – 1 ......................................................................................................................................................... 3
(1.1) What is an algorithm? ...................................................................................................................... 3
(1.2) Characteristics and features of an algorithm ................................................................................... 5
(1.3) Flowchart Diagram ........................................................................................................................... 6
Task – 2 ......................................................................................................................................................... 9
(2.1) What are the programming paradigms? .......................................................................................... 9
(2.2) Procedural programming paradigm ............................................................................................... 10
(2.3) Object Oriented Programming ....................................................................................................... 12
(2.4) Event-Driven Programming ............................................................................................................ 12
(2.5) Comparison of procedural .............................................................................................................. 14
Task – 4 ....................................................................................................................................................... 15
(4.1) What is debugging process? ........................................................................................................... 15
(4.1.1) Common features of IDE (IntelliJ IDEA) ....................................................................................... 15
(4.1.1) Debugging facilities available in IDE ............................................................................................ 16
(4.1.2) Breakpoint ................................................................................................................................... 16
(4.2) Outline the coding standards I have used in my code ................................................................... 19
References .................................................................................................................................................. 23

2
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Task – 1
(1.1) What is an algorithm?

An algorithm is a set of rules and commands that need to be follow when


there’re many problems and operations, and also perform a calculation for a
computer. Also, an algorithm is a finite set of information to complete a unique
order to execute an individual task. This can be also defined as step-by-step
procedure which will design for a problem.

To get more understandable, an algorithm means “think about what you


going to eat morning, getting dressed in the morning”. Those are the meaning
of algorithm in easy ways, which are the same as usage as our daily life.

There are many examples of an algorithm, from set of numbers to find


routes over to display information on a screen. The procedure of algorithms
in programming is so simple.

3
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

There is an initial input which are the set of rules and commands which
are the specific data and the output will execute from the given input. Even
though there will be any other types of programming language, the output will
always be the same at the end so, an algorithm is called language independent
and can be used in many languages as Java, Python, C# and so on.

4
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

(1.2) Characteristics and features of an algorithm

Not all procedures can be called an Algorithm. An algorithm should


have these characteristics calling:

1. Input specified
2. Output specified
3. Definiteness

4. Effectiveness
5. Finiteness
6. Independent

1.Input specified
During the computation, which the input is the data to be transformed
to produce the output and should have 0 or more well defined inputs with each
step which is a purely local property. Each step of the algorithm must be
explicit. Precision of input requires what kind of data you know, how much
and what form the data should be.

5
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

2.Output specified
An algorithm has one or more outputs which have specified output to
the input quantities. It is the data resulting from the input which is plan to
make output.
3.Definiteness
In the process, an algorithm must be specified every step and the steps
must be taken in order to process. Definiteness means showing the array of
operations which will turn input into definitely output. Algorithm should be
clean, easy to read and unambiguous for others programmers when they look
at your codes. Each of the step should be also spelled out which mean must
need instructions how to handle errors.
4.Effectiveness
To get to the output should be feasible with the available resources for
an algorithm to be effective, which means all those steps are required. Any
unnecessary and redundant steps shouldn’t contain which could make an
algorithm ineffective.
5.Finitness
Algorithms must terminate after a finite number of steps which means
you get the expected output or you get a response which solution is
impossible. This can’t be infinite and need to terminate after definite number
of steps. In developing an algorithm, there is no sense which is infinite as it
will be useless.
6.Independent
For any programming code, an algorithm should be independent and
should have step-by-step directions. It can be run on any types of the
programming languages. Hence, these are the characteristics that an
algorithm should have for its beneficial.

(1.3) Flowchart Diagram

6
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Main () method

Input () method

7
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

displayAllInfo () method

searchName () method

8
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

searchId () method

Task – 2
(2.1) What are the programming paradigms?

9
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Paradigm can also know as method to solve problems or do tasks. We


can use some programming languages to solve problem with the access of
programming paradigm or can use using tools and techniques to solve a
problem which are usable to us. We all knew that there are lots of
programming languages but they all need to observe strategy that are
implemented and the methodology is paradigms. This is a style or way of
programming. The written of paradigms are based on specific set of principles,
which supports a set of concepts. If you want to solve various problems, you
need to combine all concepts from other different parts.

(2.2) Procedural programming paradigm


This procedural expects to give special attention on procedure to get
connection with under lying machine model. This procedural can reuse the
code and it is a thing which is beneficial when in use because of its reusability.
When using, they can be called one by one and use a record of instruction and
do step by step.

10
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

As example, procedural-oriented means that the car of the start is in a


process and the arrival to the destination is the process. When programming,
we need to concern about a specific process but not with the car for sure. We
need to write the programs from the start point and to the end point
respectively.
Pros of Procedural Programming
• Simple and more efficient to compile and interact
• Can reuse the same code in different location and don’t need to copy
• Makes the implementation of algorithm easy
• Easy to understand
• Can track program flow is easier

Cons of Procedural Programming


• There is no data security
• Difficult to connect with real-world
• Programming paradigms are complex

11
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

(2.3) Object Oriented Programming


This is the architecture which is the basic for computer programming to
execute on a single object and also called as “OOP”. This program is written
as a group of classes and object which are designed for communication. The
object is small and basic entity and the computation is performed on the
objects only.
One of the advantages is that it can handle almost all kind of real-life
problems. OOP achieves the three main goals in software engineering: reuse,
flexibility and extension. OOP includes object, class, inheritance and multi
formation.
Advantages of OOP
• Data security are high
• Developing cost are less
• Codes are reusable multiple times
• Is flexible and abstraction
• Maintenance and modifying are more efficient
Disadvantages of OOP
• Size is larger than other programs
• A lot of effort is required to create
• Takes time to get know well
• Some problems are difficult and is not suitable
• Takes more time to run other than programs
(2.4) Event-Driven Programming
In this programming, the flow of program is to run the program from
computer to start which is determined which means when a user trigger a
mouse click, the operating system make the decision. It is designed to identify
the events that a user makes and then it deals by using a suitable handling
procedure which need to be understand. Activity center should have multi-
topic applications. There are also many non-active that procedures need to be
repeatably viewed until certain conditions are met.

12
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

As there are so many key features among them, service oriented is one
of the key features in event-driven programming which takes just a bit of
computer processing power so it doesn’t slow down the power. Hence,
computer can run faster. Services running in background of your OS and those
services make your system user more friendly. As an example of this oriented
is that when you insert a USB drive or wireless mouse USB flash drive is run
by the operating system to install the needing drivers to use with the
computer.
Visual Basic, C# and Java are such an example language which are
especially designed to be efficient for this programming but any programming
languages can be written in this program and is not precisely tell which
languages have to be used.
Advantages of Event-Driven programming
• Flexibility
• Simple and easy to understand
• Suitable and reliable for graphic creator
• Highly compostable
• More efficient to find natural dividing lines

13
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Disadvantages of Event-Driven Programming


• Complex even though they are simple
• The flow of the program is usually obvious
• Difficult to find errors
• If RAM is insufficient, GUIs will take load to run so it can be slower
• When programs are not formal, it can be confused for user
(2.5) Comparison of procedural

Procedural Programming Object-Oriented Programming


-Divided into small parts called -Divided into small parts called
“functions”. “objects”.
-Follows a top-down approach. -Follows a bottom-up approach.

-No access specifier in procedural -Has access specifiers like private,


programming. public, protected, etc.
-Adding new data and functions is -Adding new data and function is
not easy. easy.
-Does not have any proper way of -Provides data hiding so it is more
hiding data so it is less secure. secure.
-Overloading is impossible. -Overloading is possible in this
programming.
-There is no concept of data hiding -Concept of data hiding and
and inheritance. inheritance is used.
-The function is more important -Data is more important than
than the data. function.
-It’s based on the unreal world. -It’s based on the real world.

-Used for designing medium-sized -Used for designing large and


programs. complex programs.
-Use the concept of procedure -Use the concept of data abstraction.
abstraction.
-Code reusability is absent in this -Code reusability is present in this
programming. programming.

14
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Task – 4
(4.1) What is debugging process?
Debugging which is a multistep process that involves describing a
problem, dividing the source of the problem, and then making the problem
correct or determining a way to work around programming and engineering.
The final step of debugging is to test the correction to make sure it works.
(4.1.1) Common features of IDE (IntelliJ IDEA)
IntelliJ IDEA, known as one of the Java IDE, which is smarter than
eclipse and also the smartest IDE and which is not covered. Microsoft bought
a license for ReSharper and many users and employees are using it.
ReSharper, which is made by JetBrains, visual studio is also regarded as God
for many employees and users of Microsoft users.

Some features in IntelliJ IDEA:


It is called one of the most intelligent Java IDE because the various
functions of IDEA are provided on the results of our code analysis. Data flow
analysis is one the Java IDE. IDEA analyzes the data flow in order to guess
the variable which is running in the environment. Also, it can provide
automatic completion based on type and can add types of classes conversion
automatically.
Using Tab to achieve auto completion, when selecting the items in
suggestions and click “TAB” button and then selected content will override
with the cursor instead of inserting. This is useful when editing fragments such
as file names.

15
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

(4.1.1) Debugging facilities available in IDE


1. Operating system: Windows 10 (64 bits)
2. IDE: IntelliJ IDEA 2022
Set a breakpoint
In the code editing area, you can click on the side of the line number of
the left code to set a breakpoint on that line.
Step over(F8):
Step over which can go down line by line, when if there is a method on
that line, it will not get to the method.
Step into(F7):
When if there is a method in the current line, you can enter that method,
generally can be used to enter the custom method.
Step out (Shift + F8):
You can exit from the stepped method to the method call, which has
been executed at this moment, although the assignment has not been
completed.
Debug Process (Shift + F9)
You can start a debugging process when you finish setting you debug
lines.
(4.1.2) Breakpoint
In this breakpoint section, I will show how I set breakpoint and run.

16
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

I set a breakpoint in the searchName () method and searchID () method


as a example and you can set a breakpoint by clicking the middle space
between role number and line then it will make a breakpoint which you want
to execute. After that you can type (Shift + F9) or you can click the bug +
play button from the right top.

17
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Before set points of debugging, you need to input data and before
reaching your debug sets of points, it will show like this.

After that, you can expand to see what data are in there by clicking
arrow button and it will show all data that what type of value, coder and so
on. Also, the information is also displayed for you up here within your source
code. The power of the debugger is in controlling the step by step execution
of the program.

18
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

(4.2) Outline the coding standards I have used in my code

We will start with the object class “StudentIDRegistration”.

19
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Then, I will use String input () Method with looping and variables are shown
upon.

In this displayAllInfo () method, I will use println with “for” method to call
above String types to show all information that we entered.

20
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

In this searchName () method, I will use Boolean if adding information are


false, this method will not give output. Then, it will loop back from the start
of searchName and you can enter the correct name again. All information like
“Registration date, school fees, where to attend batch and time table” are
already inserted. Because this is only for batch HND-42.

21
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

Also like this method, it’s same as searchID () method but not like search by
name, this method can search with ID and all the information will come down
related to that ID.

So, this is the last coding method I used to get output in very simple way by
calling int from above methods.

22
HND-42 GUSTO UNIVERSITY Swam Pyae Maung Maung

References
-https://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-an-
algorithm
-https://theconversation.com/what-is-an-algorithm-how-computers-know-
what-to-do-with-data-146665
-https://tutorialink.com/ds/key-features-of-an-algorithm.ds
-https://medium.com/@bhattshlok12/characteristics-of-an-algorithm-
49cf4d7bcd9
-https://www.quora.com/How-do-you-prove-that-an-algorithm-is-well-
defined
-https://bisma.in/algorithm-and-its-characteristics/
-https://www.geeksforgeeks.org/introduction-of-programming-paradigms/
-https://levelup.gitconnected.com/functional-object-oriented-procedural-
programming-644feda5bcfc
-https://www.aplustopper.com/advantages-and-disadvantages-of-oop/
-https://www.technologyuk.net/computing/software-development/software-
design/event-driven-programming.shtml
-https://benchpartner.com/advantages-and-disadvantages-of-event-driven-
programming
-
https://www.techtarget.com/searchsoftwarequality/definition/debugging#:~
:text=Debugging%2C%20in%20computer%20programming%20and,and%2
0make%20sure%20it%20works.

23

You might also like