Cis 277 homework adt assignment

.docx

School

Bergen Community College *

*We aren’t endorsed by this school

Course

277

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

2

Uploaded by CommodoreDove3466

Report
Cis 277 homework adt assignment 1. A scalar (atomic) data type is a data type that stores a singular atomic value at a time. Considered non decomposable. a) A boolean (bool) data type stores either 't' or 'f' b) A character (char) data type stores character types that range from -128 to 127 or 0 to 255. c) An integer (int) data type stores either a positive or a negative integer. 2. The three things that are determined by the data type of a variable is: a)the legal value that it may assume. b)how much storage is required c)the operations that may be performed on it. 3. A data structure is a collection of cells and each cell holds a value that can be either a scalar/atomic type or it can be a structure itself. struct Grades { char Name[30]; int Numbergrade; bool Pass; } 4. Three different types of efficiencies are Stack ADTs, Physical structures, and list ADT 5.An ADT is a set of objects together with a set of operations. They are basically mathematical abstractions. Lists, sets and graphs are three examples of ADTs. 6. encapsulation refers to keeping data, functions and objects separately from the implementation and to not reveal internal details. It basically prevents from exposing the methods used for the data.In a way it is like the powder for a pill within the capsule, which could be compared to as a class. 7. What is meant by the "implementation of an ADT" is the transcription into statements of a programming language,the declaration that defines a variable to be of an ADT, in addition to a procedure in said programming language for each operation of that ADT.
8. The criteria would be Is the data structure a good representation of the collection of the data and its properties? What is the difficulty to write the algorithms/ functions to implement the operations in the Abstract Data Type? Will the data structure be an efficient implementation in accordance of storage requirements and will it be executed within an appropriate time? 9. Three advantages of creating ADT implementations would be a)It can be more abstract allowing the source code to be readable at a higher level. b) You can write and debug the application faster. The application program can just make calls to the functions that are in the implementation. c) Due to the encapsulation of the source code, the source code for the function can be modified singularly, the rest can be left alone.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help