Anda di halaman 1dari 6

1.

What is the difference between object-oriented analysis and object-oriented design? Object-oriented analysis (OOA) looks at the problem domain, with the aim of producing a conceptual model of the information that exists in the area being analyzed. Analysis models do not consider any implementation constraints that might exist, such as concurrency, distribution, persistence, or how the system is to be built. Implementation constraints are dealt during object-oriented design (OOD). Analysis is done before the Design. The sources for the analysis can be a written requirements statement, a formal vision document, interviews with stakeholders or other interested parties. A system may be divided into multiple domains, representing different business, technological, or other areas of interest, each of which are analyzed separately. The result of object-oriented analysis is a description of what the system is functionally required to do, in the form of a conceptual model. That will typically be presented as a set of use cases, one or more UML class diagrams, and a number of interaction diagrams. It may also include some kind of user interface mock-up. The purpose of object oriented analysis is to develop a model that describes computer software as it works to satisfy a set of customer defined requirements. Object-oriented design (OOD) transforms the conceptual model produced in object-oriented analysis to take account of the constraints imposed by the chosen architecture and any non-functional - technological or environmental - constraints, such as transaction throughput, response time, run-time platform, development environment, or programming language. The concepts in the analysis model are mapped onto implementation classes and interfaces. The result is a model of the solution domain, a detailed description of how the system is to be built.

2.

List the information provided in a methods precondition.

preconditions on public methods are enforced by explicit checks that throw particular, specified exceptions
MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

This convention is unaffected by the addition of the assert construct. Do not use assertions to check the parameters of a public method. An assert is inappropriate because the method guarantees that it will always enforce the argument checks. It must check its arguments whether or not assertions are enabled. Further, the assert construct does not throw an exception of the specified type. It can throw only an
AssertionError.

Classes designed for multithreaded use often have non-public methods with preconditions relating to whether or not some lock is held. static method called holdsLock has been added to the Thread class to test whether the current thread holds the lock on a specified object. This method can be used in combination with an assert statement to supplement a comment describing a lockstatus precondition
3. List the information provided in a methods postcondition.

test postcondition with assertions in both public and nonpublic methods. Occasionally it is necessary to save some data prior to performing a computation in order to check a postcondition. You can do this with two assert statements and a simple inner class that saves the state of one or more variables so they can be checked (or rechecked) after the computation. can easily generalize this idiom to save more than one data field, and to test arbitrarily complex assertions concerning pre-computation and post-computation values. tempted to replace the first assert statement (which is executed solely for its sideeffect)

4.

What is the benefit of functional abstraction? It reduces code size. It avoids cut-and-paste. Bugs can be xed in one place instead of many. Improving one functional abstraction improves many applications.
MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

5.

What is meant by information hiding? The principle of segregation of the design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed.

6.

What is meant by the object-oriented approach to modularity? What is an accessor method? An accessor method is used to return the value of a private field. It follows a naming scheme prefixing the word "get" to the start of the method name.

7.

8.

What is a mutator method? A mutator method is used to set a value of a private field. It follows a naming scheme prefixing the word "set" to the start of the method name.

9.

What are some ways of finding logic errors? The program's variables to a file or on the screen in order to define the error's location in code. Logic errors often go undetected until you receive an irate call from your customer telling you that your program caused every employee in the company to receive too much money in their most recent paycheck

10.

What is meant by functional abstraction?

MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

Details of the algorithms to accomplish the function are not visible to the consumer of the function. The consumer of the function need to only know the correct calling convention and have trust in the accuracy of the functional results.

11

What is a pivot item? Pivot Item is the container for items in the Pivot control. The item has both a set of visual states for position and a Header, effectively a Header Content Control.

12

What are some of the benefits of modularity? The vector files to be input to the regression can be modified as needed to include only the feature vector files desired for a particular model building run. That is, one can choose to use all the feature vector files for a particular run, or some subset of feature vector files. This flexibility makes it relatively easy to introduce new sets of features into the model building procedure for research and development purposes. The model building module can be run independently.

13

What is functional abstraction? Functional abstraction is the process of creating abstract functions such as lter.

14

What is information hiding? The principle of segregation of the design decisions in a computer program that are most likely to change, thus protecting other parts of the program from extensive modification if the design decision is changed.

15

What are the three types of operations on a data collection? Census, sample survey, and administrative by-product

16

What is data abstraction?

MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

The process by which data and programs are defined with a representation similar to its meaning (semantics), while hiding away the implementation details.

17

What is an abstract data type (ADT)? A mathematical model for a certain class of data structures that have similar behavior; or for certain data types of one or more programming languages that have similar semantics.

18

What is the difference between static and dynamic allocation? Dynamic memory allocation is at runtime. Static memory allocation is before run time, but the values of variables may be changed at run time. Static memory allocation saves running time, but can't be possible in all cases. Dynamic memory allocation stores it's memory on heap, and the static memory allocation stores it's data in the "data segment" of the memory.

19

What is a memory leak? A memory leak is the gradual loss of available computer memory when a program (an application or part of the operating system) repeatedly fails to return memory that it has obtained for temporary use. As a result, the available memory for that application or that part of the operating system becomes exhausted and the program can no longer function.

20

Write the code segment that inserts into a linear linked list the node to which newPtr points between the two nodes pointed to by the variables prev and cur.

MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

21

Write the code segment that inserts a new node to which newPtr points at the beginning of a linear linked list.

22

What are the three high-level steps to insert a new node into a linear linked list? Step 1: Determine where you want to insert a node. Step 2: Create a new node: Node *ptr; ptr = new Node; ptr - > data = 6; Step 3: Make the new node point to the current Node pointer. ptr - > next = currNode;

23

What are two advantages of using a pointer-based implementation of the ADT list instead of an array-based implementation? 1. can return more than 1 value from a function 2. if we want our object to be modify by some function then we have only option to pass its address or reference

24

What is the difference between a shallow copy and deep copy of a linked list? Shallow copy: Copies the member values from one object into another. Deep Copy: Copies the member values from one object into another. Any pointer objects are duplicated and Deep Copied.

MARIAM BINTI ABDUL HAMID PPD, JABATAN TEKNOLOGI MAKLUMAT UTHM

Anda mungkin juga menyukai