Abstraction allows us to focus on essential details and suppress irrelevant details. It is one of the most important techniques for managing complexity in systems. There are five levels of abstraction in object-oriented programs ranging from viewing a program as interacting objects to considering individual methods in isolation. Forms of abstraction include specialization, division into parts, and multiple views. Understanding the history of abstraction mechanisms like procedures, modules, abstract data types, and objects provides context for object-oriented programming.
When designing a web application, drawing diagrams can help programmers understand the requirements of a project and test their mental model of implementation. UML diagrams can capture both application behaviors and data structures. Ones useful to web developers include the deployment, use case, sequence, and state diagrams. The best approach for using UML diagrams with modern web development methods like agile will also be discussed.
When designing a web application, drawing diagrams can help programmers understand the requirements of a project and test their mental model of implementation. UML diagrams can capture both application behaviors and data structures. Ones useful to web developers include the deployment, use case, sequence, and state diagrams. The best approach for using UML diagrams with modern web development methods like agile will also be discussed.
In this tutorial, we explore the most basic data structure in R, the vector. We cover everything from creating vectors to subsetting them in different ways.
In this tutorial, we learn to create variables in R. Followed by that, we explore the different data types including numeric, integer, character, logical and date/time.
An Introduction to the SOLID PrinciplesAttila Bertók
SOLID Principles are the most important principles of writing maintainable, easy-to-read, easy-to-write clean code. This presentation attempts to give a basic overview of these principles with some examples of violations and ways to correct them.
In this tutorial, we explore the most basic data structure in R, the vector. We cover everything from creating vectors to subsetting them in different ways.
In this tutorial, we learn to create variables in R. Followed by that, we explore the different data types including numeric, integer, character, logical and date/time.
An Introduction to the SOLID PrinciplesAttila Bertók
SOLID Principles are the most important principles of writing maintainable, easy-to-read, easy-to-write clean code. This presentation attempts to give a basic overview of these principles with some examples of violations and ways to correct them.
Is Abstraction the Key to Artificial Intelligence? - Lorenza SaittaWithTheBest
With this comprehensive breakdown of abstraction's multiple layers and components, we can understand and answer the question if abstraction is essential to artificial intelligence.
Lorenza Saitta, Università del Piemonte Orientale
Gael Fraiteur argues that multithreaded programming needs to be addressed at the right level of abstraction, with design patterns like Actor, Immutable, Freezable, Thread Affine, Reader-Writer-Synchronized. Design patterns form a language and serve as a model against which code can be expressed. Compilers must support design patterns to allow code to be deterministically validated against the model, and of course to generate the low-level instructions that would be otherwise written manually.
Digital Communication Power Tools: Speakers Notes versionMarilyn Herie
This Keynote presentation at the 2012 Ontario Association of Social Work annual conference outlines the "digital communication power tools" for social workers and other practitioners. Speakers' notes can be toggled on or off. This file provides the Speakers Notes that accompany the slides.
Networks and resourcing white paper by Business360 and TFPL December 2013TFPLltd
In recent years we have seen the growth of networks both as a means of locating talented professionals and also as a means for individuals to locate work opportunities
Building on prior studies, Business360 and TFPL decided to undertake some research to better understand how these networks are changing the interface between professionals and organizations
Our fields of work (Business360 as a provider of professional services delivered remotely, and TFPL as a provider of talent location, learning and consultancy services) means we have very different perspectives on this change:
Business360 has seen a growing acceptance by companies of the provision of professional services using individuals working remotely, with whom the companies often have limited communication
TFPL has seen the growing pressure that organizations face in trying to locate the talent they need, with highly specialized skills and competencies, as well as the innovations applied as they try to secure their ideal candidate
Il mausoleo di Ciano a Livorno - Rilievo digitale e ricostruzione criticaMattia Sullini
Il Mausoleo di Ciano avrebbe dovuto ospitarne le spoglie dopo la morte avvenuta nel 1939. Fu concepito da Dazzi e Rapisardi come un blocco massiccio sormontato da una torre-faro e da una statua colossale di 12m, cominciata ed ancora oggi visibile nella cava originaria all'Isola di Santo Stefano a La Maddalena. Nel 1944 il cantiere fu abbandonato anch'esso incompleto, ricalcando perfettamente la parabola del regime fascista dallo scoppio alla conclusione della Seconda Guerra Mondiale. Il Mausoleo ancora oggi domina sulla baia di Livorno ma non appartiene all'orizzonte mentale labronico e rimane così abbandonato, maestoso, degradato ed irrisolto.
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfkarymadelaneyrenne19
Abstract Data Types
(a) Explain briefly what is meant by the term abstract data type (ADT). Give two
reasons why use of ADTs is good programming practice.
(b) Write out a signature, or interface, that defines the operations of a stack ADT.
(c) Consider a string of characters of the form
... (.( ... ).) ...
where ... indicates an arbitrary sequence of characters (except for parentheses),
(.( indicates an arbitrary number (one or more) of opening parentheses, and
similarly ).) indicates an arbitrary number of closing parentheses.
Using only the stack abstraction operations defined above, write pseudocode for
an algorithm that determines, using a stack, whether or not the number of closing
parentheses is the same as the number of opening parentheses.
You may assume the existence of a function read(str,ch) that reads the next character
of string str into ch.
You may also assume that you can invoke a function reportFail, that will cause
termination with failure, and similarly, reportSuccess causes termination with a
success indication.
Further, you may also assume that you can call a function newStack(S) to create
a new empty stack S, and eos(str) that returns false when you reach the end of
the string.
Solution
(a) Explain briefly what is meant by the term abstract data type (ADT). Give two
reasons why use of ADTs is good programming practice.
A data type is a collection of values and a set of operations on those values. That collection and
these operations form a mathematical construct that may be implemented with the use of a
particular hardware or software data structure. The term abstract data type (ADT) refers to the
basic mathematical concept that defines the data type. We have discussed four different
implementations of the list data structure.
In case of implementation of the list with the use of an array, the size of the array gives difficulty
if increased.
To avoid this, we allocate memory dynamically for nodes before connecting these nodes with the
help of pointers.
For this purpose, we made a singly linked list and connected it with the next pointer to make a
chain.
Moving forward is easy but going back is a difficult task.
To overcome this problem, we made a doubly linked list using prev andnext pointers. With the
help of these pointers, we can move forward and backward very easily. Now we face another
problem that the prev pointer of first node and the next pointer of the last node are NULL.
Therefore, we have to be careful in case of NULL pointers. To remove the NULL pointers, we
made the circular link list by connecting the first and last node.
The program employing the list data structure is not concerned with its implementation.
We do not care how the list is being implemented whether through an array, singly linked list,
doubly linked list or circular linked list. It has been witnessed that in these four implementations
of the list, the interface remained the same i.e. it implements the same methods like add, get,
next, start a.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
3. Abstraction
What is Abstraction?
Definition: Abstraction is the purposeful suppression, or
hiding, of some details of a process or artifact, in order to
bring out more clearly other aspects, details, or structure.
In other word, the elimination of the irrelevant and the
amplification of the essential
Why?
It’s one of the most important techniques to create,
understand and manage complex systems
4. An Example of Abstraction - Map
Think of maps, and the different levels of details:
A map of the world, contains mountain ranges, large political
boundaries
A map of a continent, contains all political boundaries, large
cities
A map of a country, contains more cities, major roads
A map of a large city, roads, major structures
A map of a portion of a city, buildings, occupants
Each level contains information appropriate to the level of
abstraction.
A demo with: Google Maps (maps.google.com)
5. Information Hiding
Information hiding is the purposeful omission
of details in the development of an abstract
representation.
Information hiding is what allows abstraction
to control complexity.
6. Example of Real-world Abstraction - Car
For drivers:
Need to know
Ignition
Steering wheel
Shifting gear
Can ignore (hidden)
the particular engine in this car;
the way fuel is pumped to the engine where a spark ignites it, it explodes pushing down a piston and driving a crankshaft.
For mechanics:
Need to know
batteries and engines
Can ignore (hidden)
inside the battery there's a complex chemical reaction going on.
For the battery designers:
Need to know
What is inside the battery
How to make it durable
Can ignore (hidden)
How to use this battery, e.g. the electronics going into the car's radio.
8. Levels of Abstraction in OO Programs
At the highest level (level
1) of abstraction we view
a program as a
community of interacting
objects.
Important characteristics
here are the lines of
communication between
the various agents.
9. Abstraction in OO Programs
-- Packages and Name spaces
The next level (level 2) of abstraction is found in some (but not
all) OO languages. A package, Unit or Name Space allows a
programmer to surround a collection of objects (a small
community in itself) with a layer, and control visibility from
outside the module.
10. Abstraction in OO Languages
-- Clients and Servers
The next level of abstraction considers the relationship between
two individual objects. Typically one is providing a service, and
the other is using the service.
11. Abstraction in OO languages
-- Description of Services
We can examine just the person
providing a service, independent
of the client. We define the
nature of the services that are
offered, but not how those
services are realized. (like
billboard advertisements)
12. Levels of Abstraction in OO
-- Interfaces
Interfaces (level 3) are one way to describe services at this level
of abstraction.
interface Stack {
public void push (Object val);
public Object top () throws EmptyStackException;
public void pop () throws EmptyStackException;
}
13. Levels of Abstraction
-- An Implementation
Next (level 4) we look at the services provided, but from the
implementation side:
public class LinkedList implements Stack ... {
public void pop () throws EmptyStackException { ... }
...
}
Concern here is with the high level approach to providing the
designated service.
14. Levels of Abstraction
-- A Method in Isolation
Finally (level 5), we consider the implementation of each method
in isolation.
public class LinkedList implements Stack ... {
...
public void pop () throws EmptyStackException {
if (isEmpty())
throw new EmptyStackException();
removeFirst(); // delete first element of list
}
...
}
Every level is important, and often you move quickly back and
forth between levels.
15. Summary of abstraction levels
Level 1, community of interacting objects
Level 2, a package or Name Space to surround a collection of
objects
Level 3, interfaces to describe services (the client side)
Level 4, concrete implementation of the abstract behavior
(the server side)
Level 5, every single method
16. Finding the Right Level of Abstraction
A critical problem in early stages of development is to
determine what details are appropriate at each level of
abstraction, and (often more importantly) what details should
be omitted.
One does not want to ignore or throw away important
information
But one does not want to manage too much information, or
have the amount of information hide critical details.
18. Forms of Abstraction
Specialization (Is-A)
Car :: Wheeled vehicle :: Means of transportation
Division into parts (Has-A)
Car { engine; transmission; body; wheels}
Multiple views
CarDriverView { Ignite(); SteerWheel(); ShiftGear() }
CarMechanicsView { CheckBattery(); CheckWheels();
CheckEngine() }
20. Is-a Abstraction
Is-a abstraction takes a complex system, and views it as an
instance of a more general abstraction.
Characterized by sentences that have the words "is-a''
A car is a wheeled vehicle, which is-a means of
transportation
A bicycle is-a wheeled vehicle
A pack horse is-a means of transportation
Allows us to categorize artifacts and information and make it
applicable to many different situations.
21. Has-a Abstraction
Division into parts takes a complex system, and divides into
into component parts, which can then be considered in
isolation.
Characterized by sentences that have the words "has-a''
A car has-a engine, and has-a transmission
A bicycle has-a wheel
A window has-a menu bar
Allows us to drop down a level of complexity when we
consider the component in isolation.
22. Encapsulation and Interchangeability
An important aspect of division into parts is to clearly
characterize the connection, or interface, between two
components.
Allows for considering multiple different implementations of
the same interface.
For example, a car can have several different types of engine
and one transmission.
23. The Service View
Another way to think of an
interface is as a way of describing
the service that an object
provides.
The interface is a contract for the
service--if the interface is upheld,
then the service will be provided
as described.
24. Inheritance and Polymorphism
Square and Triangle
inherited method
set_colour()
Square and Triangle
implement different
method draw()
25. Other Types of Abstraction: Composition
While is-a and has-a are two important types of
abstraction, there are others.
Composition is one example; a form of has-a;
characterized by the following
Primitive forms
Rules for combining old forms to create new forms
The idea that new forms can also be subject to further
combination
26. Regular expressions
Basic alphabet {a, b, c}
Rule 1: any single element of the alphabet is a regular expression.
a is a regular expression
Rule 2: composition of two regular expressions is a regular
expression.
ab is a regular expression
Rule 3: alternation (|) of two regular expressions is a regular
expression.
aba|abc|abd is a regular expression
Rule 4: use parentheses for grouping, the result is a regular
expression.
ab(a|c|d), meaning aba|abc|abd, is a regular expression
Rule 5: use * symbol represent “zero or more repetitions”, the result
is a regular expression.
(((a|b)*c)|dd)a is a regular expression.
27. Patterns
Patterns are another attempt to document and
reuse abstractions.
Patterns are description of proven and useful
relationships between objects; which can help
guide the solution of new problems.
28. Patterns: example
The Great Firewall of China, China's Internet Censorship System,
blocks many sites, e.g Youtube, Wikipedia, Twitter etc.)
The GFW even blocks my personal blog: jiblog.jiruan.net. Here is a
screenshot when I tried to visit my blog in a netbar in China (2007).
“找不到服务器,
无法显示网页”
“The Connection
Has Been Reset”
(Article | wikipeida)
31. An Overview of History
Another way to better understand OOP is to put it in context with
the history of abstraction in computer science.
Assembly languages
Procedures
Modules
Abstract Data Type (ADT)
The Service View
Objects
The future....
32. Assembly Languages
Assembly languages and linkers were perhaps the first tools used
to abstract features of the bare machine.
Addresses could be represented symbolically, not as a
number.
Symbolic names for operations.
Linking of names and locations performed automatically
33. Procedures and Functions
Libraries of procedures and functions (such as mathematical
or input/output libraries) provided the first hints of
information hiding.
They permit the programmer to think about operations in high
level terms, concentrating on what is being done, not how it is
being performed.
But they are not an entirely effective mechanism of
information hiding.
34. Failure of Procedures in Information Hiding
A Simple Stacks:
int datastack[100];
int datatop = 0;
void init() // initialize the stack
{ datatop = 0;
}
void push(int val) // push a value on to the stack
{ if (datatop < 100)
datastack [datatop++] = val;
}
int top() // get the top of the stack
{ if (datatop > 0)
return datastack [datatop - 1];
return 0;
}
int pop() // pop element from the stack
{ if (datatop > 0)
return datastack [--datatop];
return 0;
}
Where can you hide the implementation?
35. Modules
Modules basically provide collections of
procedures and data with import and export
statements
Solves the problem of encapsulation -- but
what if your programming task requires two or
more stacks? (No instantiation)
36. Parnas's Principles
David Parnas described two principles for the proper use of
modules:
One must provide the intended user of a module with all the
information needed to use the module correctly, and with
nothing more.
One must provide the implementer of a module with all the
information needed to complete the module, and nothing
more.
37. Abstract Data Types (ADTs)
An Abstract Data Type is a programmer-defined data type
that can be manipulated in a manner similar to system-
provided data types
Must have the ability to instantiate many different copies of the
data type.
Data type can be manipulated using provided operations,
without knowledge of internal representation.
But ADTs were important not because they were data
structures, but because they provided an easily characterized
service to the rest of an application.
38. Summery
Looking at the history, we can separate it into three periods of
time:
Major concern is
The Assembly language characterizing the
Function Centered Functions and Procedures functionality of an
View application
The Major concern is
Data Centered Modules characterizing the
View Abstract Data Types data types used in an
application
The Object-Oriented Major concern is
Service Centered Programming characterizing the
View services provided by
objects in the application
39. Objects - ADT's with Message Passing
Characterists of Objects
Encapsulation -- similar to modules
Instantiation -- similar to ADT's
Messages -- dynamic binding of procedure names to behavior
Classes -- a way of organization that permits sharing and
reuse
Polymorphism -- A new form of software reuse using
dynamic binding
40. What Does the Future Hold?
Prediction is hard, particularly about the future.
However, one you have accepted the idea of an application
formed from interacting agents, there is no reason why those
components must exist on the same computer (distributed
computing) or be written in the same language (components).
So some of the trends we see today in software are natural
results of the OOP mind set.
Web services, Cloud computing, Agent-Based Computing
41. Basic Idea of Cloud Computing
Cloud computing is a paradigm of computing in which dynamically scalable and
often virtualized resources are provided as a service over the Internet. Users need
not have knowledge of, expertise in, or control over the technology infrastructure
in the "cloud" that supports them.
42. Assignment 2:
Textbook Chapter 2: Exercises 1,2,3.
Deadline: Wed, September 30, 2009.
Either by email or giving it to me directly in
the class.
43. About these slides
These slides are created by Dr. The slides are licensed under
Ji Ruan on top of the lecture Creative Commons Attribution-
notes by Prof. Wendy MacCaull Share Alike 3.0
and Dr. Hao Wang from their
previous years' teaching on this
course at StFX University. You are free to Share and Remix
this work, under the following
The core materials are based on conditions:
book: An introduction to Object- Attribution
Oriented Programming, 3rd Share Alike
edition, by Timothy Budd.