Start Discovering Solved Questions and Your Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
explain the interfaces in ruby recall that in object-oriented programming an interface is a collection of abstract operations that cannot be
enumerate about the concept of containera container can have a size operation we can also ask somewhat redundantly whether a container is empty and
determine about the push operationa container may or may not be accessible by keys so it cant make assumptions about element retrieval methods for
what is a container taxonomyits useful to place containers in a taxonomy to help understand their relationships to one another and as a basis for
what is keyed access- containera collection may allow its elements to be accessed by keys for instance maps are unstructured containers which allows
what is access restrictionsstructured containers with access restrictions only allow clients to add remove and examine elements at certain locations
define about the structure - container-some containers hold elements in some sort of structure and some dont containers with no structure include
explain in brief about the container an entity which holds finitely many other entitiesjust as containers such as boxes baskets bags pails cans
containersintroductionsimple abstract data types are useful for manipulating simple sets of values such as integers or real numbers however more
state the example of pre- and post-conditionssuppose that function fx should have a non-zero argument and return a positive value we can document
state about the pre- and post conditions programmers can easily document other pre- and post conditions and class invariants though and insert code
explain the assertions in rubyruby offers no support for assertions whatever moreover because its weakly typed ruby doesnt even enforce rudimentary
define about the inheritance hierarchylanguages eiffel and d provide constructs in language for invariants and pre- and post conditions which are
what are the languages which support assertionslanguages which support assertions often provide different levels of support for instance java has an
determine the precondition of a binary search for instance precondition of a binary search is that array searched is sorted however checking this
using assertionswhen writing code programmer must state pre- and subtle post conditions for public operations state class invariants and insert
explain the abstract data type assertionsgenerally adt assertions translate into assertions about the data types which implement adts which helps
give example of assertion and abstract data typefor illustration consider natural adt whose carrier set is the set of non-negative integers and whose
assertions and abstract data typeseven though we have defined assertions in terms of programs notion can be extended to abstract data types which are
what is an unreachable code assertion an unreachable code assertion can be placed at the default case if its every executed then program is in an
determine about the unreachable code assertion an unreachable code assertion is an assertion that is placed at a point in a program that shouldnt be
define about the class invarianta class invariant may not be true during execution of a public operation though it should be true between executions
what is class invariants assertiona class invariant is an assertion which should be true of any class instance before and after calls of its exported
determine about the post conditions assertiona post condition is an assertion which should be true at completion of an operation for instance a
preconditions assertiona precondition is an assertion which should be true at the initiation of an operation for instance a square root operation