TN Online TestSamacheer Kalvi practice

Data Abstraction - Formula Sheet

Share this chapter: Telegram

While Data Abstraction is a conceptual programming methodology, it uses specific mathematical and indexing formulas to define and manipulate abstract data structures.

1. Distance Calculation Formula between Abstract City Objects

The distance between two cities represented as abstract data objects with latitude and longitude coordinates is determined using the Euclidean distance formula:

\[Distance(city_{1}, city_{2}) = \\sqrt{(lt_{1} - lt_{2})^{2} + (lg_{1} - lg_{2})^{2}}\]

Where each term is defined as follows:

2. Compound Data Indexing Formulas (Pairs)

When implementing a Pair ADT using Python lists or tuples, individual elements are retrieved using zero-based offset indexing formulas:

3. Rational Number Representation

A rational number is exact when represented as a pair of integers consisting of a numerator and a denominator:

\[Rational = \\frac{n}{d}\]

Where:

Solved MCQs → Practice test →

More for this chapter

Book Back Questions10 textbook MCQs · solved Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods

More chapters in Computer Science

View all
1 Function 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 10 Python Classes and objects 11 Database Concepts 12 Structured Query Language (SQL) 13 Python and CSV files 14 Importing C++ programs in Python. 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart