Programming Paradigms: Procedural, Object-Oriented, and Event-Driven, Assignments of Programming Languages

Scenario: You have applied for a post as a trainee with a software development company and have been invited for an interview. You have been passed the presentation to demonstrate your problem-solving and basic programming skills. Now you are given a more challenging task to create a fully working, secure application that has been developed using an IDE and adheres to coding standards for a complex business problem. You will discuss a suitable problem with your mentor, list the user requirement

Typology: Assignments

2020/2021

Uploaded on 06/20/2022

ng-n-minh-anh
ng-n-minh-anh 🇻🇳

4.8

(26)

34 documents

1 / 65

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Higher Nationals in Computing
Unit 1: Programming
ASSIGNMENT 2
Learner’s name: NGUYEN NHAT MINHANH
ID: GCS200658
Class: GCS0905C
Subject code: 1618
Assessor name: PHAN MINH TAM
Assignment due: Assignment submitted:
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41

Partial preview of the text

Download Programming Paradigms: Procedural, Object-Oriented, and Event-Driven and more Assignments Programming Languages in PDF only on Docsity!

Higher Nationals in Computing

Unit 1: Programming

ASSIGNMENT 2

Learner’s name: NGUYEN NHAT MINH ANH

ID: GCS

Class: GCS0905C

Subject code: 1618

Assessor name: PHAN MINH TAM

Assignment due: Assignment submitted:

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level 5 HND Diploma in Computing

Unit number and title Unit 1: Programming

Submission date October 28

th

, 2021 Date Received 1st submission

Re-submission Date November 4

th

, 2021 Date Received 2nd submission

Student Name NGUYEN NHAT MINH ANH Student ID GCS

Class GCS0905C Assessor name Phan Minh Tam

Student declaration

I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that

making a false declaration is a form of malpractice.

Student’s signature

Grading grid

P2 P3 P 4 P 5 M2 M3 M 4 D2 D3 D

Assignment Brief 2 (RQF)

Higher National Certificate/Diploma in Computing

Student Name/ID Number:

Unit Number and Title: Unit 1: Programming

Academic Year: 2021 – 2022

Unit Assessor: Phan Minh Tam

Assignment Title: Application development with IDE

Issue Date: 27 September 2021

Submission Date:

Internal Verifier Name:

Date:

Submission Format:

Format:

● The submission is in the form of an individual written report. This should be written in a concise,

formal business style using single spacing and font size 12. You are required to make use of headings,

paragraphs and subsections as appropriate, and all work must be supported with research and

referenced using the Harvard referencing system. Please also provide a bibliography using the

Harvard referencing system.

Submission

● Students are compulsory to submit the assignment in due date and in a way requested by the Tutor.

● The form of submission will be a soft copy posted on http://cms.greenwich.edu.vn/.

● Remember to convert the word file into PDF file before the submission on CMS.

Note:

● The individual Assignment must be your own work, and not copied by or from another student.

● If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must

reference your sources, using the Harvard style.

● Make sure that you understand and follow the guidelines to avoid plagiarism. Failure to comply this

requirement will result in a failed assignment.

Unit Learning Outcomes:

LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an

analysis of a suitable Integrated Development Environment (IDE)

LO3 Implement basic algorithms in code using an IDE

LO4 Determine the debugging process and explain the importance of a coding standard

Assignment Brief and Guidance:

Assignment scenario

Scenario : You have applied for a post as a trainee with a software development company and have been

invited for an interview. You have been passed the presentation to demonstrate your problem solving and

basic programming skills. Now you are given a more challenge task to create a fully working, secure

application that has been developed using an IDE and adheres to coding standards for a detailed business

problem.

Tasks

You will discuss a suitable problem with your mentor and list the user requirements before designing,

implementing (coding) and testing a solution. You will create a report that should include:

● Introduction to your program (list of requirements and screenshots of program)

● Explain some of programming paradigms. Evaluate why and how your program use these (or some of)

paradigms.

● Explain the common features of an IDE should have and evidence of how the IDE was used to manage

the development of your code.

● An evaluation of developing applications using an IDE versus developing an application without using an

IDE.

● An explanation and evaluation of the debugging process in the IDE used and how it helped with

development.

● An explanation and evaluation of coding standards used in your program and the benefits to

organisations of using them.

The working application produced must also be demonstrated together with the presentation.

Case Studies

You can choose one of following case studies to implement

Hotel Management System:

A Hotel Management System is a software built to handle all online hotel activities easily and safely. This

System will give the hotel management power and flexibility to manage the entire system from a single

  1. The admin of the system can add new aircrafts, flights, and flight schedules. Admin can cancel any pre-

scheduled flight (all stakeholders will be notified).

Restaurant Management System

A Restaurant Management System is a software built to handle all restaurant activities in an easy and safe

manner. This System will give the Restaurant management power and flexibility to manage the entire

system from a single portal. The system allows the manager to keep track of available tables in the system

as well as the reservation of tables and bill generation.

  1. The waiter should be able to create an order for a table and add meals for each seat.
  2. Each meal can have multiple meal items. Each meal item corresponds to a menu item.
  3. The system should be able to retrieve information about tables currently available to seat walk-in

customers.

  1. The system should support the reservation of tables.

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO2 Explain the characteristics of procedural, object-oriented and event-driven programming, conduct an

analysis of a suitable Integrated Development Environment (IDE)

P2 Give explanations of what

procedural, object-oriented and

event-driven paradigms are; their

characteristics and the

relationship between them.

M2 Analyse the common features

that a developer has access to in an

IDE.

D2 Critically evaluate the source

code of an application which

implements the programming

paradigms, in terms of the code

structure and characteristics.

LO3 Implement basic algorithms in code using an IDE

P3 Write a program that

implements an algorithm using an

IDE.

M3 Use the IDE to manage the

development process of the

program.

D3 Evaluate the use of an IDE for

development of applications

contrasted with not using an IDE.

LO4 Determine the debugging process and explain the importance of a coding standard

P4 Explain the debugging process

and explain the debugging

facilities available in the IDE.

P5 Outline the coding standard

you have used in your code.

M4 Evaluate how the debugging

process can be used to help

develop more secure, robust

applications.

D4 Critically evaluate why a

coding standard is necessary in a

team as well as for the individual.

Table of Contents

  • Unit 1: ProgrammingASSIGNMENT
  • characteristics and the relationship between them................................................................................. P2. Give explanations of what procedural, object-oriented and event-driven paradigms are; their
      1. Procedural paradigm:.....................................................................................................................
      • 1.1 Definition:..............................................................................................................................
      • 1.2 Characteristics:......................................................................................................................
      1. Object – oriented paradigm:..........................................................................................................
      • 2.1 Definition:............................................................................................................................
      • 2.2 Characteristics of Object – oriented paradigm:...................................................................
        • 2.2.1 Class and Object:........................................................................................................
        • 2.2.2 Inheritance:................................................................................................................
        • 2.2.3 Encapsulation:.............................................................................................................
        • 2.2.4 Abstraction:................................................................................................................
        • 2.2.5 Polymorphisms:.........................................................................................................
      1. Event – driven paradigm:..............................................................................................................
      • 3.1 Definition:............................................................................................................................
      • 3.2 Characteristics:....................................................................................................................
      1. Relationship between Procedural, Object – oriented and Event – driven paradigms:..............
  • P3. Write a program that implements an algorithm using an IDE.........................................................
      1. Use case:........................................................................................................................................
      1. Coding:...........................................................................................................................................

M2. Analyze the common features that a developer has access to in an IDE:...................................... 46

1. What Is An Integrated Development Environment (IDE)?

2. Benefits of IDEs for programmers:

3. Basic features of popular IDEs:

4. Some of the most popular IDEs on the market today:

M3. Use the IDE to manage the development process of the program:

M4. Evaluate how the debugging process can be used to help develop more secure, robust

applications:............................................................................................................................................. 52

REFERENCES.............................................................................................................................................. 54

P a g e | 1

ASSIGNMENT 2 ANSWERS

P2. Give explanations of what procedural, object-oriented and event-driven paradigms are; their

characteristics and the relationship between them.

1. Procedural paradigm:

1.1 Definition:

 A new developer's initial programming paradigm may be procedural programming.

 Procedural programming is derived from structured programming, based upon the concept of the

procedure call.

 Procedural programming is a list of instructions to tell a computer how to run from the code.

Procedures are also known as routines, subroutines, or functions, simply contain a series of

computational steps to be carried out.

 Simply put, Procedural Programming involves writing down a list of instructions to tell the

computer what it should do step-by-step to finish the task at hand.

P a g e | 3

2. Object – oriented paradigm:

2.1 Definition:

 Object-oriented programming (OOP) is a computer programming model that organizes software

design around data, or objects, rather than functions and logic.

An object is a data field with its own set of characteristics and behavior.

OOP focuses on the objects that developers want to manipulate rather than the logic required to

manipulate them. This approach to programming is well-suited for programs that are large,

complex, and actively updated or maintained.

An object-oriented program's structure also makes it useful for collaborative development, where

projects are divided into groups. Code reusability, scalability, and efficiency are also advantages of

OOP.

 The first step in OOP is to collect all of the objects a programmer wants to manipulate and identify

how they relate to each other -- an exercise known as data modeling.

2.2 Characteristics of Object – oriented paradigm:

P a g e | 4

2.2.1 Class and Object:

Class : A group of objects that share common properties for the data part and some program part

are collectively called class. With the help of a class, an object's entire set of data and code can be

turned into a user-defined data type. Objects are type class variables. We can create any number

of objects that belong to

a class once it is defined.

Objects : In an object-

oriented system, objects

are the basic run-time

entities. They could be a

person, a place, a bank

account, a table of data,

or anything else the program needs to deal with. The object-oriented approach is based on the

idea of combining data and function into a single unit, which is referred to as an object. The term

objects means a combination of data and program that represent some real word entity.

Ex : Class and Object : C# programming language

Create an object called "myObj" and use it to print the value of color:

P a g e | 6

Ex: Inheritance: C# programming language

P a g e | 7

2.2.3 Encapsulation:

 Encapsulation is a process in which data members and member functions are bound together in a

single unit in C#. Because it will combine various types of data members and member functions

into a single unit, the class is the real-time example of encapsulation in c#.

 Generally, in c# the encapsulation is used to prevent alteration of code (data) accidentally from

the outside functions. In c#, by defining the class fields with properties, we can protect the data

from accidental corruption.

 If we define class fields with properties, then the encapsulated class won’t allow us to access the

fields directly. Instead, we need to use getter and setter functions to read or write data based on

our requirements.

Advantages of Encapsulation:

Data Hiding : The user will have no idea about the inner implementation of the class. It will not be

visible to the user that how the class is stored values in the variables. He only knows that we are

passing the values to accessors and variables are getting initialized to that value.

Increased Flexibility : We can make the variables of the class as read-only or write-only depending

on our requirement. If we wish to make the variables as read-only then we have to only use Get

P a g e | 9

2.2.4 Abstraction:

In c#, Abstraction is a principle of object-oriented programming language (OOP), and it is used to

hide the implementation details and display only essential features of the object. In Abstraction,

by using access modifiers, we can hide the required details of the object and expose only

necessary methods and properties through an object's reference.

 In object-oriented programming, a class is the perfect example of abstraction. In c#, we can create

a class with required methods, properties and we can expose only necessary methods and

properties using access modifiers based on our requirements.

 Data abstraction is the process of hiding certain details and showing only essential information to

the user.

P a g e | 10

 Abstraction can be achieved with either abstract classes or interfaces.

 The abstract keyword is used for classes and methods: Abstract class : is a restricted class that

cannot be used to create objects (to access it, it must be inherited from another class). Abstract

method : can only be used in an abstract class, and it does not have a body. The body is provided

by the derived class (inherited from).

Advantages of Abstraction:

 Abstraction makes code readable and simpler to understand. The codes are simple to understand

as the complexity of the code is hidden from the user.

 The size of the code is reduced as through abstraction we do not show unnecessary codes.

 If we don’t apply abstraction to codes then it is difficult to maintain the codes.

 Through abstraction, we simplify the representation of the Domain Model.

 Abstraction grouped the data of the same type together and separate different types.