Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit Six Assignment 1 Chris Boardley.

Similar presentations


Presentation on theme: "Unit Six Assignment 1 Chris Boardley."— Presentation transcript:

1 Unit Six Assignment 1 Chris Boardley

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

3 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.

4 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.

5 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.

6 Task 2 P2 - Describe the factors influencing the choice of programming language.

7 Factors Influencing The Choice Of Programming Language.
Reliability. Expandability. Suitability. Organisational policies. Availability of trained staff. Development and maintenance costs. Reliability – Some programming languages are more reliable than others, and this is something that should be considered when choosing which language to use. A reliable program will be less likely to crash and will contain less errors. Ada is an example of a high level language that has built in tools and compilers that make programs written in this language more reliable. Expandability – Some systems are required to be used by many users at once, and some languages are able to cope with this demand better than others (PHP for example). Interactive websites need to be able to cope with a high number of users at once, but also need to work well when not dealing with a high capacity, so a language that can expand and scale well should be used. Suitability – The programmer needs to make sure that the language used will work well on the platform it is designed for. Programs written in VB will only run on Windows OS for example, so it would not be suitable if the program was being designed for any OS other than Windows. Also, the programmer needs to make sure that they use a language that has the features required to create the program, DarkBASIC is designed for creating 2d and 3d games, so it would not be suitable for web design for example. Organisational Policies – Some organisations choose to use certain hardware and software, and this should be taken into account when deciding upon a programming language. If a company is using MAC OS based equipment (because of preference or contractual arrangements) then using VB to create them a program would not be viable. Availability of trained staff – The programmer should consider using a language (when possible) that is popular and widely used, as this would make recruiting staff easier. C++ is quite a widely used and popular language at present, so there would be a lot of people available to hire that are trained in the use of C++ making it a desirable language to use. Development and maintenance costs – Some programming languages are available for free, and this should be considered when deciding what language to use, as generally the lower the costs the better. Also, some programs (RPG for example) have been designed so that they allow for quicker design and maintenance of programs, which will result in lower design and maintenance costs.

8 Some Advantages And Disadvantages Of Different Programming Language.

9 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.

10 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.

11 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.

12 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.

13 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.

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

15 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.

16 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.

17 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.

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

19 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.


Download ppt "Unit Six Assignment 1 Chris Boardley."

Similar presentations


Ads by Google