Levels of Data Abstraction Atomic Data Composite Data Data Types Data Structures Abstract Data Types Implementing ADTs
3 / 21
Levels of Data Abstraction
Atomic Data Composite Data Data Types Data Structures Abstract Data Structures
4 / 21
Atomic data
We will start out at a “low-level” and build up. Atomic data are data which consists of a single piece of information. Examples: numbers, characters, references
5 / 21
Composite data
Composite data represents data which can be broken down into various smaller parts or subfields. Multiple properties are required to capture its relevant data.
6 / 21
Composite data
Example: a point on a graph is represented by two real numbers, an x coordinate and a y coordinate. These two numbers are associated with each other. Example: a phone number is represented by area code, exchange and the number within the exchange. Example: a geometric shape such as a circle is represented by it’s center point, and it’s radius (observe nesting of composite data!).
C++
In C++, composite data are usually represented by a struct. This term is ambiguous! Sometimes it refers to a type; sometimes it refers to data.
7 / 21
Data Types
A data type packages together data and ways of manipulating the data together.
Data Type
A data type consists of two parts:
1 2
a set of values operations that can be performed on the data.
8 / 21
Example Data Types
Example (Integer Data Type)
The integer data type can consist of: data values: −∞, . . . , −2, −1, 0, 1, 2, . . . , ∞ operations: +, −, ∗, %, /, . . .
Example (Character Data Type)
The character data type can consist of: data values: \0, . . ., ’A’,’B’,. . .,’a’,’b’,. . ., ’1’, ’2’, . . . operations: , ≤, ≥, ==, . . .
Example (Person Data Type)
The Person data type can consist of: data values: { 15, "Bob", "Buckwheat"}, { 50, "Jack", "Bauer" }, . . . operations: set/get firstname, set/get lastname, set/get age, ==, . . .
9 / 21
Data Structures
A data structure is an aggregation of data elements into a set with defined relationships.
Data Structure
A combination of elements in which each element is either a data type or another data structure. A set of associations or relationships (structure) between elements.
10 / 21
Data Structures
Example (Data Structure: Array)
Elements: All the same data type (integer, float, Person, etc,.). Structure: Elements form a contiguous sequence in which each element is numbered with an index.
Example (Data Structure: Matrix (2D array))
Elements: All the same data type (integer, float, Person, etc,.). Structure: Elements form a grid in which each element has a row and column position. We will see additional examples of data structures in this course, such as lists, and trees.
11 / 21
Abstract Data Types
An abstract data type (ADT) is an abstraction that permits programmers to make use of the data structure without knowing its internal implementation. We know what an ADT can do, but how it is done is hidden.
Abstract Data Type
An abstract data type consists of: One or more data structures (declaration of data). Declaration of operations on the data (the interface). Encapsulation (hiding) of data and the implementation of the operations.
12 / 21
ADTs
Example (String ADT)
A string consists of: the data structure: a sequence of characters the operations (interface): create, compare, concatenate, etc. (in C++, interface specified in cstring) the encapsulation: Implementation of operations and data structure are hidden in the string library (data structure might be character array like in C++, might be something else...)
13 / 21
ADTs
Example (Matrix ADT)
A matrix consists of: the data structure: a 2D array of numbers the operations (interface): create, edit element, +, −, /, ×, . . . the encapsulation: details of operations
Related Documents: Essay about Programming Principles
4. PROGRAMMING APPROACHES Organizations and individuals are continually searching for more efficient ways to perform the software development process. One-way of reducing the time and cost of development is to standardize software programs and the programming process. The benefits of standardized programs are that they are easier to code, maintain, debug, and modify. In recent years, a variety of techniques have appeared attempting to minimize differences in the way programmers' design and develop…
Networking Domain names and registration Programming Internet speeds and connections W3C Hardware • Hardware is the device which the user can physically touch. • Web server and specifications, monitors, keyboards, mouse, modem and network card are all examples of hardware, which are also referred to as the physical components of a hardware. Software • A software is made up of the developer's ideas, concepts and principles which leads to computer programming. • For example, servers, web browsers…
is the trend for a large portion of software in use today. We can make another comparison between two different models of programming - structured and object oriented programming. In structured programming, blocks of programming statements (code) are executed one after another. Control statements change which blocks of code are executed next. In object oriented programming, data are contained in objects and are accessed using special methods (blocks of code) specific to the type of object. There…
College Algebra 2, or 1 ½ to 2 years of high school algebra, or equivalent preparation Course Description This course develops skills in linear mathematics and probability. Topics include matrices, inverses, input-output analysis, linear programming, sets, counting, probability, the mathematics of finance, and statistics. Applications will be developed in business, economics, and the sciences. Course Outcomes Mathematics Course Outcomes: The outcomes of the College of Professional Studies’…
unit, providing a practical introduction to basic computing and programming concepts. Students gain an understanding of, and practical experience in, computer programming; practical experience in implementing informal prose descriptions of problem solutions using an imperative language; an understanding of, and practical experience in, designing, coding, testing and debugging simple algorithms; and an understanding of the principle of incremental development. Other topics include: the concept of…
development strategy known as the agile approach to programming. Agile programming is a set of core principles designed to make software development more efficient and effective. It offers many advantages over older and more traditional development methods. This report will introduce you to these advantages by covering the following topics: • An Introduction to Software Development. • What Agile Programming Is. • What Agile Programming offers. Introduction to Software Development The…
able to: Task no. Evidence P5 Explain the role of software design principles and software structures in the IT systems development lifecycle 1 M1 Explain the importance of the quality of code 2 D1 Discuss the factors that can improve the readability of code 2 Purpose of this assignment: To demonstrate understanding of principles of software design, in relation to specific programming scenarios, and how these principles relate to the software development life cycle. Scenario: You have…
John Howard Society - Child and Youth Services Child and Youth Services (CYS) provides evidenced-based and effective programming to young people and their families who may be struggling in areas of their lives due to poverty, homelessness, addiction and mental health, and, as a result, are at risk of or already involved in the youth justice system. Their full range of services, from prevention to intervention, allows young people to access the necessary supports based on their risks and needs…
What’s the Matter with Big Bird? The Effectiveness of Educational Television Programming Chantel Warren COM 172 7/21/14 University of Phoenix What’s the Matter with Big Bird? The Effectiveness of Educational Television Programming From Sesame Street to Reading Rainbow to Mister Roger’s Neighborhood are the shows that most of us grew up watching. These are just a few of the educational programs that children have grown up watching and learning from for decades. Nowadays there are not only television…
verse have been dubbed essays (e.g. Alexander Pope's An Essay on Criticism and An Essay on Man). While brevity usually defines an essay, voluminous works like John Locke's An Essay Concerning Human Understanding and Thomas Malthus's An Essay on the Principle of Population are counterexamples. In some countries (e.g., the United States and Canada), essays have become a major part of formal education. Secondary students are taught structured essay formats to improve their writing skills, and admission…