# Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE).

Unit 01: Programming - Higher National Diploma in Computing

Assignment - Design and Implement a GUI based system using a suitable Integrated Development Environment

Learning outcome 1. Define basic algorithms to carry out an operation and outline the process of programming an application.

Learning outcome 2. Explain the characteristics of procedural, object-orientated and event-driven programming, conduct an analysis of a suitable Integrated Development Environment (IDE).

Learning outcome 3. Implement basic algorithms in code using an IDE.

Learning outcome 4. Determine the debugging process and explain the importance of a coding standard.

Activity 1

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, ........
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation.
Fn = F n-1 + F n-2

B. Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example, factorial of 6 is 6*5*4*3*2*1 which is 720.
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. Determine the steps involved in the process of writing and executing a program and carry out 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.

Activity 2

2.1 Compare and discuss what is meant by a Programming Paradigm and the main characteristics of Procedural, Object oriented and Event-driven paradigms and the relationships among them. Write small snippets of code as example for the above three programming paradigms using a suitable programming language(s) and critically evaluate the code samples that you have given above in relation to their structure and the unique characteristics.

Activity 3 and Activity 4 are based on the following Scenario.

Grifindo Toys is a small-scale Toy building company which is located 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.
Specifications for the payroll system as follows,

Grifindo Toys Payroll System mainly contains five components and the specifications for the components are follows,
1. Employee Component.
• Admin should be able to register employee details to the system (including monthly salary, overtime rates-hourly, allowances).
• Admin should be able to update all employee details in the system (Update and Delete including monthly salary, overtime rates-hourly, allowances).
• Admin should be able to view individual employee details, view all employees details, search employees.
2. Salary Component
Admin should be able to input the date range to calculate the salary. Salary cycle begin 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 component and if the user enters something else the system should display an error message.

The admin should be able to enter the no 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.
Base Pay need to calculate based on the following points,

Base Pay (Monthly Salary: salary_cycle_date_range, eg: 30 days): Each employee will be paid monthly
If any employee couldn`t cover salary_cycle_date_range (eg:-30 days) attendance the system should calculate the no-pay value according to the below mention formula,

No-pay-value = (Total_Salary/salary_cycle_date_range) *No_of_absent_days

Base Pay need to calculate according to the below mentioned formula
Base Pay value = Monthly_Salary + Allowances + (Over_time_rate*no_of_overtime_hours)
Gross Pay need to calculate according to the below mentioned formula
Gross Pay = Base_Pay_value - (No_pay_value + Base_Pay_value*government_tax_rate)

All the calculated No-pay-value, Base-pay-value and Gross pay value should record in the database under each employee for each month. This component 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 component should allow the admin to change parameter values such as
i. Date Range for a salary cycle. Eg:- 30 days
ii. Salary cycle begin date
iii. Salary cycle end date
iv. No of leaves for an employee for a year.

Activity 3

Write the complete pseudocode for the salary component 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 include in those classes. Design the 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 has described in the above scenario with the database structure which has 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 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.