Abstraction Mechanism Group 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Project Topic: Abstraction Mechanism

In Computer Science

Course: CSC 3113

Concepts of Programming Languages

Lecturer: Miss Awoyelu

Date: 23rd January, 2023

Presented by Group 2
Oyundoyin Temitayo E. (20N02055)

Okeke Divinefavor Maduabuchi (20N02042)

Oyewole Victor (20N02054)

Oni Olubolade T. (20N02050)

Odusanya Elizabeth (20N2039)

Rufus Utibe (20N02056)

Kayode Olabanji Daniel (20N02031)

Mbuba Chiagozie Tochukwu (20N02034)

Okoro Kelechi(20N02043)

OLADEJO SHITTU A. (20N02046)

Odewale David A. (20N02038)

Okwuagbor Ikechukwu Darlington (20N02044)

Obakpolor Emmanuel Osaro (20N02037)

Ogunlana Michael Justus (20N02040)

Famurewa Martins Agbolade (20N02029)

Ezeukwu Chukwudumebi (20N02028)

Ezenduka Samdave (20N02027)

Egworefa Lilian Ewomazino (20N02024)

Erobame Francis (20N02026TS)

Olanbiwoninu Oluwafarayolami (20N02047)


What is abstraction?

Abstraction is a mechanism to’ hide irrelevant details and represent only the essential features
so that one can focus on important things at a time; It allows managing complex systems by
concentrating on the essential features only

Abstraction in computer science is the process of removing elements of a code or program that
aren't relevant or that distract from more important elements. Abstraction refers to looking at
something to maintain the general form or meaning while reducing the presence of specific
details. Abstraction allows computer programmers and users to interact with the necessary
components without conceptualizing the entire computer system.

Abstraction is also used to create functions to camouflage most of the mechanisms driving the
function. That doesn't mean the process of abstraction is the same as encapsulation or
information hiding (i.e., simply putting the implementation details of a function behind an
interface). What makes abstraction useful in this context is that it allows developers to create
functions that can be updated or improved without disrupting the application and be used in
other places. For example, while driving a car, a driver only knows the essential features to
drive a car such as how to use clutch, brake, accelerator, gears, steering, etc., and least bothers
about the internal details of the car like motor, engine, wiring, etc.

Abstraction can be of two types, namely, data abstraction and control abstraction. Data
abstraction means hiding the details about the data and control abstraction means hiding the
implementation details. risk in software development.

What is data abstraction?

In programming, it's a good idea to not only separate data from functionality, but also reduce
the complexity of data. Data abstraction is the process of creating simple abstract data types,
or classes, to hide unnecessary details. Simplification makes different-but-related data types
with multiple attributes easier to access and manage, and gives different systems a common
language for talking about an object even if they act on that object in very different ways.

What is control flow abstraction?

Control flow is a way of describing the order in which function calls are executed. Code runs in
the order it's written unless a programmer introduces control structures like conditionals or
loops to change the order of execution. Control flow abstraction involves applying the
principles of abstraction to a set of operations. The program fragment is designed around a
function rather than its implementation in a particular application, so it's available for reuse.
Subroutines are a good example of control flow abstraction in action.

Specific Abstractions in Programming and Software


Development

 Programming languages and paradigms: Programming languages provide


different kinds of abstractions, mostly according to the application domains they are designed
for, and can be classified for their level of abstraction. Low-level languages, as assembly, are
close to machine languages (whose instructions are expressed only by binary digits and are
understood directly by the machines) and provide little or no abstraction from the details about
how the machine works. High-level languages instead are designed to be easily understood by
humans, and indeed they require to be translated into executable programs in order to be run
by machines.

 Procedural and data abstraction: When calling functions in programs we are


inter- ested in what the function does and not in the details on how it is implemented;
this is what is meant by the expression “procedural” (or functional) abstraction. The
user of the function does not have access to the details about the algorithms that
accomplishes the function: those details are ignored as non-essential, and abstracted
away; instead the user can trust the accuracy of the results and has only to know the
signature of the function (a convention that describes how to call it).
 Information hiding and abstraction layers: In procedural and data abstraction,
the user is unaware of the details about the function implementation or the internal
representation of data.This information hiding concept is pervasive in computer science. In
complex systems, such as an operating system or a network server, functionalities are
broken into multiple layers, so that each layer implements some functionality or service
that is provided to the layers above. The higher layers do not need to know any of the
details of the implementations in the lower layers, which are hidden to them. They only
need to know how to ask for that service. However, although details are hidden, they are
relied upon, and dealt with in different layers.

Examples of abstraction in computer science

In computer science, you might have a sort algorithm that works on linear data
structures (e.g., lists). You can sort array-backed lists, linked lists, or other lists. Your
list might be made up of five items or five hundred. The code isn't tied to specific use
cases, but to the idea of 'sorting'. Put simply, you don't have to code one sort algorithm
for five-item lists and another for five hundred-item lists because you've tied
functionality to an abstraction.

APIs are a type of abstraction you might be familiar with. An API is an intermediary that
allows applications to communicate but abstracts the details of what is being
communicated and how—simplifying the process of application-to-application
communication and providing a level of security.

You might also like