Classical Software Engineering

Computing

Quiz 7 :

From Modules to Objects

Quiz 7 :

From Modules to Objects

Question Type
search
arrow
Distinguish between abstraction and information hiding.
Free
Essay
Answer:

Answer:

The difference between abstraction and information hiding are described as follows:
img

Tags
Choose question tag
close menu
arrow
It has been suggested that C++ and Java support implementation of abstract data types but only at the cost of giving up information hiding. Discuss this claim.
Free
Essay
Answer:

Answer:

Abstract data types can be defines as user defined data types in which data structure and its implementation is defined together. The data structure and the methods to manipulate the data structure are encapsulated in one unit and it can be complied at one time.
Both C++ and JAVA supports abstract data types along with information hiding as follows;-
• The data structure in ADT is accessible only to the code encapsulated with in it and hence the structure is made hidden from outside.
• To implement information hiding the code is divided into two sections-
Public- includes those data and members that can be accessed externally.
Private- includes those data and members that can be accessed by methods of ADT itself.
Thus, C++ and Java supports Abstract data type and issue of information hiding is solved by dividing the code section in public and private parts.

Tags
Choose question tag
close menu
arrow
Can we implement dynamic binding in a language that does not support inheritance?
Free
Essay
Answer:

Answer:

Dynamic binding is an approach in which the methods that are called and the actual method's code and parameters are binded at runtime. The compiler does not know which method to call and execute until runtime. It is also known as late binding or run time binding.
Inheritance is another concept of object oriented programming which supports reusability of the code. One class can be derived from another class and can share its common variables, methods and characteristics.
• Dynamic binding and inheritance are both important concept of OOP.
• Dynamic binding is mostly related to polymorphism and inheritance. It is used when many methods have same name or when many classes have different implementation of the same method.
• Dynamic binding selects the methods which have different parameters of different inherited classes at run time which are to be executed.
• Virtual function concept in inheritance is also implemented using dynamic binding.
Thus, dynamic binding can be implemented in any OOP language that may support inheritance or may not support inheritance because dynamic binding does not need inheritance for implementation binding but inheritance requires dynamic binding for its implementation.

Tags
Choose question tag
close menu
arrow
Distinguish between polymorphism and dynamic binding.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Module p does not invoke module q. Nevertheless, modules p and q are coupled. How can this happen?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Your manager now asks you to determine how existing modules can be reused. Your first suggestion is to break each module with coincidental cohesion into separate modules with functional cohesion. Your manager correctly points out that the separate modules have not been tested nor have they been documented. What do you say now?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Choose any programming language with which you are familiar. Consider the two definitions of modularity given in Section 7.1. Determine which of the two definitions includes what you intuitively understand to constitute a module in the language you have chosen.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
What happens if we use dynamic binding without polymorphism?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
As pointed out in Just in Case You Wanted to Know Box 7.1, objects were first put forward in 1966. Only after essentially being reinvented nearly 20 years later did objects begin to receive widespread acceptance. Can you explain this phenomenon?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Which of the five levels of coupling described in Section 7.3 promote reuse?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
What is the influence of coupling on maintenance?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Convert the comments in Figure 7.23 to C++ or Java, as specified by your instructor. Make sure that the resulting module executes correctly.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
You are a software engineer involved in product development. Your manager asks you to investigate ways of ensuring that modules designed by your group will be as reusable as possible. What do you tell her?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
What happens if we use polymorphism without dynamic binding?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
What is the influence of cohesion on maintenance?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Which of the seven levels of cohesion described in Section 7.2 promote reuse?
Not Answered

There is no answer for this question

Tags
Choose question tag
close menu
arrow
What are the strengths and weaknesses of inheritance?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Is inheritance a subset of association?
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Distinguish between data encapsulation and abstract data types.
Essay
Answer:
Tags
Choose question tag
close menu
arrow
Determine the cohesion of the following modules: editProfitAndTaxRecordeditProfitRecordAndTaxRecordreadDeliveryRecordAndCheckSalaryPaymentscomputeTheOptimalCostUsingAksen'sAlgorithmmeasureVaporPressureAndSoundAlarmIfNecessary
Essay
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 21