logo

BTEC HND in Computing | Assessment 1

   

Added on  2022-10-04

29 Pages4465 Words45 Views
Running head: BTEC HND in Computing
BTEC HND in Computing
Name of the Student
Name of the University
Author Note

BTEC HND in Computing1
LO1
Description of algorithm:
It is a description of the rules and logic that is considered for solving a problem through
programing and for this, the required code is implemented according to this algorithm in the
provided programing language according to the requirements.
Algorithm for the solution for the provided for the commission and total salary calculation
problem;
Start
Declare the global salary variable with the value=32000
Ask input for the operation to be carried out
1 for Calculate salary
Exit for exit the program and stop the execution of the game.
If choice 1
Ask the user to enter sales amount
If sales < 500.00:
Return rate = 0
Else if sales >= 500.00 and sales <= 2000.00:
Return rate = 0.05
Else if sales >= 2000.00 and sales <= 5000.00:
Return Rate = 0.09

BTEC HND in Computing2
Else if sales >= 5000.00 and sales <= 10000.
Return Rate = 0.13
Else:
Return Rate = 0.20
Calculate total pay
Pay=(pay*rate)+salary
Print(Total salary , pay)
If choice ==2
Exit program
LO2
Differences and similarities between procedural, object oriented and event driven
programming paradigms:
The programing paradigm refers to the style of programing and it is nothing but an
approach of solving problems while analysing and defining the problem in different way (Liu
and Petersen 2019). There are different programing paradigm, each of them refers to different
problem solving approaches, and therefore there are significant differences between these
programing paradigms, which are described in this context. Some of the important
differences between these programing paradigms are the followings:

BTEC HND in Computing3
Event Driven Programming
Paradigm
Procedural Programming Paradigm
Object Oriented
Programming
Paradigm
Graphical user interface is provided
which allows to create the programs.
Character user interface is provided for
writing the commands.
Modules are written
through the commands
that are provided in this
programing paradigm.
Actions, which are defined in the
program, depends on events. These
events are initiated by different
means, which include mouse clicking
and moving, or keyboard strokes.
Commands, which are written in linear
fashion, are executed in linear fashion
as well. Therefore, both deigning and
execution of code follows linear
approach.
Objects and functions
that are considered for
interaction are required
for performing the
specific tasks (Yates
2016).
Proper Attention is provided in
choosing user interface. Therefore,
appropriate selection of the user
interface is an important requirement
in this programing paradigm.
It provides context for executing steps
of the program in proper sequence and
therefore sequential execution of steps
is one of the important features of this
programing paradigm (Liu and Petersen
2019).
It provides attention to
objects or data and it is
considered for increasing
security that allows to
ensure that it is secured
from unauthorized
access so that anyone
who does not have the
authority are not
allowed to access the

BTEC HND in Computing4
object or data
Most common languages that are
associated with this paradigm are
Visual Basic and C#.
Most common languages that are
associated with this paradigm are Basic,
Fortran and COBOL.
Most common languages
that are associated with
this paradigm are
Smalltalk, C++ and
JAVA.
The common features a developer can have access to IDLE:
Some of the common features, which develop, could access in IDLE are the followings:
It is coded in 100% python and it integrates the tkinter GUI toolkit
It provides cross-platform facilities and the performance is similar on Windows, Unix,
and macOS
Code input, output and error message are describe in colour
It provides multi-window editor that offers multiple undo, Python colorizing, smart
indent, call tips, auto completion, and other features (Liu and Petersen 2019).
it provides search facility within any window, replace within editor windows, and
search through multiple files (grep)
it provides debugger that offers persistent breakpoints, stepping, and viewing of
global and local namespaces
it provides configuration, browsers, and other dialogs
LO3
Program for calculating the salary of the employees;

BTEC HND in Computing5
def main():
print('What would you like to do: ')
print('1.Calculate salary')
print('exit')
while True:
choice = input('Enter a Choice: ')
if choice == "1":
salcalc()
else:
break
def salcalc():
sales = 0.0
commissionRate = 0.0
salary=32000
totpay = 0.0
monthSales = 0.0
sales = getSales()
commissionRate = determineCommissionRate(sales)
totpay = (sales * commissionRate) +salary
print('The pay is $', format(totpay, '.2f'))

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Case Study: Wage Commission Application Development
|28
|5209
|493

Diploma in Computing Assignment PDF
|29
|2639
|216