software design and development marcus hunt. application and limits of procedural programming...

7
Software design and development Marcus Hunt

Upload: pearl-gordon

Post on 24-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Software design and development

Marcus Hunt

Page 2: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Application and limits of procedural programming

Procedural programming is a powerful language, typically it has used for complex programs like scientific and engineering systems.

Procedural languages are languages like: C, C++ and Pascal.

When making large systems using procedural programming there is a risk of the code becoming confusing as more features are added to it.

Procedural programming typically runs through a series of instructions in a step by step method.

The code used in procedural programming will only be relevant to the problem you are trying to solve, this means that it would likely be difficult to reuse code. This is especially true when you may use new, efficient code. It would take a while to convert it without nothing breaking.

Page 3: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Application and limits of object oriented programming

Object oriented programs are typically much easier to make than procedural ones.

Object oriented languages include: Visual basic, C++ and Java.

Using OOP to make something such as a calculator is much easier since everything is treated as an object. Because of this it makes teaching a user new to programming much easier.

The objects usually interact with other objects to design applications and computer programs. Each object can receive messages, process data and send messages to other objects in the program.

An object can be data, this can be anything from: Numbers, strings or variables.

Page 4: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Application and limits of event driven programming

Event driven programming allows programs to respond to inputs such as a mouse click by the user.

The different environments come with everything you need to make a GUI application, all a user needs to do is supply the code.

The event driven paradigm is determined by the actions of the user and what they do with the program.

Event driven programming can also respond to events happening within the computer, this can be something such as a process using too much RAM, a programmer could respond to this by writing something in an EDP language which forces the process to close.

A limit of EDP is that if you have a lot of handlers listening for events it can use up a lot of CPU cycles which can slow the computer down.

Page 5: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Factors influencing choice of programming language

There can be a few factors when deciding on a language for a project.

It needs to be suitable for the task, if the program needs to work on multiple operating systems then you wouldn't choose something like Visual Basic. Something like C++ or Java is better suited but also more difficult to code in.

Obviously your own personal ability is vital when choosing a language, most programmers won't choose a language which they aren't comfortable, it will probably lead to the application taking twice as long to develop.

The language also needs to be reliable and rock solid. Languages such as C have been around a long time and you know that in a critical situation it isn't going to have any quirks that can lead to a system crash.

If multiple people are going to be looking at and modifying the source then it is important that they are able to understand, use of a high level language such as python can do this as it is fairly easy to read and understand.

Page 6: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Sequence, selection and iteration as used in programming

Sequence:

Sequence is the order in which an application will execute its code. In the case of procedural programming it will probably be line one, two, three etc.

Selection:

Selection is based on using booleans. This allows you to have branches in your program which would change how the program is run.

Iteration:

Iteration means to do something multiple times, this is normally either a fixed number of times or until a specified criteria is met.

Page 7: Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically

Benefits of having a variety of data types

There are many different types of data, these can vary from: Strings, integers, bytes, booleans, floating point and date.

Strings are a sequence of characters which are either constant or a variable.

Integers are able to hold 32 bit signed integers, it provides the best performance on a 32 bit processor.

Booleans usually have two values, either true or false. Use of booleans can select pieces of code depending if the condition is met.

Floating points have two different data types. Singles need 4 bytes of memory and doubles need 8, the singles can store significantly less than the doubles.

A byte holds eight bits, the bits can either be 0 or 1. The numbers can be 0 to 255.

The data types that store date are 64 bit integers that represent Jan. 1st to Dec. 31st. It can also change format depending on where you live.