Unit six assignment 1
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

Unit Six Assignment 1 PowerPoint PPT Presentation


  • 154 Views
  • Uploaded on
  • Presentation posted in: General

Unit Six Assignment 1. Chris Boardley. Task 1. P1 - Describe the application and limits of procedural, object oriented and event driven programming paradigms. The Procedural Paradigm.

Download Presentation

Unit Six Assignment 1

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Unit six assignment 1

Unit Six Assignment 1

Chris Boardley


Task 1

Task 1

P1 - Describe the application and limits of procedural, object oriented and event driven programming paradigms.


The procedural paradigm

The Procedural Paradigm

Procedural programming basically uses a set of computational steps (procedures) in order to accomplish a specific task. This is a fast process and because of it’s simplistic approach, it is often the paradigm used when teaching programming to beginners due to it’s relatively simple logic.

When writing code for complex software, procedural programming would not be the preferred paradigm because the complex software would require many lines of code, making it an unwieldy and perhaps confusing way of coding.

Procedural Programming Languages can include –

  • C.

  • C++.

  • Fortran.

  • Pascal.

  • Basic.


The object orientated paradigm

The Object Orientated Paradigm

Object orientated programming focuses on using objects rather than procedures in order to accomplish a task. This can be beneficial because it is modular, which allows separate objects to respond to the same instruction differently. Also, it allows the programmer to alter specific objects without altering the whole program.

OOP has a steep learning curve, requires a lot of planning and consideration of the relationships between objects can be difficult to get used to. OO programs also tend to be larger in size, which can be a problem in some circumstances.

Object Orientated Languages can include –

  • C++.

  • Objective-C.

  • Smalltalk.

  • Java.

  • C#.

  • VB.


The event driven paradigm

The Event Driven Paradigm

  • Event driven programming is designed to react to events such as user inputs, usually mouse clicks or key presses. This allows for more intuitive and interactive programs to be created, especially when programing GUIs. EDPs also allow for easy communication between hardware and software.

  • The event driven paradigm is generally only useful when programming for GUIs due to it’s interactive and reactive nature, which renders it a fairly inflexible way of programming.

Event Driven Programing languages can include –

  • Any language can be used, but can be made easier by using a language that provides high level abstractions like FOCUS, Lisp, Perl, Python, Ruby, SAS and COBOL.


Task 2

Task 2

P2 - Describe the factors influencing the choice of programming language.


Factors influencing the choice of programming language

Factors Influencing The Choice Of Programming Language.

  • Reliability.

  • Expandability.

  • Suitability.

  • Organisational policies.

  • Availability of trained staff.

  • Development and maintenance costs.


Some advantages and disadvantages of different programming language

Some Advantages And Disadvantages Of Different Programming Language.


Some considerations when using visual basic

Some Considerations When Using Visual Basic

Positives

  • Easy to learn and understand.

  • Not only a language but also an integrated IDE.

  • Can be downloaded for free.

  • Extensive online help environment.

  • Includes a toolbox containing items such as buttons etc. which have built-in code, speeding up the coding process.

Negatives

  • Programs created in VB only work in Windows OS.

  • Requires a lot of memory to install due to its GUI nature.

  • Slower than other languages.

  • It’s basic nature makes it unsuitable for creating complex programs.

  • Inefficient for web development.


Some considerations when using c

Some Considerations When Using C++

Positives

  • Free to download.

  • Syntax is similar to those used in other languages e.g. Java.

  • Multi-paradigm friendly so can be used for procedural, OOP, generic programming, functional programming etc.

  • Fast compared to others.

  • There is a large community of programmers using C++ so there is a lot of available information and help.

Negatives

  • Complicated language so can be difficult to learn.

  • Overly complex and difficult to debug when used for web applications.

  • Mostly used for platform specific applications.

  • C++ is only 8-bit.

  • Can cost money to use certain compilers.


Some considerations when using darkbasic

Some Considerations When Using DarkBASIC

Positives

  • Can be downloaded for free.

  • Easy to learn.

  • Doesn’t require as much code as other languages e.g. C++.

  • Designed for creating 2d and 3d games, so excels in that area.

Negatives

  • DarkBASIC costs money to use without advertisements.

  • BASIC languages’ syntax is unique to BASIC only.

  • Is mainly focused on creating games, so isn’t very flexible regarding it’s functionality.

  • Not very fast.


Some considerations when using javascript

Some Considerations When Using JavaScript

Positives

  • Java is free.

  • Developed to be secure.

  • Cross platform compatible.

  • Quite easy to learn (compared to C++ for example).

  • Multithreaded, allowing for the program to perform different tasks simultaneously.

Negatives

  • Can be difficult to learn for someone with limited experience.

  • Needs C++ to create an .exe or .app.

  • Slow to develop and run.

  • Slow compiler.

  • Difficult to create frame based applications.


Some considerations when using html

Some Considerations When Using HTML

Positives

  • It is free to use.

  • Plain text is used so it is easy to learn and understand.

  • Easy to edit because it is plain text.

  • HTML is supported by (almost) all browsers, certainly more than any other language.

  • It is very search engine friendly.

Negatives

  • Limited security features.

  • It is a static language.

  • All pages must be edited separately.

  • No dynamic capabilities when used on its own.

  • Structuring can be difficult to learn.


Task 3

Task 3

P3 - Explain sequence, selection and iteration as used in computer programming.


Sequence

Sequence

An algorithm written in sequence will contain a series of steps. When the algorithm is run these steps will be executed in order from the first to the last without skipping any, because there is no method of selection and no available conditional branches. These algorithms will run the same way every time they are used, and will not respond to data.


Selection

Selection

An algorithm written in sequence makes use of boolean logic, true and false. In order for these algorithms to run there must be procedures to handle control structures, such as the words if, then, else, endif, switch and case. This allows for branches in programs to be created depending on what data is being manipulated.


Iteration

Iteration

Iteration algorithms make use of loops, doing something multiple times. Fixed loops will perform something a set number of times every time the program is run. Conditional loops will run until a condition is met, for example it will run until something becomes true or false etc. Another example of a loop is one that will perform a specific action whilst a condition is active, i.e. the loop will run whist a condition is true, and will stop looping when that condition becomes false.


Task 4

Task 4

P4 - Outline the benefits of having a variety of data types available to the programmer.


B enefits of having a variety of data types available to the programmer

Benefits of having a variety of data types available to the programmer.

Having a variety of different data types (such as strings, bytes, booleans, integers, dates, floating points etc.) can be beneficial when programming for a variety of different reasons. Some of these reasons are -

  • Having different data types allows you to store data without waste, making it more efficient.

  • Different data types have different maximum and minimum memory requirements, so data is stored using the least amount of memory possible.

  • Having different data types allows code and subroutine parameters to be more expressive.

  • Having different data types makes it harder to make mistakes i.e. if a number (integer/floating point) was accidently added into a line of text (string) it would produce an error. If this was not the case it could be a lengthy process trying to find the source of an error.

  • Having different data types makes it easier to check for and resolve coding errors before the code is implemented.

  • Having different data types allows you to write your code without having to re-implement standard data types.


  • Login