Showing posts with label Software Engg.. Show all posts
Showing posts with label Software Engg.. Show all posts

Tuesday, May 10, 2011

Software Engineering Questions


1. How might a project policy that requires all programming staff to produce 50 lines of documentation per 1000 LOC prove inappropriate or counter-productive?
Ans : Provide 5 examples to support your position and limit your answer to 500 words or less.
This policy could reward inappropriate behavior such as
1. a programmer that is very careful to produce self-documenting code and thus may feel that he/she does not need to add extra documentation may be discouraged from continuing to produce self-documenting code.
2. mandating a specific number of documentation lines per 1000 LOC does not take into account that there are differences in the amount of documentation needed for different types of code - very complex algorithms may need more and standard business type apps may take less and rewarding them in the same way does not impress upon the programmers when documentation is appropriate and necessary.
3. mandating the amount and not the quality does not reward the programmer that produces clear, concise comments as opposed to the programmer that produces lots of rambling, confusing documentation.
4. to connect the code to the requirements, specification and design documents, the comments may in fact be very terse since they just reference these documents and thus once again this appropriate behaviour may be inadvertently discouraged.
5. this policy does not address the case where programmers are extending classes or modifying existing codes - there may not be a clear way to count either the real LOC or the appropriate number of comments since these are both influenced by previous work. If the current programmer is punished for the inappropriate behavior of others this will taint the programmer's view of extending or using other's code.



2. Compute the function point count for the system which is described in the following informal requirements statement. Clearly state all assumptions that you make.
Ans : The system processes various commands from an operator of a chemical plant. These commands include:
• calculate and display the average temperature of a specific reactor over a 24-hour period
• calculate and display the average pressure in a specific reactor over a 24-hour period
• calculate and display a summary of the average temperatures and pressures in a specific reactor over a given time period (where the time period is greater than 1 day)
The operator can also send the results to an electronic bulletin board.

3. Develop 4 different definitions for LOC that are most appropriate for the following purposes:
1. maintainability
2. testability
3. system efficiency
4. programmer efficiency
Justify your definitions and test them out on the code you and your partner produced for any of the pair programming exercises.
Ans : • maintainability
o For maintainability, one should reward behaviour that produces well-documented code that is neither too terse or too verbose. To this end, LOC should be divided into lines of documentation, total number of LOC, and lines of executable code. If there are many lines of executable code versus total LOC then this is probably complex code that should be very well documented and thus the number of documentation lines can be evaluated with this in mind.
• testability
o For testability, the most important LOC feature is the number of executable lines since this will give you an idea of the complexity of the code and thus the quantity of testing that will be needed. If number of executable lines can be further divided into number of "control" lines (if-then-else, switch, etc) then this measure of complexity and need for tests will be further enhanced.
• system efficiency
o For system efficiency, the most important LOC features are lines of execution versus lines of non-execution that are not comment lines. A large number of non-execution lines may be an indication of lots of memory allocations - this might be a sign of possible system efficiency problems - not guaranteed to be but worth a look.
• programmer efficiency
o For programmer efficiency, the LOC features to compare would be the ratio between executable lines, non-executable lines and comment lines. This should be in balance so that one does not dominant the others. Once again this is just a way to flag if a programmer has a distinctive propensity to be too verbose or too terse.

4. Compare the measurement of program size in the case of traditional procedural programming languages and in the case of object-oriented languages. Construct your answer in the following way:
• briefly describe how size is measured in procedural language programs
• briefly describe how size is measured in object-oriented language programs
• describe the similarities
• describe the differences
Limit your answer to 500 words.


5. Develop a project policy statement that uses lines of code and the quality metrics of your choice (i.e. equations that relate LOC to elements of quality such as productivity, maintainability, etc.) to motivate and reward team members.
Ans : Provide 4 examples to support your policy decisions and limit your answer to 100 words or less.
Policy: To produce extensible/reusable code, programmers will be advised to produce code that has the following properties:
• each logical segment of code (e.g. class, method, etc) will have a ratio of lines of documentation to lines of code of at least 1:10
• all logical segment of code should be of a similar size (+- 20%) with regards LOC
This policy will have the following effects:
1. encourage documentation but not too much documentation
2. encourage programmers to consider the size of their classes and methods and thus to review their design choices and code properties such as high cohesion and low coupling
3. since this policy will probably result in code that is highly compartmentalized and well designed, it will be easier to reuse
4. since each module will be appropriately documented this should also make reuse and extending more likely

6. Assume that you're the manager of a small project. What baselines would you define for the project and how would you control them?
Ans : A baseline is a software configuration management concept that helps us to control change without seriously impeding justifiable change. The baselines that I will define for the project are as under:
• Schedule baseline
• Cost baseline
• Scope baseline
• Development baseline
• Source code
• Test cases
• Design specification
• System specification
• Software requirements
As a project manager, I will ensure that all the baselines are being met accordingly and the software project is proceeding as desired. Software schedule will be monitored throughout the software development, and in case of any deficiencies, appropriate solution will be figured out. Cost is also a baseline for project. It can only be met in case the software requirements are easily understood and are complete. Source code needs also be checked through the development process and the bugs that are found will be fixed at appropriate time in order to deliver good quality product to end users.

2. What is the difference between an SCM audit and a formal technical review?
Answer.
1st version of the answer:
SCM Audit:
A software configuration audit complements the formal technical review by assessing configuration object for characteristics that are generally not considered during review.
Formal Technical Review:
The formal technical review focuses on the technical correctness of the configuration object that has been modified. The reviewers assess the SCI to determine consistency with other SCIs,omissions, or potential side effects. A formal technical review is the most effective filter from a quality assurance standpoint. Conducted by software engineers for software engineers, the FTRis an effective means for improving software quality.
No, the functions of SCM Audit and Formal Technical Review cannot be folded into one reviewbecause of the fact.
Formal Technical Reviews are used for improving software quality, whereas software configuration management audit is usually used to answer the questions that are indirectly related to software to achieve the desired quality. For example, we can perform formal technical reviews for coding, testing, debugging, etc., as these are directly related to the quality of the software, however, for SCM Audit, we will answer the questions which are not directly related to software quality rather indirectly. Some questions could be...
• Has the change specified in the ECO been made?
• Have any additional modifications been incorporated?
• Has a formal technical review been conducted to assess technical correctness?
• Has the software process been followed and have software engineering standards been properly applied?
• Has the change been "highlighted" in the SCI?
• Have the change date and change author been specified?
• Do the attributes of the configuration object reflect the change?
• Have SCM procedures for noting the change, recording it, and reporting it been followed?
• Have all related SCIs been properly updated?
• Besides above, in some cases questions are asked as part of a formal technical review. However,when SCM is a formal activity, the SCM audit is conducted separately by the quality assurance group.

Friday, June 18, 2010

Software Engg. - III

1) Business model is the part of designing phase of software engineering development life cycle
a. True
b. False

2) The state transition diagram
a. depicts relationships between data objects
b. depicts functions that transform the data flow
c. indicates how data are transformed by the system
d. indicates system reactions to external events

3) The best way to conduct a requirements validation review is to
a. Examine the system
b. Have the customer look over the requirements
c. Send them to the design team
d. Use checklist to examine the questions

4) The system specification describes the
a. Function, performance and constraints of a computer-based system
b. implementation of each allocated system
c. time required for simulation
d. element software architecture

5) For each of the following given Requirement indicate whether it is Functional (F) or Non-Functional (N) Requirement.
a. The System should be designed so it can later be extended to a Blue Line
reservation System.(N)
b. The System will allow the user to view the layout of seats in Bus.(F)
c. The System must be available at all times.(N)
d. A given seat can be assigned to only one person.(F)

6)Both the software engineer and customer take an active role in software requirements engineering-a set of activities that is often referred to as Requirement_______________
a. Managing
b. Recognition
c. Analysis
d. Modeling

7)_________ is a measure of independence of a module or component.
a. Cohesion
b. Coupling
c. Loop coupling
d. Loop cohesion

8) In the Functional design, the structure of the system revolves around __________
a. Functions
b. Sequences
c. Models
d. Flows

9)Use case is the part of designing phase of software engineering
a. True
b. False

10) Three categories of risks are
a. Business, personnel risks, budget risks
b. project risks, technical risks, business risks
c. planning risks, technical risks, personnel risks
d. management risks, technical risks, design risks

Sunday, June 13, 2010

Software Engg. - II

1. Decomposing the major project deliverables into smaller, more manageable components to provide better control is called:
a) Project planning.
b) Scope definition.
c) Project base lining.
d) Requirements verification.

2. Select one aspect that is NOT included in a feasibility analysis for new system?
a) Organisational objectives
b) Cost effectiveness
c) Technical feasibility
d) Budgetary constraints
e) Requirements validation

3. One of the fundamental tenets of quality management is that quality:
a) Must exceed customer expectations.
b) Is planned in and not inspected in.
c) Will increase cost.
d) Costs must all be passed onto the customer.

4. In the Shewhart and Deming Quality cycle, the letters P D C A stands for:
a) Purchase, deliver, cost, and acquisition.
b) Prevent defects caused by anyone.
c) Plan, do, check, and act.
d) Please don’t cause accidents.

5. Which is NOT included in the software requirements specification?
a) test specifications for each mandatory requirement
b) project schedule and WBS
c) functional description of user requirements
d) performance description for each non-functional requirement
e) data dictionary

6. A data dictionary was created during the requirements analysis phase of a software engineering project. What information does it contain?
a) interface design criteria
b) data types and description of database table entries
c) restrictions on security
d) list of main functional requirements

7. A software project classifies system entities, their activities and relationships. The classification and abstraction of system entities is important. Which modelling methodology most clearly shows the classification and abstraction of entities in the system?
a) data flow model
b) event driven model
c) object oriented model
d) entity-relationship model

8. Which of the following is NOT a non-functional system requirement component?
a) cost
b) reliability
c) usability
d) performance
e) maintainability

9. What is the purpose of a test case specification in software engineering?
a) to specify the sequence of actions for the execution of a number of sequential tests
b) to specify inputs, predicted results, and a set of execution conditions for a test item
c) to list the test procedures to be performed on the integration of the system database
d) to report the specific tests results when integrating software modules

10. In the software testing process, when is validation testing performed?
a) after coding
b) after unit testing
c) after module testing
d) after integration testing

Wednesday, August 05, 2009

Software Engineering

1. Software Engineering primarily aims on
a. Reliable software
b. Cost effective software
c. Reliable and cost effective software
d. Non of the above

2. A good specification should be
a. Unambiguous
b. Distinctly specific
c. Functional
d. None of the above

3. Which of the following is a tool in design phase?
a. Abstraction
b. Refinement
c. Information hiding
d. None of the above

4. In object oriented design of software, which of the following is not true?
a. Objects inherit the properties of the class
b. Classes are defined based on the attributes of objects
c. An object can belong to two classes
d. Classes are always different

5. Information hiding is to hide from user, details
a. That are relevant to him
b. That are irrelevant to him
c. That may be maliciously handled by him
d. That are confidential

6. Design phase includes
a. Data, architectural and procedural designs only
b. Architectural, procedural and interface designs only
c. Data, architectural and interface designs only
d. Data, architectural, interface and procedural designs

7. Data structure suitable for the application is discussed in
a. Data design
b. Architectural design
c. Procedural design
d. Interface design

8. Design phase will usually be
a. Top-down
b. Bottom-up
c. Random
d. Centre fringing

9. Assertions are conditions which are true at the point of execution
a. Always
b. Sometimes
c. Many times
d. No time

10. Assuming the existence of a start and end nodes for a program graph (PG), the total number of paths is equivalent to ________________ set of test data required to test software.
a. Minimum
b. Maximum
c. Optimum
d. Supremum

11. In a program graph (PG), if X is a if-then-else node and the number of paths from if part to end node is y and for else part is Z with the number of paths from strat node to end node is x, the total number of paths through X is
a. xy+z
b. xz+y
c. x+y+z
d. x(y+z)

12. If X is a case statement in a program graph (PG) with n cases instead of an if-then-else statement in the previous question with each case leading to only one path to end node, total number of paths through X is
a. x+n
b. x**n
c. x*log(n)
d. x*n

13. Structured programming codes include
a. Sequencing
b. Alteration
d. Multiple exit from loops

14. Which of the following is a desirable property of module?
a. Independency
b. Low cohesiveness
c. High coupling
d. Multifunctional

15. Which of the following types of maintenance takes the maximum chunk of the total maintenance effort in a typical commercial application environment?
a. Adaptive maintenance
b. Corrective maintenance
c. Preventive maintenance
d. Perfective maintenance

16. An important aspect in coding is
a. Readability
b. Productivity
c. To use as small memory space as possible
d. Brevity

17. One way to improve readability in coding is to
a. Avoid goto statement
b. Name variables and functions according to their use
c. Modularize the program
d. None of the above

18. The data flow model of an application mainly shows
a. The underlying data and the relationship among them
b. Processing requirements and he flow of the data
c. Decision and control information
d. Communication network structure

19. According to Brooks, if n is the number of programmers in a project team then the number of communication path is
a. n*(n-1)/2
b. n*log(n)
c. n
d. n*(n+1)/2

20. The extent to which the software can continue to operate correctly despite the introduction of invalid input is called as
a. Reliability
b. Robustness
c. Fault-tolerance
d. Portability

21. Which of the following statements is not true?
a. Content coupling in a module is desirable
b. Logical cohesion in a module is desirable
c. Stamp coupling is preferred over functional coupling
d. None of the above

22. Configuration management is not concerned with
a. Controlling changes to the source code
b. Choice of hardware configuration for an application
c. Controlling documentation changes
d. Maintaining versions of software

23. The railway reservation system currently operational in India can be classified as a
a. Batch processing system
b. Real-time system
c. Online system
d. Expert system

24. Data flow diagram, regular expression and transition table can be combined to provide __________________ for functional specification OS system software
a. Decision table
b. Finite state automata
c. Event table
d. None of the above

25. A program P calls two subprograms P1 and P2. P1 can fail 50% times and P2 40% times P can fail
a. 50%
b. 60%
c. 10%
d. 70%

26. Which of the following graph theoretic concept will be useful in software testing?
a. Cyclomatic number
b. Hamiltonian circuit
c. Eularian cycle
d. None of the above

27. In a decision table if there are 3 variables and 3 rules, implies
a. Specification may not be complete
b. Design could be faulty
c. Coding will be incorrect
d. All of the above

28. In unit testing of a module, it is found for a set of test data, at the maximum 90% of the code alone were tested with the probability of success 0.9. the reliability of the module is
a. Atleast greater than 0.9
b. Equal to 0.9
c. Atmost 0.81
d. Atleast 1/0.81

29. Which of the following testing methods is normally used as the acceptance test for a software system?
a. Regression testing
b. Integration testing
c. Unit testing
d. Functional testing

30. A computer program can often be a very satisfactory __________________ of a physical system such as road traffic conditions
a. Solution
b. Replacement
c. Stimulation
d. Model

31. On an average, the programmer months is given by 3.6*(KDSI)**1.2. If so, a project requiring one thousand source instruction will require
a. 3.6 PM
b. 0.36PM
c. 0.0036PM
d. 7.23PM

32. Considering a program graph(PG) with statement as vertices and control as edges, which of the following is not true for any program graph
a. PG is always acyclic
b. PG is always a directed graph
c. There won’t be any self loops
d. PG is always a connected graph

33. In object-oriented design of software, objects have
a. Attributes and name only
b. Operations and name only
c. Attributes, name and operations
d. None of the above
___________________________________________________________________________________________________

Search Aptipedia