Sample 1
Sample 1
FACULTY OF COMPUTING
STUDENT DETAILS
STUDENT NAME
STUDENT ID
ESTIMATED
WORD LENGTH
SUBMISSION
1. I declare that:
a) this assignment is entirely my own work, except where I have included fully-
documented references to the work of others,
b) the material contained in this assignment has not previously been submitted
for any other subject at the University or any other educational institution,
except as otherwise permitted,
c) no part of this assignment or product has been submitted by me in another
(previous or current) assessment, except where appropriately referenced, and
with prior permission from the Lecturer / Tutor / Unit Coordinator for this unit.
2. I acknowledge that:
a) if required to do so, I will provide an electronic copy of this assignment to the
assessor;
b) the assessor of this assignment may, for the purpose of assessing this
assignment:
I. reproduce this assignment and provide a copy to another member of
academic staff;
II. communicate a copy of this assignment to a plagiarism checking
service such as Plagiarism Check (which may then retain a copy of this
assignment on its database for the purpose of future plagiarism
checking).
I am aware of and understand that any breaches to the Academic Code of Conduct will
be investigated and sanctioned in accordance with the College Policy.
SIGNATURE DATE
Table of Contents
List of Figures..................................................................................................................................1
List of abbreviation..........................................................................................................................3
Programming Paradigms.................................................................................................................4
Types of Programming Paradigms..................................................................................................5
Procedural Programming.................................................................................................................6
Characteristics of Procedural Programming................................................................................7
Uses of Procedural Programming................................................................................................8
Object Oriented Programming (OOP).............................................................................................9
Characteristics of OOP..............................................................................................................10
Uses of OOP..............................................................................................................................12
Event Driven Programming...........................................................................................................13
Characteristics of Event Driven Programming..........................................................................14
Uses of Event Driven Programming..........................................................................................15
Interrelationship between the programming paradigms................................................................15
Evaluation of source code in an application..................................................................................16
Procedural Programming...........................................................................................................16
Evaluation..................................................................................................................................17
Object Oriented Programming...................................................................................................17
Evaluation..................................................................................................................................18
Event Driven Programming.......................................................................................................18
Evaluation..................................................................................................................................21
Activity 2.......................................................................................................................................22
Algorithm.......................................................................................................................................22
Process of building an application.................................................................................................22
Defining and analyzing the requirements..................................................................................22
Steps taken from writing code to execution..................................................................................23
Step 1: Define an algorithm:......................................................................................................23
Step 2: Draw out a flowchart:....................................................................................................24
Step 3: Choose Platform:...........................................................................................................25
IDE (Integrated Development Environment)............................................................................25
Preferred IDE (Net Beans).........................................................................................................25
Step 4: Suitable Programming Language..................................................................................26
Low Level Programming Language......................................................................................26
High Level Programming Language.....................................................................................26
Step 5: Program Execution Process...........................................................................................26
Process of writing code..................................................................................................................27
Problem faced................................................................................................................................28
Coding standard used in my code..................................................................................................28
Implementation of algorithm in a suitable language.....................................................................30
Algorithm...................................................................................................................................30
Flowchart...................................................................................................................................31
Pseudo Code..............................................................................................................................31
Relationship between algorithm and code.....................................................................................33
Integrated Development Environment (IDE)................................................................................33
Common features of IDE...............................................................................................................34
IDENTIFYING AND SOLVING ANY LOGICAL ERRORS.....................................................34
Debugging program errors.............................................................................................................36
Activity 3.......................................................................................................................................38
Integrated Development Enviroment.............................................................................................38
IDE chosen for my project.............................................................................................................38
Debugging......................................................................................................................................39
Process of Debugging....................................................................................................................40
Prove the Analysis.....................................................................................................................41
Debugging features available in Apache NetBeans...................................................................41
Breakpoints................................................................................................................................41
Variable Inspection....................................................................................................................42
Exception handling....................................................................................................................42
Stepping.....................................................................................................................................43
Debugging Process for the secure and robust application.............................................................44
Activity 4.......................................................................................................................................45
Integrated Development Enviroment.............................................................................................45
Use of a IDE in development process of the program...................................................................45
Algorithm for the Best Fitness Fee Calculator..........................................................................45
Flow chart for the Best Fitness Application..............................................................................46
Screenshot of the best fitness fee calculator using IDE.................................................................46
Login Page.................................................................................................................................46
Best Fitness Fee Calculator...........................................................................................................48
Relationship between algorithm and source code.........................................................................49
Evaluation of the use of an IDE to develop the application..........................................................50
Comparison of using IDE without using.......................................................................................51
Coding Standard............................................................................................................................51
Role of Coding Standard...............................................................................................................51
Evaluation of Coding Stadard........................................................................................................52
Necessary for individuals..........................................................................................................52
Necessary for teams...................................................................................................................52
References......................................................................................................................................53
PROGRAMMING
List of Figures
Figure 1 Programming Paradigms...................................................................................................4
Figure 2 Types of programming paradigms....................................................................................5
Figure 3 Procedural Programming...................................................................................................6
Figure 4 Characteristics of Procedural Programming.....................................................................7
Figure 5 Uses of procedural Programming......................................................................................8
Figure 6 OOP...................................................................................................................................9
Figure 7Characteristics of OOP.....................................................................................................10
Figure 8 Uses of OOP....................................................................................................................12
Figure 9 Event Driven Programming............................................................................................13
Figure 10 Characteristics of Event Drive Programming...............................................................14
Figure 11Uses of Event Driven Programming..............................................................................15
Figure 12 Interrelationship between the paradigms.......................................................................15
Figure 13 Illustrations of Procedural Programming......................................................................17
Figure 14 Output of Procedural Programming..............................................................................17
Figure 16 Illustration of OOP........................................................................................................18
Figure 15 Output of OOP..............................................................................................................18
Figure 17 Coding for Event Driven Programming........................................................................20
Figure 18 Output of Event Driven Programming..........................................................................21
Figure 19 Software Development Process.....................................................................................22
Figure 20 Flow chart of odd and even numbers............................................................................24
Figure 21 Apache NetBeans..........................................................................................................25
Figure 22 Program Execution Process...........................................................................................26
Figure 23 Coding Standard............................................................................................................29
Figure 24 Class Field.....................................................................................................................29
Figure 25 Flowchart of area...........................................................................................................31
Figure 26 calculate the area of rectangle in C++..........................................................................32
Figure 27 Calculate he area of rectangle in phython.....................................................................32
Figure 28 calculate the area of rectangle in java...........................................................................32
Figure 29 Logical Errors................................................................................................................35
Figure 30 Solving the error............................................................................................................36
Figure 31 error in program............................................................................................................37
Figure 32 Debugged program code...............................................................................................37
Figure 33 IDE chosen for project..................................................................................................38
Figure 34 Debugging.....................................................................................................................39
Figure 35 Process of Debugging....................................................................................................40
Figure 36 Debugging Features in Apache NetBeans.....................................................................41
Figure 37 Breakpoints....................................................................................................................42
Figure 38 Exception Handling.......................................................................................................43
Page 1
PROGRAMMING
Page 2
PROGRAMMING
List of abbreviation
IDE: Integrated Development Environment
Page 3
PROGRAMMING
Programming Paradigms
Page 4
PROGRAMMING
Procedural Programming
Object-oriented Programming
Event-driven Programming
Page 5
PROGRAMMING
Procedural Programming
Page 6
PROGRAMMING
It assembles code into modular and reusable parts by using procedures, subroutines, or
functions.
It divides a program into smaller procedures, each of which responsible for executing a
certain task.
Creates program using top-down process
It demonstrates real-world forms as 'procedures' working on 'data'.
The information and capacities are confined from each other.
The program's logic is clear and easy to grasp. (Sinha, 2021).
Page 7
PROGRAMMING
It operates effectively for problems that can be broken down into sequence.
It is generally used in scripting techniques. Some scripting techniques used are Bash, Perl
and Python.
Organizing code into procedures enables the reuse of common code throughout a
program.
It produces more efficient code in low-level programming as compared to other
programming paradigms because it permits direct control over the machine (Collegenp,
2023).
Page 8
PROGRAMMING
Figure 6 OOP
Page 9
PROGRAMMING
Characteristics of OOP
Class
Object
Polymorphism
Data Abstraction
Inheritance
Encapsulation
Class
The concepts of classes and objects are centered around OOP. Classes are utilized for creating
objects, which are instances of the class. OOP offers higher abstraction and modularity by
employing classes and objects, which can facilitate the construction of large and scalable
software systems (Agrawal, 2023).
Object
Objects are distinct entities with their own attributes and functions. When an object is created,
memory is assigned to keep its information and methods. Objects can interact with one another
without requiring knowledge of each other's data or programming. (Agrawal, 2023).
Polymorphism
Page 10
PROGRAMMING
Polymorphism is a characteristic of OOP which allows object to take on numerous forms. This
implies that objects may be utilized in a variety of ways depending on the context, allowing for
more flexibility and extensibility. This is very beneficial for developing complicated and scalable
systems (Agrawal, 2023).
Abstraction
Abstraction is a crucial concept in OOP that includes hiding irrelevant information from the user
in order to control complexity. Abstraction helps programmers to introduce new features without
impacting other sections of the code by focusing only the necessary aspects. This decreases
programming complexity, increases efficiency, and promotes modularity, making the code easier
to maintain and debug. Large code bases would become highly complicated without abstraction,
and adding new functionality would be challenging (Agrawal, 2023).
Inheritance
In OOP, inheritance provides objects with the ability to acquire attributes and functions from
other objects. This concept involves making new classes derived from existing ones, with the
newly created one referred to as the derived class and the existing one as the base class. This
method allows for the formation of a hierarchical class system that is able to replicate real-world
objects and their interactions. Inheritance promotes reusability by allowing for the reuse of fields
and methods from the base class in the derived class. (Agrawal, 2023).
Encapsulation
Page 11
PROGRAMMING
Uses of OOP
Page 12
PROGRAMMING
Page 13
PROGRAMMING
Page 14
PROGRAMMING
It is useful in the game development while creating the behavior of objects in games.
It is beneficial in Graphical User Interface (GUI) and other applications that focus on user input.
Page 15
PROGRAMMING
The event-driven programming method concentrates upon events such as user interactions,
system notifications, or sensor outputs. The occurrence of events determines the sequence of
program execution in this paradigm. Some examples of event-driven programming languages
include Visual Basic, C++, and Java.
The overall flow or decision-making logic of an application is outlined by procedural and event-
driven programming, whereas object-oriented programming focuses on the structure of the
decision-making logic. Object-oriented programming can be viewed as a continuation or
evolution of procedural programming, while object-oriented programming is suitable for
implementing event-driven programming (Yasi, 2022).
Procedural Programming
Here is an example of using the procedural programming paradigm in C++ to check if the given
integer is a prime number.
Page 16
PROGRAMMING
Evaluation
The program in C++ demonstrates the use of procedural programming to determine whether a
user-inputted number is prime or not. It starts by defining three integer variables and asking the
user to enter a number. The code is executed in a sequential manner from top to bottom, which is
characteristic of procedural programming.
Page 17
PROGRAMMING
Evaluation
In the above code, we define a student class with private member variables for roll number and
age. The constructor is used to initialize the object with the provided values. The get details ()
method is a member function of the class that displays the student's information. We then call get
details () method to display the student's information.
Page 18
PROGRAMMING
Page 19
PROGRAMMING
Page 20
PROGRAMMING
Evaluation
The above diagram demonstrates how to make java calculator using the event driven
programming. This program in Java demonstrates the functionality of a basic calculator that can
perform fundamental arithmetic operations, such as addition, subtraction, multiplication, and
division. The program receives user input and displays the results of the calculations, depending
on the user's selection of the operation. Event-driven programming is a programming paradigm
that focuses on the management and handling of the events.
Page 21
PROGRAMMING
Activity 2
Algorithm
An algorithm is a set of instructions that must be carried out in a certain order in order to produce
a given result. Algorithms can be implemented in several programming languages because their
development is frequently independent of the chosen language. Key characteristics of an
algorithm include being precise, accurate, efficient, and independent of any one particular
programming language. The importance of algorithm is determined by its performance and
scalability (Upadhyay, 2023)
From identifying the issue to launching and maintaining the application, building an application
is a complex and multifaceted process that involves many steps. This outline discusses the
crucial steps involved for developing an application and points out some best practices and
resources that can guarantee success (Shiverware, 2019).
The steps for the building an application involves five different steps:
Page 22
PROGRAMMING
Designing
In the design phase of an application development, software developers create a prototype and
user interface to represent how the application should function and look. They refine the design
based on feedback and generate a test model to verify the application's performance. The project
scope is reviewed, an estimate is provided, and the design is evaluated after completion to make
sure it satisfies the customer's expectations (Pham, 2019).
Developing
In the development stage, the developers will be responsible for writing the code based on the
final design documents. The code will be developed according to the design and implementation
models. The application will be tested thoroughly to ensure it meets quality standards and
customer requirements. Any issues or bugs will be identified and addressed during the debugging
process. The testing will be carried out using pre-established test cases and plans (Pham, 2019).
Deploying
During the final stage of deployment, the software application will be implemented according to
the deployment plan. Once the customer approves the deployed software, we will establish a
maintenance team to provide ongoing support to the customer (Pham, 2019).
Step 1: Start
Page 23
PROGRAMMING
Else
Step 5: Stop.
A flowchart is a visual representation of an algorithm that uses symbols to show the steps in a
process. It helps to make the algorithm easier to understand by presenting it in a diagram. To
illustrate this, I created a flowchart that demonstrates how to determine if a number is even or
odd.
Page 24
PROGRAMMING
Page 25
PROGRAMMING
Preprocessor
The C/C++ program is first processed in the preprocessor before compilation. The preprocessor
includes header files and expands macros.
Compiler
The second stage of the process is complier where the output file is created during the
preparation step and sent to the compiler. The compiler compiles the program, checks for errors
and generates the object file, which contains assembly code.
Linker
Page 26
PROGRAMMING
In this third stage, a linker merges multiple object files or libraries and creates an executable file.
Loader:
At this point in the procedure, the loader loads the executable file into main memory so that the
program may run (Jaiswal, 2022).
Understanding the Requirements: The first and most important stage is to obtain an extensive
understanding of the project's specifications. Collaboration with stakeholders, such as customers
or product owners, is required to acquire precise information on the intended functionality, user
expectations, constraints, and any unique business laws or regulations that must be taken into
account (Study.com, 2003).
Designing a solution: Once the needs are understood, the following step is to design the
solution. Structuring the solution necessitates forming a high-level design or framework design
that depicts the general structure, components, and associations of the software. This can
incorporate making diagrams, flowcharts, or other visual representations to arrange the code
composition and recognize the connections between various modules or classes (Study.com,
2003).
Implementing the Code: Once the design is complete, the coding phase may begin. Developers
produce code according to their preferred programming language, transforming the design and
requirements into instructions that may be executed. This stage includes identifying the proper
data structures, algorithms, and programming paradigms required for achieving the needed
functionality. Code is often produced in a text editor or an IDE (Study.com, 2003).
Testing and Debugging: After writing the code, it is required to be thoroughly examined in
order to verify its precision and reliability. Testing entails writing test cases which address
various situations and edge cases with the aim to ensure that the code performs as intended. Unit
testing (testing individual components or functions), integration testing (testing component
interaction), and system testing (testing the complete system) are all part of it. Any errors or
problems that develop during testing are acknowledged and resolved through debugging, which
includes looking into and repairing the code to eliminate errors along with improving
performance (Study.com, 2003).
Iteration and maintenance: After the code has been properly developed and tested, the program
can proceed to a maintenance phase. This encompasses tracking, updating, and improving the
code for the purpose to respond to user feedback, solve issues, strengthen performance, and
Page 27
PROGRAMMING
Problem faced
When converting a designed algorithm into program code, there are several possible challenges
that one may face. Some of these challenges include:
• Identifying the appropriate data types and structures provided by the selected
programming language to represent the data used in the algorithm.
• Recognizing the appropriate control structures, such as loops, conditionals, and functions,
required to operate the algorithm in the selected programming language.
• Guaranteeing the efficiency and optimization of the computer code, this may need the use
of specialized data structures and methods.
• Debugging the program code, particularly when the algorithm is intricate, this might
necessitate the use of debugging methods and tools.
• The use of comments and other documentation tools may be necessary to make the
computer code readable and well-documented.
In short, the conversion of a proposed algorithm into computer code necessitates careful
consideration of a number of variables, including data types and structures, control structures,
optimization, debugging, documentation, security, compatibility, and coding standards (Manelli,
2020).
Every variable defined in Java has its own scope. This means that the variables' visibility and use
must be confined within the scope. A local variable is viewable from the beginning of its
declaration to the completion of the method or portion of code in which it is stated. Declaring a
variable close to its potential use is a useful strategy. This not only upgrades the accessibility of
code but also simplifies debugging ( Debnath, 2019).
Page 28
PROGRAMMING
Class Field
Methods in Java either belong to a class or an interface. As a result, there's a probability that the
programmer unintentionally using the same named local variables the same as class member
variables. The Java compiler, on the other hand, is able to distinguish the appropriate one from
the scope. Furthermore, contemporary IDEs are intelligent enough to detect the conflict.
However, it is the job of the programmer to be vigilant and prevent such conflicts since it can
lead to undesirable outcomes. The following code example display how competing variable
names might result in drastically different results ( Debnath, 2019).
Page 29
PROGRAMMING
Standard Libraries
Java is renowned for its extensive range of libraries. Although not all libraries are perfectly
designed, they are usually satisfactory. Java regularly introduces new libraries and continuously
enhances the existing ones. Hence, one should make the most of classes, methods, interfaces,
Enums, and annotations from the library whenever feasible ( Debnath, 2019).
In Java, a variable declared can be used multiple times. This means that local variables which are
non-final declared in the method arguments can also be used with different values. However, this
practice is not recommended due to the fact that the variable sent as a method argument is
supposed to keep its initial value which is the value that the method will work with ( Debnath,
2019).
Algorithm
Step-1: Start
Step-5: Stop
Page 30
PROGRAMMING
Flowchart
Pseudo Code
START
DECLARE length, breadth
READ length, breadth
Area = length * breadth
PRINT "Area of rectangle is ", area
STOP
Now let’s write the program of above algorithm and pseudo code.
Page 31
PROGRAMMING
To calculate the area of a rectangle in C++, Java, and Python, you need to define variables for
the length and width of the rectangle. Once you have the length and width values, you multiply
Page 32
PROGRAMMING
them together to obtain the area. The result of the multiplication is then stored in a variable
called 'area'. Before executing the computation, make sure that the length and width values have
previously been supplied or retrieved from the user. By modifying the length and width values,
you can calculate the area of different rectangles.
Computer programs are collections of instructions that instruct a computer how to execute a
particular task. Python, Java, C++, JavaScript, PHP, and Ruby are few of the programming
languages that are used to create computer applications. Humans are able to comprehend these
languages with ease because of their design. Programs are able to handle user input, alter that
information, and produce data in a way that is valuable to people. Algorithms act as a roadmap
for programmers during the development of programs. They provide precise and step-by-step
instructions for writing code by concentrating on the solution. This makes it easier to translate
the algorithm into a specific programming language. Algorithms help programmers solve
problems and write optimized code, and they vary depending on the programming language
used. Algorithms are essential in simplifying and streamlining the process of creating programs
(Singh, 2023).
Page 33
PROGRAMMING
Source Code Editor: A source code editor is a specialized program created to make writing
code easier. It offers a range of programming-related features, such as syntax highlighting, which
demonstrates different parts of the code in different colors, language-specific auto-completion,
which fills in code snippets or functions as the developer types, and bug checking capabilities,
which can be used to highlight errors or potential problems in the code as it is being written.
Debugger: Debugger: a software program used to test other applications and illustrate
graphically where an issue exists in the source code.
Code Completion: Some IDEs consist of automated code completion technologies that can
intelligently recognize and insert common code components, minimizing the possibility of
mistakes and defects and saving developers time when acquiring code.
Programming Language Support: IDEs usually have been built to interact with a single
programming language, however some may support multiple languages. When considering
IDEs, it is fundamental to consider the programming languages you want to utilize (Allaire,
2012).
Logical mistakes might appear throughout the development process when the code fails to
produce the expected outcomes or operates in an unforeseen way. Logical errors can be
identified and corrected by adjusting the algorithm or making the required modifications to the
code through investigating the code and the values of variables at various stages. The calculate
Average function in this code computes the average of an array of values. Although there exists a
logic error in the average computation. It fails to manage the scenario when the value of the
count parameter is identical to zero, which could arise if the array is null (JavatPoint, 2021).
Page 34
PROGRAMMING
The calculate Average function in this code computes the average of an array of values.
Although there exists a logic error in the average computation. It fails to manage the scenario
when the value of the count parameter is identical to zero, which could arise if the array is null.
To address this issue, we must include a condition that checks if count is larger than zero before
conducting the division operation.
Page 35
PROGRAMMING
We added an if statement to the revised code to ensure if the count is larger than zero before
executing the division operation to determine the average. If count is 0, the division operation
cannot be performed to avoid dividing by zero.
Page 36
PROGRAMMING
The logical mistake was present in the original code in the recursive call to the factorial function.
Instead of decrementing n by one, it was accidentally increased by one. As a result, an endless
recursion and inaccurate factorial computation occurred.
Page 37
PROGRAMMING
Activity 3
Apache NetBeans is the chosen IDE for my project. Apache NetBeans is a flexible and durable
Integrated Development Environment (IDE) capable of providing a full collection of software
development tools. It is an open-source IDE that supports a broad range of programming
languages, including Java, C/C++, PHP, and HTML. NetBeans presents an easy-to-use and
flexible interface that is suitable for both beginner and skilled developers. Its concentrates on
Java programming which enables advanced code editing, code refactoring, and smart code
completion. It additionally includes project management features, version control integration,
Page 38
PROGRAMMING
and an integrated debugger for quick debugging and troubleshooting. On the whole, Apache
NetBeans is a fully featured and flexible IDE that provides the tools and capabilities required to
allow the development of the Best Fitness application, facilitating developers to produce efficient
and maintainable code while exploiting all the benefits of an integrated development
environment.
Debugging
Figure 34 Debugging
Debugging is the procedure of recognizing and fixing logical or syntactical errors in a computer
program. A debugger is software which assists in this entire process. A software developer could
employ a debugger to browse through a program's code and inspect variable values, to identify
errors. Software developers are able to debug a program using a wide range of techniques, such
as utilizing a debugger or exploring crash reports (Halipern & Santhanam, 2002).
Page 39
PROGRAMMING
Process of Debugging
During the development stage, software programs are subjected to extensive testing, upgrading,
debugging, and maintenance. In general, defects and faults in software are frequently eliminated.
Debugging is the process of maintaining a software issue. The various steps involved in the
debugging process are mentioned below
Identifying the error: An inaccurate error identification could result in wasted time in
development. It is frequent for users to report production errors that are challenging to figure out,
and sometimes the information we receive is inaccurate. It is significant for identifying the actual
error (JavatPoint, 2021).
Find the error location: After successfully identifying the errors, you have to browse through the
code to figure out the specific location of the error. At this point, you should concentrate on
detecting the problem rather than understanding it (JavatPoint, 2021).
Analyze the error: In the third phase, analyzing the code and applying a bottom-up technique that
begins with the error location. This assists in recognizing the error. Analyzing an error has two
basic goals: identifying other faults around the issue and ensuring that any collateral damage is
not included into the fix (JavatPoint, 2021).
Page 40
PROGRAMMING
Prove the Analysis: Once you've completed examining the original issue, you must check for any
other errors that might appear on the program. This stage includes developing automated tests for
those areas utilizing a test framework (JavatPoint, 2021).
Cover Lateral Damage: At this step, you must develop or gather all unit tests for the code that
will be changed. If you execute these unit tests now, they should all run (JavatPoint, 2021).
Fix & Validate: The final procedure involves fixing all errors while executing all test scripts to
verify if they all pass (JavatPoint, 2021).
The chosen IDE for this project, Apache NetBeans, suggests a wide range of strong debugging
options that can assist developers in figuring out and solving errors in their code. NetBeans
provides the following important debugging features:
Breakpoints
A breakpoint causes the debugger to stop functioning at a specific code location within the user's
application, providing them with control of the debugger. A breakpoint pauses the execution of a
program to make sure you can examine the program's internal functioning. Before you activate
the debugger, you have to setup a minimum of one breakpoint to pause execution of the program.
Set a breakpoint at the main () function's call by clicking on the line containing main ()'s left-
margin. In the left margin, a red circle or a triangle with an inverted shape appears, indicating
Page 41
PROGRAMMING
that a breakpoint has been placed at that line. Breakpoints are by far the most popular form of
debug event utilized by developers (JavatPoint, 2021).
Figure 37 Breakpoints
Variable Inspection
Developers in Apache NetBeans have the capability to look over variable values during
execution, which means they can investigate variable values while the application is executing.
This capability is crucial for understanding the way the program functions and tracking variable
changes in value while the code is being executed. Overall, NetBeans' ability to monitor and
adjust variable values during runtime gives developers significant insights into the execution of
their code and aids in the identification and resolution of errors or unexpected behavior. It
provides a dynamic and interactive method to debugging, allowing developers to fine-tune their
code and guarantee that their applications provide the expected results (JavatPoint, 2021).
Exception handling
An exception is a type of error that can occur during the run-time of a program, interrupting its
usual flow. Java Exception Handling is a flexible and object-oriented method of handling
exception circumstances. Exceptions in Java can occur as an outcome of a variety of events,
including inaccurate information entered by the user, a hardware issue, network connection
failure, or a database server that is unreachable. Exception handling refers to the code that
describes what to do in certain exception conditions (JavatPoint, 2021).
In our code, we utilize the try-catch block for handling exceptions. To handle exceptions, try is
at the beginning of the block and catch is at the end of the try block. With a try block, we may
have multiple catch blocks. The try-catch block can also be nested. An argument of type
Exception is required by the catch block.
Page 42
PROGRAMMING
Stepping
In debugging, stepping refers to the process involving execution of code one instruction or line at
a time. The programmer is able to verify the current state of the program, machine, and relevant
data before and after a certain line of code is implemented. This permits the programmer to
determine the impact of each line or instruction separately and obtain insight into the executing
program's behavior (or misbehavior) (JavatPoint, 2021).
Page 43
PROGRAMMING
Debugging is the procedure of recognizing and fixing logical or syntactical errors in a computer
program. A debugger is software which assists in this entire process. When developers recognize
bugs, they have to determine the errors in their newly generated code statements and attempt to
correct them. As a result, developers should see bugs as a learning opportunity. Debugging is a
vital ability for developers. The more time developers dedicate to debugging, the better they
achieve. Developers who debug regularly are certain to learn many beneficial skills. The more
adept engineers become at acquiring new skills, the easier it will be to correct flaws in their code.
Debugging promotes the developer minimize unnecessary and imprecise information.
The debugging process occurs immediately as the software code is developed. The procedure
then proceeds in phases as code gets combined with further programming components to result
in a software product. It promptly reports an in-error state. This permits for earlier identifying of
errors and renders the software development process stress-free and trouble-free.
It also delivers the most useful information concerning data structures and facilitates
understanding. Developers are able to create safer and more robust software that are less
susceptible to errors by utilizing debugging techniques and tools (Halipern & Santhanam, 2002).
Page 44
PROGRAMMING
Activity 4
Figure 40 IDE
Page 45
PROGRAMMING
Login Page
A login page is an essential component of software programs and websites that authenticates
users. It generally includes areas for entering a username/email and password, as well as a
"Remember Me" option, a "Forgot Password" link, a "Sign In" button, and a "Sign Up" link. It
affirms safe system access and shows error alerts as needed. The main objective of it is to
authenticate users and allow access based on valid credentials.
Page 46
PROGRAMMING
When the correct information is entered, the login will be successful, granting the user access to
the system or application.
Page 47
PROGRAMMING
If we enter the wrong password then the message saying wrong username and password occurs.
Page 48
PROGRAMMING
Computer programs are collections of instructions that instruct a computer how to execute a
particular task. Python, Java, C++, JavaScript, PHP, and Ruby are few of the programming
Page 49
PROGRAMMING
languages that are used to create computer applications. Humans are able to comprehend these
languages with ease because of their design. Programs are able to handle user input, alter that
information, and produce data in a way that is valuable to people. Algorithms act as a roadmap
for programmers during the development of programs. They provide precise and step-by-step
instructions for writing code by concentrating on the solution. This makes it easier to translate
the algorithm into a specific programming language. Algorithms help programmers solve
problems and write optimized code, and they vary depending on the programming language
used. Algorithms are essential in simplifying and streamlining the process of creating programs
(Singh, 2023).
Simple to use: NetBeans provides a platform for developers who wish to construct applications
efficiently and intelligently by providing comprehensive code analyzers, editors, and translators
that are compatible with the most recent Java technology. It facilitates developers to use
sophisticated Java 8 language components to update programs efficiently and quickly ( Walker,
2021).
Rich development capabilities: NetBeans has comprehensive static analysis capabilities which
permit users to avoid the expenditures associated with problematic code. There is also a
NetBeans Profiler function that offers developers with expert advice regarding enhancing
application performance and memory utilization. It also assists users in developing dependable
and adaptable Java SE, JavaFX, and Java EE applications ( Walker, 2021).
Powerful Code Editor: The code editor of the system provides users with effective tools, code
templates, code generators, and coding advice for fast refactoring. Furthermore, users can
customize the system's capabilities with plugins and work with drag and drop tools for smart
development of GUI for PHP, JAVA SE, JAVA EE, Java ME, HTML5, and C/C++ ( Walker,
2021).
Page 50
PROGRAMMING
Coding Standard
Coding standards are recommendations and guidelines for creating consistent, high-quality code.
Consider coding standards to be principles, plans, and best practices for writing cleaner, clearer,
and error-free code. These serve as an organized framework for software developers to create
complex, highly functional code. Coding standards guarantee that each line of code is written
uniformly, readably, and effectively. This helps to make the code more accessible to developers
to figure out and to interact with, enabling software of greater quality. Coding standards
guarantee the all developers agree to identified guidelines. As a consequence, even inexperienced
developers may easily grasp, debug, and then update the code (Moonen & Boogerd, 2008).
Page 51
PROGRAMMING
and debug. Developers who implement consistent coding techniques may rapidly discover and
comprehend code parts, resulting in more rapid maintenance and less time spent on error
improvements or feature upgrades (Moonen & Boogerd, 2008).
Reusability: Coding standards recommend to reuse code. Developers provide code which is
more modular, detached, and independent of individual implementations by adhering to
predefined rules. This allows code components to be reused in other portions of the program or
in additional projects, saving development both money and time (Moonen & Boogerd, 2008).
Page 52
PROGRAMMING
References
Debnath, M., 2019. Top 10 Java Coding Standards. [Online]
Available at: https://www.developer.com/design/top-10-java-coding-guidelines/
[Accessed 05 06 2023].
Walker, A., 2021. What Is an IDE? How It Helps Developers Code Faster. [Online]
Available at: https://www.g2.com/articles/ide
[Accessed 05 06 2023].
Allaire, J., 2012. RStudio: integrated development environment for R. Boston, MA, 770(394), pp.
165-171.
Althar, 2021 . Building intelligent integrated development environment for IoT in the context of
statistical modeling for software source code. Multimedia Technologies in the Internet of Things
Environment, pp. 95-115.
Halipern, B. & Santhanam, P., 2002. Software debugging, testing, and verification. IBM Systems
Journal, 41(2023), pp. 4--12.
Page 53
PROGRAMMING
Moonen, L. & Boogerd, c., 2008. Assessing the value of coding standards: An empirical study.
In: 2008 IEEE International conference on software maintenance. Beijing, China: IEEE, pp.
277--286.
Sinha, P., 2021. Functional vs. Procedural vs. Object-Oriented Programming. [Online]
Available at: https://scoutapm.com/blog/functional-vs-procedural-vs-
oop#h_25645808410001614878426854
[Accessed 03 05 2023].
Study.com, 2003. How to Write a Program: Coding, Testing & Debugging. [Online]
Available at: https://study.com/academy/lesson/how-to-write-a-program-coding-testing-
debugging.html
[Accessed 04 06 2023].
Page 54
PROGRAMMING
procedural-object-oriented-and-event-driven-pa
[Accessed 4 5 2023].
Zhang, T. & Mao, S., 2019. An overview of emerging video coding standards. GetMobile:
Mobile Computing and Communications, 22(2023), pp. 13--20.
Page 55