E180419 1703958178377 347413 Programee
E180419 1703958178377 347413 Programee
Nationals in
Computing
Ms. MALEESHA
Assessor Internal Verifier
• Constructive?
• Linked to relevant
assessment criteria?
• Finding Y/
opportunities for
N
improved performance?
Y/
• Agreeing actions?
N
Y/
N
Y/
N
Remedial action
taken.
Give details:
Internal
Verifier Date
signature
Program Leader
signature (if Date
needed)
Date Received
Submission Date 1st submission
Assessor Feedback:
LO1. Define basic algorithms to conduct an operation and outline the process of programming an
a
Pass, Merit & Distinction Descripts P1 M1 D1
LO4. Decide the debugging process and explain the importance of a coding standard.
Resubmission Feedback:
* 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.
Action Plan
Summative feedback
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.
Assignment Brief
Unit Tutor
Assignment Title Design &Implement a GUI based system using a suitable Integrated
Development Environment
Issue Date
Submission Date
Submission Format
3. Presentation
With the gave system students should do a presentation to demonstrate the system that was
developed. Time distributed is 10 to 15 min. Student may use 5 to 10 PowerPoint slides while
doing the presentation, but live demonstration of the system is needed. Evaluators will also check
the ability to change and debug the system using the IDE.
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, …….
Fn = F n-1 + F n-2
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. Decide the steps involved in writing and executing a program and conduct 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.
Grifindo Toys is a small-scale Toy building company which is 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 freelance
software developer to build their payroll system.
Grifindo Toys Payroll System has five components and the specifications for the components
are follows,
1. Employee Component.
2. Salary Component
Admin should be able to input the date range to calculate the salary. The salary cycle’s
beginning 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 part and if the user enters something else
the system should display an error message.
The admin should be able to enter the nod of leaves an employee has taken with 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.
All the calculated No-pay-value, Base-pay-value and Gross pay value should be recorded in the
database under each employee for each month. This part 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
This part should allow the admin to change parameter values such as
Activity 3
Write the complete pseudocode for the salary part 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 be included
in those classes. Design a suitable database structure for keeping the data of the above
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
4.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 have described in the above scenario with
the database structure which has been designed in activity 3.
4.2 Examine debugging process and the features available in Visual studio IDE for
debugging your code more easily. Evaluate how you used the debugging process to
develop a more secure, robust application with examples.
4.3 Explain and outline the coding standards you have used in your application development.
Critically evaluate why a coding standard is necessary for the team as well as for the
individual
6. Accuracy - Code must produce correct and correct results while meeting established
requirements and expectations. All calculations, conditions, and operations must be
error- free.
7. Understandability - You should write your code so that you and other developers can
easily understand it in the future. Understanding will be meaningful remarks and simple,
intuitive reasoning.
10. Readability - Clear and consistent writing style is important for code. Code that is
easy to read and understand should have consistent formatting, naming conventions,
and indentation.
11. Correct output - The code must produce output that meets the specified
requirements and expectations. This requires thorough testing to ensure that your
code behaves correctly in different scenarios and can manage edge cases properly.
1.) Function Definition: - def Fibonacci(n): defines a function named Fibonacci that takes an
integer.
parameter n.
2.) Initialization: - a = 0 and b = 1 initialize the first two numbers of the Fibonacci sequence.
4.) Fibonacci Sequence Calculation: - The for loop iterates n - 1 times (specified by range (n - 1))
6.) Function Call: - Fibonacci (12) calls the function with argument twelve, showing that we
want to generate the first twelve numbers of the Fibonacci sequence.
1.) Function Definition (def fac(n): - The function fac is defined to calculate the factorial of
a given number n.
2.) Base Case (if n == 0:) - The function checks if n is equal to 0. If true, it returns
1. This is the base case that stops the recursion. The factorial of 0 is defined to be 1.
3.) Recursive Case (else:) - If n is not zero, the function returns n * fac (n - 1).
It multiplies n by the result of calling the fac function with the argument n - 1.
This is the recursive step, where the problem is broken down into smaller subproblems.
5.) Function Call (b = fac(a)) - The fac function is called with the user-entered value
6.) Print Result (print(b)) - The result of the factorial calculation is stored in the variable
1. Find a Problem
Finding and understanding the problem that needs to be solved is the first stage in the
coding process. To do this, it is necessary to have a thorough understanding of the specifications,
limitations, and expected outcomes.
Developing a solution is the next stage after finding the problem. This includes figuring
out the method or algorithm to use to address the issue. Examine several practical options and
decide which best satisfies the requirements.
3. Designing
The next stage is to plan the structure of the code when you have determined the answer
to the problem. This entails defining variables, classes, and functions as well as how they will all
interact. To solve the problem, you should also divide the problem into smaller components and
arrange how these will work together.
The next step is to start writing the code, which comes after planning and designing the
programme. In this step, the algorithm that was made during the design part is changed into a
certain programming language. It is important to follow the best coding practices, pay attention
to the structure of the language being used, and make sure the code is simple to read and keep up
to date. Different writers will be able to understand and use the code better in the future.
5. Testing
Testing is an essential step to ensure the proposed solution works as designed. It includes
checking the code with different inputs, including edge cases. For our example, testing would
involve supplying different lists of numbers and verifying that the average is calculated correctly.
6. Execution
After conducting thorough testing, the code has been considered ready to be run. This
includes running the program and seeing how it behaves. In our specific case, executing the code
involves inputting a list of numbers and then obtaining the average of those numbers through the
program's calculations.
Conclusion of steps
programming is more than just creating code; it is a complete process that integrates
problem-solving, meticulous planning, and thorough testing. This holistic method ensures not
only the creation of functional code but also its reliability and utility in practical situations. Each
step plays a crucial role in supplying a successful and effective solution.
1. Syntax Error - Syntax errors occur when the code violates the rules of a programming
language. These errors find by the compiler or interpreter during the compilation or
execution phase.
Syntax errors are mistakes in the structure of a program's code that prevent it from being
properly run. These mistakes appear when the rules of the programming language are not
followed, such as incorrect placement of punctuation, misspelled keywords, or improper use
of brackets and parentheses. When a syntax error occurs, the program will not run and an
error message will be displayed, showing the exact location and nature of the error.
2. Logical Error - Logical errors are more subtle and harder to find. They occur when there is a
flaw in the algorithm or the overall logic of the program, leading to unexpected behavior.
Logic errors, also known as conceptual errors, occur when a program runs correctly but
produces incorrect results due to a mistake in the logic of the code. These errors aren't
detected by the compiler or interpreter and can be difficult to identify and fix. They can come
from incorrect assumptions, flawed thinking, or faulty understanding of the problem being
solved.
Example: Incorrect conditional statements that do not produce the intended outcome.
5. Importance - Efficient time management ensures that projects are completed on time and
deadlines are met.
6. Variable Declaration - Variables are containers for storing data values in a program.
Variable declaration involves specifying the data type and name of a variable before
using it in the program.
8. Testing - Testing is an important stage in software development in which the code for
defects and its functionality is proven to verify it satisfies the defined criteria.
Initial Values
A=1
B=0
C=A+B=1+0=1
First Iteration (Output Column)
C (Output) is initialized as 0.
The values of A, B, and C are updated.
A=B=0
B=C=1
Later Iterations
The time complexity of the given Fibonacci code is O(n) because it uses a single loop that
iterates from 0 to n-1, and within each iteration, constant time operations are performed. The space
def fac(n):
if n == 0:
return 1
else:
return n * fac (n - 1)
b = fac(a)
print(b)
Time Complexity - The time complexity of this recursive factorial algorithm is O(n),
where n is the input number. This is because the function makes a recursive call for each value
from n to 1, and each call involves constant time operations.
Key Features
2. Procedural Programming
Key Features
3. Functional Programming
Key Features
4. Declarative Programming
Key Features
you build a system by using objects that have both data and the actions that can be
performed on that data. In a payroll system, for instance, there might be objects that stand for
workers, payroll data, and tax calculations. Each of these objects would hold the relevant data
and the methods for performing tasks related to that data. This method allows for a more
organized and modular system design.
Object-oriented paradigm is a way of designing and developing software systems based on the
concepts of objects, classes, inheritance, polymorphism, and encapsulation. It helps to create
modular, reusable, and maintainable code that can model complex real-world problems.
Event-driven architecture is a way of designing software applications where the various parts of
the system interact and share inf ormation through events. These events are captured,
Figure 5 Event driven.
communicated, and processed between various parts of the system, allowing for asynchronous
communication and task accomplishment. This approach allows the system to be more flexible
and scalable, as well as allowing for better decoupling of services.
Return
Method: Calculate Base Pay (monthly Salary, allowances, overtime Rate, number of Overtime
Hours)
Method: Calculate Gross Pay (base Pay, Hopevale, government Tax Rate)
Method: Display Results (employee, start Date, end Date, noPayValue, basePayValue,
grossPayValue)
-- Employee Table
);
Employed INT,
);
-- Settings Table
);
3. Choose a suitable project template (e.g., Console App or Windows Forms App).
Toolbox: -Developers can easily drag and drop controls onto design surfaces.
Error List - Allows developers to quickly find syntax errors or other issues.: Clicking on
an error in the list navigates directly to the corresponding code.
Property Window: -The Property Window allows developers to see and change the
characteristics of specific items. This can help them customize the behavior and
appearance of their code more easily and efficiently.
Code Editor: Supplies syntax highlighting, auto-completion, and error checking for
efficient coding.
Version Control Integration: Supports collaboration and tracking changes in the codebase.
Built-in Tools: Offers tools for unit testing, profiling, and performance analysis.
GUI Design: For Windows Forms or WPF applications, Visual Studio supplies a drag-
and- drop GUI designer.
Visual Studio, a widely embraced IDE, is renowned for crafting GUIs tailored to
Windows applications. The GUI's primary aim is to supply a user-friendly interface, enhancing
the overall user experience. With drag-and-drop functionality, pre-built controls, and
customizable templates, Visual Studio aids developers in the intricate process of GUI design and
implementation. Its versatility is highlighted by extensive support for programming languages
like C#, Visual Basic, and C++. This comprehensive suite of resources streamlines the creation
of visually captivating and user-intuitive interfaces for Windows applications.
endance tracking. Users receive help from a seamless interface where they can effortlessly insert
and update dates, easing efficient management of employee attendance. The system ensures user
convenience with a convenient 'exit-back' function.
Key functionalities include the ability to add and manage employee details, ensuring a
comprehensive database. The calculation of salaries is simplified through the inclusion of a
'calculate value' button, allowing for the swift determination of No Pay, Base Pay, and Gross
Pay. Branch details further enhance the system's versatility, The Report page serves as a valuable
tool for employees to communicate problems, the Settings page empowers administrators to fine-
tune the Gracindo Payroll System according to the evolving needs of the organization.
It seems like you're referring to the process of starting a debugging session in VS. When you're
working on a software project in Visual Studio, you can use the "Start Debugging" button (often
represented by a green arrow) in the toolbar to run your application in debug mode. Pressing F5
on keyboard
Example of Debugging
an issue with the calculation of Gross Pay for employees. The Gross Pay is computed using the
formula.
The Gross Pay is displaying incorrect values, and the team has received reports
from users about discrepancies in salary calculations.
Gross Pay=Base Pay− (No Pay Base Pay Government Tax Rate)
1. Setting Breakpoints
3. Variable Inspection
5. Fix Implementation
6. Re-testing
Breakpoints are a powerful debugging feature that enables developers to pause the
execution of a program at a specific line of code. This aids in inspecting the program
state, variables, and finding errors more effectively.
When a program meets a function or method call, using "Step Into" allows you to jump into the
called function/method and inspect its behavior. This is particularly useful for understanding
how a specific function works and what happens inside it during execution. Step Into is a
valuable tool for debugging and troubleshooting code, as it supplies a way to track the flow of
execution and find any issues.
The "Error List" is a crucial tool for developers, supplying a comprehensive overview of
errors, warnings, and messages met during the compilation or build process of a project. It serves
as a combined view of potential issues within the code, “Error List" displays errors that occur
during the compilation or build process. These errors prevent the successful creation of an
executable program.
Coding standards, also referred to as coding guidelines or programming style guides, are a set of
rules and conventions that developers adhere to while writing code. These standards define the
structure, formatting, and organization of code to ensure a consistent and readable codebase. The
primary goals of coding standards include keeping code quality, enhancing readability, and
promoting collaboration among developers.
Descriptive variable names are names that are given to storage locations (variables) in a
program. The aim is to choose names that clearly and accurately describe the content or purpose
of the variable.
Descriptive method names are names that are given to functions or procedures in a
program. These names should clearly communicate the action or operation that the method
performs. In other words, the name of the method should describe what it does in a clear and
understandable way. This makes it easier for other programmers to understand and use the
method in their own code.
// consistent indentation //
Consistent indentation is crucial for readability and understanding the code, as it helps to
clearly find the scope of different elements such as loops, conditionals, and functions. It also
makes the code easier to keep and change, as it supplies a clear visual representation of the
code's structure. In C#, it is common to use four spaces for each level of indentation.
Commenting Practices
// Commenting Practices //
Commenting practices entail inserting descriptive comments within code to offer explanations,
clarifications, or context for different sections. These comments function as a type of
documentation, aiding developers in understanding the code's functionality, logic, and purpose.
Here's a brief overview of commenting practices.
Coding standards give developers a set of rules they can consistently adhere to, which
simplifies the task of keeping code quality. This guarantees that throughout time, the codebase
will continue to be stable and compliant with best practices.
Debugging becomes easier and bug resolution happens more quickly when coding
standards are followed. A more effective development cycle is eased by developers being able to
quickly detect and address problems thanks to consistent coding methods.
Following coding guidelines makes it easier for businesses to follow industry rules and
official code guidelines. This is particularly important in industries where compliance with
certain standards is needed for certification or legal reasons.
Code security is greatly enhanced by coding standards. Development teams can lower the
risk of security breaches and guarantee the confidentiality and integrity of the code by
proactively addressing potential vulnerabilities and integrating safe coding practices into the
standards.
Adhering to coding standards can lead to faster time-to-market and lower costs. Maintaining
a standardized codebase saves time and resources needed for continuous development and
upgrades. It also quickens the development process, which enables products to hit the market
sooner.
1. Readability and Clarity: - Coding standards improve the readability and clarity of
code.
People can navigate and understand well-formatted, consistent code with ease.
10. Adaptability to Change: - Code is flexible due to coding standards. Code is easily
extensible and modifiable by anyone, allowing it to adapt to changing project
requirements.
4. Shorter Learning Curve for New Developers: - When coding standards are followed,
new developers can rapidly become up to speed with the codebase. As a guide, the
standardized processes lessen the learning curve for new employees.
8. Effective Onboarding Procedure: - When coding standards are followed, new team
members can integrate into the development process more quickly. It supplies a defined
set of guidelines and expectations, which eases their ability to contribute successfully.
10. Consistent Outcome and Quality Assurance: - Coding standards play a part in overall
quality assurance. By ensuring that the team consistently delivers high-quality code, they
lessen the possibility of errors or inconsistencies being introduced.