Task 1 – P1 1 – Unit 15
Create a leaflet to
explain the key feature of
OOPs
, Discrete, Reusable Units of Programming Data Abstraction Classification
Logic
This is where you represent data that is needed Classification is the task of abstracting the
Discrete code is where its not within the main without presenting details, it is also possible to classes, this means defining group commonality.
program it does a function on its own. As an create user defined data types. Data Abstraction If we were to have an example, it would be to
example, this could be a “power” button on a is about giving details only the relevant features, do with Pets in an animal shelter; you would
remote it only turns the remote on and off and deciding of what should be in the class and what have to create a class for Dogs, Cats, Lizards
doesn’t affect anything else. shouldn’t. etc. But when making these classes we need to
think of things these have in common, for
Reusable units of programming, this is where As an example, we could use a mail order
example there could be ‘reptiles’, ‘Bigger
you develop commonly used classes and business that has customers and staff. Some of the
Animals’ and many more. These classes could
abstract classes. It is possible to “bolt” these data needed to identify the employee would be:
even have an overall class called ‘Pets’ or
into any project so that you can use them over PayrollID, Name, Address, Phone, Salary. Then in
‘Animals’.
and over without having to re-write it. comparison a customer would have something
similar: CustomerID, Name, Address and Phone. The point of classification is that it specifies
Identification of Objects (Identification of what class is what and what can be put into the
In a procedural system these groups of data
Classes) different class depending on its type. The
would be represented as separate groups of
classes can be categorized for other things as
data.
When identifying the different classes that are well not just animals.
needed within a program, you need to
Modularity
consider the different ENTITIES that are Classes, Methods and Message Passing
needed.
This is the concept of “chunking” the software
Classes are needed in a program the reason
The general idea: design and development into multiple smaller,
for this is ENTITIES need to be identified.
manageable parts. This means that it is easier to
• the classes are NOUNS, Classes are needed to organize the code so
maintain the software and it is easier to work on
• the properties are the Attributes, i.e. that they have different variables that can be
and contribute extra features.
sort of like ADJECTIVES, used effectively. Methods, in an OOPs
• the methods are VERBS ie contain the When splitting your object, it allows you to program is a subroutine which is associated
actions or behaviors of the object. control different parts of the object on their own with a class. A method controls an object.
and it will make sure nothing else moves on the When using methods, it allows you to control
When considering these you can visualize it in a your object in many ways which makes your
entire project.
different way or as a diagram as an example. work a lot faster. Message Passing, is simply
Where the NOUNS become ACTORS and the
“use cases” are the specific processes. When the way that the form communicates sending
using a “use case” there are different symbols and receiving information by the objects in the
involved so that it can be understood easier. same way people exchange information