Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1))) Discuss the definition of abstract data type, or ADT. Provide examples and

ID: 2989578 • Letter: 1

Question

1))) Discuss the definition of abstract data type, or ADT. Provide examples and discuss implementation mechanisms in Java and in OOP languages in general.

----------------------------------------------------------------------------------------------

2)))Discuss the implementation of lists and bags using arrays, including fixed-sized arrays, expandable arrays, and the pros and cons of using arrays to implement them.

------------------------------------------------------------------------------------------------------

3))) Discuss the features and control of the LCD. Discuss features and control of the keypad. Research LCD modules

Explanation / Answer

What is an abstract data type?

An abstract data type (ADT) is an object with a generic description independent of implementation details. This description includes a specification of the components from which the object is made and also the behavioral details of the object. Instances of abstract objects include mathematical objects (like numbers, polynomials, integrals, vectors), physical objects (like pulleys, floating bodies, missiles), animate objects (dogs, Pterodactyls, Indians) and objects (like poverty, honesty, inflation) that are abstract even in the natural language sense. You do not see C in Pterodactyls. Only when you want to simulate a flying Pterodactyl, you would think of using a graphics package in tandem with a computer language. Similarly, inflation is an abstract concept. When you want to model it and want to predict it for the next 10 years, you would think of writing an extrapolation program in C.

Specifying only the components of an object does not suffice. Depending on the problem you are going to solve, you should also identify the properties and behaviors of the object and perhaps additionally the pattern of interaction of the object with other objects of same and/or different types. Thus in order to define an ADT we need to specify:

There may be thousands of ways in which a given ADT can be implemented, even when the coding language remains constant. Any such implementation must comply with the content-wise and behavioral description of the ADT.

Examples

Integers: An integer is an abstract data type having the standard mathematical meaning. In order that integers may be useful, we also need to specify operations (arithmetic operations, gcd, square root etc.) and relations (ordering, congruence etc.) on integers.

How to implement an abstract data type?

It is now and only now when you think about writing C codes. Carefully investigate the specification of the ADT and possible target applications where this ADT is going to be used. Plan for suitable C constructs to provide the appropriate functionality with good performance. Try to exploit your experience with C. But fully understand what you are going to implement, the limitations, the expected performance figures, the ease of code maintenance, and a lot of related issues. After all, you have to market your product.

ANSWER 2)

Implementations of list

Lists are typically implemented either as linked lists (either singly or doubly-linked) or as arrays, usually variablelength or dynamic arrays.The standard way of implementing lists, originating with the programming language Lisp, is to have each element of the list contain both its value and a pointer indicating the location of the next element in the list. This results in eithera linked list or a tree, depending on whether the list has nested sublists. Some older Lisp implementations (such asthe Lisp implementation of the Symbolics 3600) also supported "compressed lists" (using CDR coding) which had aspecial internal representation (invisible to the user). Lists can be manipulated using iteration or recursion. Theformer is often preferred in imperative programming languages, while the latter is the norm in functional languages.

Programming language support

Some languages do not offer a list data structure, but offer the use of associative arrays or some kind of table toemulate lists. For example, Lua provides tables. Although Lua stores lists that have numerical indices as arraysinternally, they still appear as hash tables.In Lisp, lists are the fundamental data type and can represent both program code and data. In most dialects, the list of the first three prime numbers could be written as (list 2 3 5). In several dialects of Lisp, including Scheme, a list is acollection of pairs, consisting of a value and a pointer to the next pair (or null value), making a singly-linked list

ANSWER 3:

A liquid-crystal display (LCD) is a flat panel display, electronic visual display, or video display that uses the light modulating properties of liquid crystals. Liquid crystals do not emit light directly.

LCDs are available to display arbitrary images (as in a general-purpose computer display) or fixed images which can be displayed or hidden, such as preset words, digits, and 7-segment displays as in a digital clock. They use the same basic technology, except that arbitrary images are made up of a large number of small pixels, while other displays have larger elements.

LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are common in consumer devices such as video players, gaming devices, clocks, watches,calculators, and telephones, and have replaced cathode ray tube (CRT) displays in most applications. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they do not suffer image burn-in. LCDs are, however, susceptible to image persistence.

In computing, a keyboard is a typewriter-style device, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches. Following the decline of punch cards and paper tape, interaction via teleprinter-style keyboards became the main input device for computers.

Keyboard:A keyboard typically has characters engraved or printed on the keys and each press of a key typically corresponds to a single written symbol. However, to produce some symbols requires pressing and holding several keys simultaneously or in sequence. While most keyboard keys produce letters, numbers or signs (characters), other keys or simultaneous key presses can produce actions or execute computer commands.