Software Engineering Assignment 0 PDF
Document Details
Uploaded by RenownedChiasmus7270
Indian Institute of Technology, Kharagpur
null
null
Tags
Summary
This document is an assignment for a software engineering course. It covers topics like software process models, waterfall model phases, and software testing.
Full Transcript
NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 0 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10...
NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 0 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Which one of the following most accurately defines the term software process model? a. The way in which software is developed b. The way in which software processes data c. The way in which software is used d. The way in which software behaves e. The way in which software is structured Correct Answer: a. The way in which software is developed Detailed Solution: Software process model refers to the way in which software is developed. QUESTION 2: Unit testing is carried out during which phase of the waterfall model? a. Implementation phase b. Testing phase c. Maintenance phase d. Design phase e. Both testing and maintenance phases NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Correct Answer: a. Implementation phase Detailed Solution: Unit testing is carried out by developers during implementation phase. QUESTION 3: Which one of the following phases accounts for the maximum effort during development of a typical software product? a. Coding b. Testing c. Designing d. Specification e. Feasibility study Correct Answer: b. Testing Detailed Solution: Testing phase accounts for maximum effort during a software development life cycle. QUESTION 4: Which of the following activities are carried out during the testing phase of the waterfall life cycle model? a. Unit testing b. Integration testing c. System testing d. Code walkthrough e. Code inspection Correct Answer: b. Integration testing c. System testing NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Detailed Solution: Integration and system testing are carried out during testing phase, while unit testing, code walk through, and code inspection are done during development process. QUESTION 5: In which of the following SDLC models, testing activities are spread over the entire development life cycle? a. Iterative waterfall model b. V model c. Prototyping model d. Agile model e. Classical waterfall model Correct Answer: b. V model d. Agile model Detailed Solution: In V-model and Agile model, testing activities are spread over the entire development life cycle. QUESTION 6: Defects get introduced into a work product due to mistakes committed by the members of the development team. A mistake in an activity pertaining to which one of the following phases is likely to be most expensive to correct when detected during system testing? a. System testing b. Design c. Coding and unit testing d. Requirements analysis and specification e. Maintenance Correct Answer: d. Requirements analysis and specification Detailed Solution: As the development of a software gets underway using waterfall model of development, the later the phase in which a defect gets detected, the more expensive is its removal. The artefacts developed during phases preceding the phase in which a defect occurs need to be reworked NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which one of the following phrases would most appropriately complete the sentence: “The later a defect is found during a traditional software development cycle __________.” a. the less troublesome it is b. the more expensive it is to repair c. the less important it is to the product’s operation d. the more important it is to the product’s operation e. the less expensive it is to repair f. the more troublesome it is Correct Answer: b. the more expensive it is to repair Detailed Solution: As the development of a software gets underway using waterfall model of development, the later the phase in which a defect gets detected, the more expensive is its removal. The artefacts developed during phases preceding the phase in which a defect occurs need to be reworked QUESTION 8: For a typical software product, testing should account for what percentage of the total software development costs? a. 5-10 b. 10-20 c. 30-40 d. 40-50 e. 85-95 Correct Answer: d. 40-50 Detailed Solution: Testing accounts for approximately 40-50% of total development costs since more effort is required in this phase. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: In the prototyping life cycle model, which one of the following is the principal reason for developing a prototype? a. It can be used as an early production tool. b. It may serve as a performance benchmark for the completed software. c. It allows the customer to provide feedback about requirements. d. It reduces the schedule for development through alpha testing of the prototype. e. It serves as an animated requirement of the system Correct Answer: c. It allows the customer to provide feedback about requirements. e. It serves as an animated requirement of the system Detailed Solution: Prototyping model allows customers to provide feedback about the requirement and also serves as an animated requirement of the system. QUESTION 10: Unrestricted use of GO TO statements is normally avoided while writing a program, since: a. It increases the running time of programs b. It increases memory requirements of programs c. It results in larger executable code sizes d. It makes debugging difficult e. It increases the effort required to adequately test the software Correct Answer: d. It makes debugging difficult e. It increases the effort required to adequately test the software Detailed Solution: Unrestricted use of GOTO statements in a program makes it difficult to debug and also increases the effort required to adequately test the software. ***************** THE END****************** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 1 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Which of the following are not factors contributing to the software crisis? a. Larger problems, b. Poor project management c. Increased use of Computer-Aided Software Engineering (CASE) tools d. Lack of adequate training in software engineering e. Low reliability of the hardware platforms Correct Answer: c. Increased use of Computer-Aided Software Engineering (CASE) tools e. Low reliability of the hardware platforms Detailed Solution: Increased use of CASE tool and low reliability of the hardware platform are not the factors contributing to software crisis. Please refer to slide 9 of week 1 lecture material. QUESTION 2: Which one of the following types of software development most closely resembles the exploratory style of software development? a. First specify the software, then design the test cases, then develop the software, and keep on modifying it until it passes all the test cases b. First specify the system, then develop the software, and finally test the developed software c. First develop the software, and then keep on modifying the software until the customer accepts it d. Keep on specifying a little, designing a little, and testing a little until the full software is developed e. Develop a prototype to collect customer feedbacks, then develop the software, and finally test the developed software Correct Answer: c. First develop the software, and then keep on modifying the software until the customer accepts it NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Detailed Solution: Exploratory style of software development also called build-and-fix style, where the software is first developed and kept on modifying until the customer accepts it. You can refer slide 12 of week 1 lecture material for more information. QUESTION 3: Which one of the following statements is FALSE about the consequence of developing software by deploying the exploratory style? a. It is difficult to use exploratory style in team development environment b. For moderate and large-sized projects, use of exploratory style leads to high cost and project delays c. When exploratory approach is used to construct toy projects, such as assignments in an introductory programming course, the developed software is invariably of poor quality and also takes an unreasonable amount of time to complete. d. Development of large projects using the exploratory style, sometimes leads to project failure e. When large projects are developed using an exploratory style, very high-quality software is frequently produced. Correct Answer: e. When large projects are developed using an exploratory style, very high- quality software is frequently produced. Detailed Solution: Very high quality software is difficult to be assured since it often results in unmaintainable code. QUESTION 4: Which one of the following is not justified by the magic number 7? a. Number independent variables in a function should not exceed 7. b. A function should not call more than 7 functions c. A function should not be called by more than 7 functions d. Number of decision statements in a function should not exceed 7. e. A function should not have more than 7 parameters Correct Answer: c. A function should not be called by more than 7 functions Detailed Solution: If a function is called by more than 7 functions, it would be difficult to store the information about all the 7 functions in short term memory. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which one of the following involves using the abstraction principle? a. Model building b. Decomposition c. Modularization d. Structured programming e. Functional decomposition Correct Answer: a. Model building Detailed Solution: Abstraction focuses attention on only one aspect of the problem and ignores other aspects and irrelevant details. It is also called model building. Please see slide 29 of week 1 lecture material for more information. QUESTION 6: Defects get introduced into a work product due to mistakes committed by the members of the development team. A mistake in an activity pertaining to which one of the following phases is likely to be most expensive to correct when detected during system testing? a. System testing b. Design c. Coding and unit testing d. Requirements analysis and specification e. Maintenance Correct Answer: d. Requirements analysis and specification Detailed Solution: Model building is a graphical and written description of the product. Hence, it can be considered as abstraction. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which of the following are implications of the magical number 7 in build and fix development projects? a. Development effort increases exponentially with program size b. Development effort increases linearly with program size c. Development effort increases sub-linearly with program size d. Development effort decreases linearly with program size e. Each module should be decomposed into at least 7 modules in a good design f. Each module should be decomposed into at most 7 modules in a good design Correct Answer: a. Development effort increases exponentially with program size f. Each module should be decomposed into at most 7 modules in a good design Detailed Solution: If a person deals with seven or less number of items, these would be accommodated in the short term memory. So, he can easily understand it. On the other hand, as the number of new information increases beyond seven, it becomes exceedingly difficult to understand it. QUESTION 8: Which of the following are not implications of severely restricted size of the short–term memory? a. Difficulty in permanently remembering large amount of information. b. Difficulty in developing a program with large number of variables c. Difficulty in debugging a program with large number of variables d. Difficulty in understanding a program with large number of variables e. Difficulty in understanding a design in which each module is decomposed into a large number of modules f. Difficulty in understanding a design in which a function calls a large number of other functions g. Difficulty in understanding a design in which a function is called by a large number of functions h. Difficulty in understanding a design in which a module is reused in many modules Correct Answer: g. Difficulty in understanding a design in which a function is called by a large number of functions h. Difficulty in understanding a design in which a module is reused in many modules NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Detailed Solution: Short-term memory cannot remember large amount of information. As the number of independent variables in the program increases, it quickly exceeds the grasping power of an individual Please refer slide no. 17 to 26 of week 1 lecture material for more understanding. QUESTION 9: While using the exploratory development style, the effort required to develop a software grows exponentially with the size of the software. Which one of the following is a possible reason behind it? a. Testing effort increases exponentially b. Code size becomes exponentially large c. As the number of independent variables in the program increases, it quickly exceeds the grasping power of an individual. d. As the size of a program increases, it becomes very difficult to correct compilation errors. e. As the size of a program increases, program compilation takes an unduly large amount of time. Correct Answer: c. As the number of independent variables in the program increases, it quickly exceeds the grasping power of an individual. Detailed Solution: As the size and complexity of programs increased further, Exploratory programming style proved to be insufficient. For more information, please refer slide 62 of week 1. QUESTION 10: Which of the following are not justified by the magic number 7? a. Number independent variables in a function should not exceed 7. b. A function should not call more than 7 functions c. A function should not have more than 7 statements d. A function should not be called by more than 7 functions e. Number of decision statements in a function should not exceed 7. Correct Answer: c. A function should not have more than 7 statements d. A function should not be called by more than 7 functions Detailed Solution: Magic number 7 indicates that more than 7 items can not be remembered in short-term memory. Therefore, more than 7 independent variables in a function, or calling more than 7 functions, more than 7 decision statements in a function make it difficult to remember. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 2 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Which one of the following activities would span all stages of a software development life cycle (SDLC) in waterfall-based software development? a. Coding b. Testing c. Project management d. Design e. Requirements specification Correct Answer: c. Project management Detailed Solution: In SDLC, project management phase spans across all stages. Without SDLC, the project manager suffers from 99% complete syndrome. QUESTION 2: In waterfall model of software development, unit testing is carried out during which phase of the waterfall model? a. Implementation phase b. Testing phase c. Maintenance phase d. Design phase e. Requirements specification phase Correct Answer: a. Implementation phase Detailed Solution: During development/implementation phase, unit testing is usually performed by the developers to ensure proper development. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: In waterfall-based development, which one of the following phases accounts for the maximum effort during development of a typical software? a. Implementation b. Testing c. Designing d. Specification e. Feasibility study Correct Answer: b. Testing Detailed Solution: During development phase, testing usually accounts for maximum effort, whereas for overall SDLC, maintenance phase account for maximum effort. Please refer slide 20 of week 2 lecture material. QUESTION 4: Which of the following advantages can be expected to accrue when iterative waterfall model is used for a project? a. Easy to understand, easy to use, especially by inexperienced staff b. Milestones are well understood by the team c. Provides requirements stability during development d. Strong management control (planning, staffing, tracking etc) on the project e. Project progress can be accurately monitored by the project manager, as a result schedule slippages are rare f. Continual integration of the developed code occurs throughout the life cycle g. Continual customer interactions Correct Answer: a. Easy to understand, easy to use, especially by inexperienced staff b. Milestones are well understood by the team c. Provides requirements stability during development d. Strong management control (planning, staffing, tracking etc) on the project Detailed Solution: Iterative waterfall model is easy to understand and use, milestones are well understood, ensures requirement stability and strong management control. Please refer slides 60 of week 2 lecture material for more information. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which of the following project characteristics would suggest that a waterfall model-based development would be appropriate? a. Requirements are well defined and stable b. Technology is understood c. Development team have experience with similar projects d. Delivery date has been aggressively set e. Substantial reuse of code is targeted Correct Answer: a. Requirements are well defined and stable b. Technology is understood c. Development team have experience with similar projects Detailed Solution: Delivery date and code reuse is not considered in waterfall model. Please refer slide 62 of week 2 lecture material for more information. QUESTION 6: Which of the following are not known shortcomings of the iterative waterfall model of software development? a. All requirements must be known upfront b. Can give a false impression of progress c. Integration is one big bang at the end d. Little opportunity for customer to pre-view the system. e. Inadequate documentation produced as part of the process f. Number of phases in the model is ill defined Correct Answer: e. Inadequate documentation produced as part of the process f. Number of phases in the model is ill defined Detailed Solution: Inadequate documentation and number od phases are not known shortcomings od iterative waterfall model. For more information, please refer slide 62 of week 2 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which one of the following may be experienced by a software development team when it adopts a systematic development process model in preference to a build-and-fix style of development? a. Increased documentation overhead b. Increased development cost c. Increased maintainability d. Increased development time e. Increased code size f. Increased code efficiency Correct Answer: a. Increased documentation overhead c. Increased maintainability Detailed Solution: A software development team when it adopts a systematic development process model in preference to a build-and-fix style of development experience increased documentation overhead and maintainability. QUESTION 8: Prototyping life cycle model is appropriate when a project suffers from which one of the following risks? a. Schedule slippage b. Manpower turnover c. Incomplete and uncertain requirements d. Poor quality of outsourced work e. Technological obsolescence Correct Answer: c. Incomplete and uncertain requirements Detailed Solution: Prototyping model is best suited when the requirement is unclear. For more information, please refer slide 80 of week 2 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Which of the following sections are not important to an effective business case document and can be omitted? a. Cost b. Benefit c. Risk d. Configuration management e. Team structure Correct Answer: d. Configuration management e. Team structure Detailed Solution: Configuration management and team structure are not essential for an effective business case document. Therefore, these can be omitted. You can refer slide 133 of week 2 lecture material for additional information. QUESTION 10: The operation phase of the waterfall model is a synonym for which one of the following phases? a. Coding and unit testing phase b. Integration and system testing phase c. Maintenance phase d. Design phase e. Requirements specification phase Correct Answer: c. Maintenance phase Detailed Solution: Most of the maintenance activities are performed in operation and maintenance phase. Hence, these two terms are synonymous. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 3 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Which of the following are prominent characteristics of agile software development? a. Incremental development b. Iterative development c. Linear development d. Customer participation in development e. Development at customer site Correct Answer: a. Incremental development b. Iterative development d. Customer participation in development Detailed Solution: Incremental release of working software is the primary measure of progress. Delivery of working versions of a product in several increments. One of the principles of agile methodology is close cooperation between customers and developers. QUESTION 2: Agile model advocates which of the following approaches? a. In each increment, get something “quick and dirty” delivered, which may or may not add much value to the customer b. In each increment, get something simple and minimal released, but as quickly as possible c. In each increment, get something of business-value delivered, consistent with the right level of quality d. In each increment, get something delivered once it has been fully documented and the documentation has been signed off as complete e. In each increment, complete and deliver the working software for one use case Correct Answer: c. In each increment, get something of business-value delivered, consistent with the right level of quality NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Detailed Solution: Agile model advocates that in each increment, get something of business-valued delivered, consistent with the right level of quality. Here no long term plan are made at a time. QUESTION 3: Which of the following are not the characteristic of an agile software development project? a. Shared code ownership b. Implement the simplest solution to meet today's problem c. Continual feedback from customer d. Postpone integration until all the incremental deliveries are complete e. Pair programming f. Rapid prototyping Correct Answer: d. Postpone integration until all the incremental deliveries are complete f. Rapid prototyping Detailed Solution: In agile model, improvement to the prototype is done in each increment. At each incremental delivery, integration to the existing model is done. Delivery of working versions of a product in several increments. QUESTION 4: Members of a Scrum team are usually expected to answer which of the following questions during a daily Scrum meeting? a. What did you do yesterday b. What will you do today? c. What obstacles are in your way? d. Why are you getting delayed? e. Why your program is having too many bugs? Correct Answer: a. What did you do yesterday b. What will you do today? c. What obstacles are in your way? Detailed Solution: In scrum model, members generally focus on the current status of the project, immediate work, and any difficulty they are facing. For more information, please refer slide 48 of week 3 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which one of the following is not true in a Scrum development? a. Sprint is the fundamental process flow of Scrum b. A sprint is a month-long iteration, during which an incremental product functionality completed c. During a Sprint, customer feedback is continually obtained and the Sprint backlog is accordingly modified d. Each day begins with a daily Scrum meeting Correct Answer: c. During a Sprint, customer feedback is continually obtained and the Sprint backlog is accordingly modified Detailed Solution: In Scrum development, customer feedback is obtained after sprint planning (generally, after a month-long iteration). QUESTION 6: Which of the following are not true of a build and fix style of development? a. Coding starts immediately after requirements specification b. Coding starts without any formal requirements specification c. No formal design is carried out d. No testing is carried out e. No requirements specification document is developed Correct Answer: a. Coding starts immediately after requirements specification d. No testing is carried out Detailed Solution: Coding does not start immediately after requirement in build and fix style of development. Here, testing is also carried out. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Who among the following are considered as the stakeholders in a software development project? a. Shareholders of the organization developing the software b. Shareholders of the organization for whom the software is getting developed c. Anyone who is interested in the software d. Clients who define the requirements for the software e. Developers of the outsourced parts of the software f. Developers of the software g. Users of the software Correct Answer: d. Clients who define the requirements for the software e. Developers of the outsourced parts of the software f. Developers of the software g. Users of the software Detailed Solution: SRS intended for a diverse audience: –Customers and users use it for validation, contract,... –Systems (requirements) analysts –Developers, programmers to implement the system –Testers use it to check whether requirements have been met –Project Managers to measure and control the project QUESTION 8: Which of the following are performed during the requirements analysis and specification phase in an iterative waterfall software development? a. Gather requirements. b. Build a prototype. c. Identify any ambiguity, inconsistency, and incompleteness in the gathered requirements d. Analyze and allocate resources based on requirements specification e. Prepare the requirements specification document Correct Answer: a. Gather requirements. c. Identify any ambiguity, inconsistency, and incompleteness in the gathered requirements e. Prepare the requirements specification document Detailed Solution: During Requirement analysis and specification phase, requirements are gathered, analysed for any inconsistency, ambiguity or incompleteness, and specification where requirements are documented. For more information, please refer slide 68 of week 3 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Pair programming intends to take which one of the following best practices to the extreme? a. Design b. Incremental development c. Code review d. Simplicity e. Spike development f. Daily integration Correct Answer: c. Code review Detailed Solution: As all production code is written with two programmers at one machine in pair programming, it is best suited for code review task. QUESTION 10: Which of the following are not goals of requirements analysis? a. Weed out ambiguities in the requirements b. Weed out inconsistencies in the requirements c. Weed out non-functional requirements d. Weed out incompleteness in the requirements e. Weed out references to third party software Correct Answer: c. Weed out non-functional requirements e. Weed out references to third party software Detailed Solution: The purpose of the Requirements Analysis Phase is to transform the needs and high-level requirements specified in earlier phases into unambiguous (measurable and testable), traceable, complete, consistent, and stakeholder-approved requirements. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 4 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: A software requirements specification (SRS) document should avoid discussing which of the following? a. Functional requirements b. Non-functional requirements c. Design specification d. Constraints on the implementation e. Resource allocation for the project Correct Answer: c. Design specification e. Resource allocation for the project Detailed Solution: Four important parts of SRS are: –Functional requirements, –External Interfaces –Non-functional requirements, –Constraints QUESTION 2: Consider the following requirement for a word processor software: " The software should provide facility to import an existing image available as a jpeg file into the document being created.". Which one of the following types of requirements is this? a. Functional requirement b. Non-functional requirement c. Constraint on the implementation d. Goal of implementation e. External interface requirement Correct Answer: a. Functional requirement Detailed Solution: Importing an image into a document is a kind of task to be accomplished. Hence it is a functional requirement. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Consider the following partial description of the IIT security software. “Employees of the company should be able to register their vehicles with the payroll software.” Which one of the following types of requirements is this? a. Functional requirement b. Non-Functional requirement c. Design requirement d. Design constraint e. External interface requirement Correct Answer: a. Functional requirement Detailed Solution: Registration is a task to be done. Hence, it is a functional requirement. QUESTION 4: Consider the following partial requirement for a software: “It should be possible to use a web browser as the front end.” It can be considered to be which one of the following types of requirements? a. Functional requirement b. Non-functional requirement c. Design constraint d. External interface e. Goal of implementation Correct Answer: b. Non-functional requirement Detailed Solution: Using a web browser as a front end describes about the look and feel about a system. Hence, it is a non functional requirement. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: When a company plans to develop a generic product, who among the following is usually the source of the requirements? a. Development team members b. Project manager c. Sales personnel d. Personnel from finance department e. A future user of the product Correct Answer: c. Sales personnel Detailed Solution: The sales personnel give the requirements when a company plans to develop a generic product. For more information, please refer to slide 65 of week 3 lecture material. QUESTION 6: Which of the following problems in the gathered requirements is not the focus of the requirements analysis task? a. Inconsistency b. Ambiguity c. Incompleteness d. Unstructuredness e. Grammar and sentence construction problems Correct Answer: e. Grammar and sentence construction problems Detailed Solution: Grammar and sentence construction problems are not the focus of requirement gathering task. However, it is a guideline to write to good software specification. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which one of the following views is implicit in an SRS document? a. Black box b. White box c. Grey box d. Glass box e. Both grey and glass box Correct Answer: a. Black box Detailed Solution: SRS document is considered as a black box whose internal details are not known. For more details, please refer slide 22 od week 4 lecture material. QUESTION 8: Which of the following are not true of agile requirements management? a. New requirements can be added b. Any of the requirements can be deleted c. Requirements may be reprioritized d. Once a requirement has been created it may not be modified e. Once a requirement has been created it may not be deleted Correct Answer: d. Once a requirement has been created it may not be modified e. Once a requirement has been created it may not be deleted Detailed Solution: In agile methodology, requirements are iteratively updated in every sprints. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Which one of the following most accurately reflects the style of software development that takes place in an agile software development project? a. Incremental development b. Iterative development c. Prototyping d. Linear development e. Both incremental and iterative development Correct Answer: e. Both incremental and iterative development Detailed Solution: Agile software development project follows both incremental and iterative development process. QUESTION 10: In which of the following SDLC models, testing activities are spread over the entire development life cycle? a. Iterative waterfall model b. V model c. Prototyping model d. Classical waterfall model e. Scrum model Correct Answer: b. V model e. Scrum model Detailed Solution: Testing activities are spread over the entire development life cycle in V model and scrum model. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 5 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: The extent of data exchanges between two modules is indicated by which one of the following terms? a. Coupling b. Cohesion c. Structure d. Union e. Integration Correct Answer: a. Coupling Detailed Solution: The data exchange between two modules is known as coupling, whereas within the same module is known as cohesion. QUESTION 2: Which one of the following types of cohesion can be considered as the best form of cohesion? a. Logical b. Coincidental c. Temporal d. Functional e. Procedural Correct Answer: d. Functional Detailed Solution: Cohesion is a measure of: –functional strength of a module. –A cohesive module performs a single task or function. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: The modules in a good software design should have which one of the following characteristics? a. High cohesion, low coupling b. Low cohesion, high coupling c. Low cohesion, low coupling d. High cohesion, high coupling e. Moderate cohesion, high coupling Correct Answer: a. High cohesion, low coupling Detailed Solution: In High cohesion and low coupling scenario, a functionally independent module needs very little help from other modules and therefore has minimal interaction with other modules. Therefore, it is reduces error propagation and good for software design. QUESTION 4: Which of the following is the best (most desirable) type of module coupling? a. Control coupling b. Stamp coupling c. Data coupling d. Content coupling e. Common coupling Correct Answer: c. Data coupling Detailed Solution: Data coupling has the low degree of coupling. Hence, it is most desirable for module coupling. For more information, please refer slide 47 of week 5 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which one of the following is the worst type of module coupling? a. Control coupling b. Stamp coupling c. External coupling d. Common coupling e. Content coupling Correct Answer: e. Content coupling Detailed Solution: Content coupling has the highest degree of coupling. Hence, it is most undesirable for module coupling. For more information, please refer slide 47 of week 5 lecture material. QUESTION 6: Which one of the following is the worst type of module cohesion? a. Logical cohesion b. Temporal cohesion c. Functional cohesion d. Coincidental cohesion e. Communicational cohesion Correct Answer: d. Coincidental cohesion Detailed Solution: Coincidental cohesion has the lowest degree of cohesion. Hence, it is not desirable for software design. For details please refer slide 32 of week 5 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: In which one of the following types of coupling, complete data structures are passed from one module to another? a. Control Coupling b. Stamp Coupling c. External Coupling d. Content Coupling e. Common coupling Correct Answer: b. Stamp Coupling Detailed Solution: Two modules are stamp coupled, if they communicate via a composite data item or an array or structure in C. QUESTION 8: If all tasks must be executed in the same time-span, what type of cohesion is being exhibited? a. Functional Cohesion b. Temporal Cohesion c. Functional Cohesion d. Sequential Cohesion e. Communicational cohesion Correct Answer: b. Temporal Cohesion Detailed Solution: Temporal cohesion is exhibited for the given scenario. For example, the set of function is responsible for initialization, start-up, shut-down of any process etc. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Which one of the following is the correct ordering of the coupling of modules from strongest (least desirable) to weakest (most desirable)? a. content, common, control, stamp, data b. common, content, control, stamp, data c. content, data, common ,stamp, common d. data, control, common, stamp, content e. common, data, control, stamp, content f. content, data, control, common, stamp Correct Answer: a. content, common, control, stamp, data Detailed Solution: content> common> control> stamp> data based on the degree of cohesion. For more information, please refer to slide 47 of week 5 lecture material. QUESTION 10: During the detailed design of a module, which one of the following is designed? a. Module hierarchy b. Data structures and algorithms c. Control structure d. Data flow structure e. Module interfaces Correct Answer: b. Data structures and algorithms Detailed Solution: Data structure and algorithms are designed during the detailed design module. For more information, please refer slide 11 of week 5 lecture material. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment- 6 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: A data flow diagram represents which one of the following? a. The conditions based on which data items may be processed b. The order in which different activities are carried out c. The transformation of data through processing stations d. The order in which various functions of a program are invoked e. Interaction among different modules of a program Correct Answer: c. The transformation of data through processing stations Detailed Solution: DFD represents the transformation of data through processing stations. For more information, please refer slide 13 of week 6 lecture material. QUESTION 2: For a given programming problem, a DFD (data Flow Diagram) model depicts which of the following? a. Flow of data b. Flow of control c. Flow of decisions d. Flow of atomic conditions e. Sequence of interaction among processes f. Interaction among modules Correct Answer: a. Flow of data Detailed Solution: DFD model depicts the flow of data in a programming problem. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Which of the following statements are not true of a data flow diagram (DFD) model? a. It is a hierarchical diagram. b. It represents code structure c. It does not represent decisions and control flows. d. It represents decomposition of functions and data into finer forms. e. It represents the sequence in which the different processes are invoked Correct Answer: b. It represents code structure e. It represents the sequence in which the different processes are invoked Detailed Solution: DFD is a hierarchical graphical model that shows the different functions (or processes) of the system and data interchange among the processes. For more information, please refer slide 13 of week 6 lecture material. QUESTION 4: In a procedural design approach, during the detailed design stage, which of the following is undertaken? a. Module structure is designed b. Data flow representation is developed c. Data structures and algorithms for the individual modules are designed d. Structure chart is developed e. Module call relationships are designed f. Module interactions are designed Correct Answer: c. Data structures and algorithms for the individual modules are designed Detailed Solution: Data structure and algorithms are designed during the detailed design module. For more information, please refer slide 11 of week 5 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which one of the following is true of a function-oriented design approach? a. Top-down b. Bottom-up c. Mixed-in d. Bottom-out e. Bottom-up at system level and top-down at module level Correct Answer: a. Top-down Detailed Solution: Function-oriented design approach is a top-down approach, whereas object-oriented approach is a bottom-up approach. For more details, please refer slide 3 of week 6 lecture material. QUESTION 6: A context diagram should not represent which of the following? a. External entities. b. Module Interactions c. Data input to the system by the external entities, d. Output data generated by the system. e. Module structure Correct Answer: b. Module Interactions e. Module structure Detailed Solution: Context diagram represents the software at the most abstract level. For more information, please refer slide 32 of week 6 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which of the following are identifiable mistakes in the following context diagram? a. External entities are appearing at the context level b. Input/Output occurring at the context level c. Data item name missing on a data flow arrow d. A data store appearing at the context level e. Solid arrows have been used in place of dashed arrows f. Name of one entity is missing Correct Answer: d. A data store appearing at the context level f. Name of one entity is missing Detailed Solution: Data store appearing at the context level in the given diagram and name of one entity is missing are the two identifiable mistakes in the given diagram. QUESTION 8: Which of the following information are not present in a structure chart model of a software system? a. Various modules making up the system, b. Module call structure c. Parameters passed among different modules d. Data structures and algorithms of the modules e. How the data is transformed by the functions Correct Answer: d. Data structures and algorithms of the modules e. How the data is transformed by the functions NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Detailed Solution: A structure chart represents the software architecture: -Various modules making up the system, –Module dependency (i.e. which module calls which other modules), –Parameters passed among different modules. For more information, please refer slide 97 of week 6 lecture material. QUESTION 9: What is wrong with the following DFD? a. Unbalanced b. Presence of synchronous data flow c. Presence of asynchronous data flow d. Data flow arrows are not numbered e. Presence of control information Correct Answer: e. Presence of control information Detailed Solution: Dataflow diagram should not represent control information. For more information, please refer slide 82 of week 6 lecture material. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 10: Which of the following can be said about the following DFD (data flow diagram)? a. The bubble Display number processes numbers at the same rate as the bubble Read-numbers b. The bubble Validate numbers processes numbers at the same rate as the bubble Read-numbers c. The bubble Display number processes numbers at a different rate as compared to the bubble Read-numbers d. The bubble Validate number processes numbers at a different rate as compared to the bubble Read-numbers e. The rate at which the bubble Display numbers processes numbers is the as the rate at which Validate numbers processes numbers. Correct Answer: a. The bubble Display number processes numbers at the same rate as the bubble Read-numbers d. The bubble Validate number processes numbers at a different rate as compared to the bubble Read-numbers Detailed Solution: Since there is a direct connection between Display number process and Read number process, they are synchronous. On the other hand, Validate number process and Read number process are asynchronous since they communicate through a data store. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment-7 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Which of the following term means packing of data and functions into a single unit in a program? a. Polymorphism b. Abstraction c. Encapsulation d. Inheritance e. Decomposition Correct Answer: c. Encapsulation Detailed Solution: Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. So, among all the options, option c. encapsulation is the correct one. QUESTION 2: Which of the followings are important advantages of applying the principle of data hiding to a design solution? a. Low cohesion b. High coupling c. Low fan out d. Low coupling e. High cohesion Correct Answer: d. Low coupling e. High cohesion Detailed Solution: Abstraction or data hiding lead to low coupling and high cohesion. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Which of the followings are characterize the inheritance relation between two classes? a. Encapsulation. b. Aggregation c. Generalization and specialization. d. Polymorphism e. “Has a” relation f. “Is a” relation g. Composition Correct Answer: c. Generalization and specialization, f. “Is a” relation Detailed Solution: Inheritance represents generalization-specialization. It also represents “Is a” relation. So, option c. and f. are correct. Please refer slide no. 60-61 of the week 7 lecture material. QUESTION 4: Consider the statement: "An employee is either a worker or a manager." Assuming that Employee and Manager to be two classes, what can be said about the relationship between these two classes? a. Association b. Generalization-specialization c. Aggregation d. Polymorphism e. Composition f. Dependency Correct Answer: b. Generalization-specializationm Detailed Solution: "An employee is either a worker or a manager."—this represents “Is a” relationship. “IS a” relationship represent by inheritance. Inheritance represents Generalization-specialization. So, option b. is the correct one. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Which one of the following can be said about an abstract data type (ADT)? a. It is a synonym for an abstract class b. A data type that cannot be instantiated c. A data type that can only be used through the operations defined on it d. It is the same as a collection of data items e. It is the same as an aggregation of data items Correct Answer: c. A data type that can only be used through the operations defined on it Detailed Solution: An abstract data type (ADT) supports only the operations which are defined on it. So, option c. is the correct one. QUESTION 6: Which one of the following phrases indicates the relationship that exists between a class and its public parent class? a. "...is a..." b. "...has a..." c. "...is implemented as a..." d. "...uses a..." e. “…implementation of…” Correct Answer: a. “…is a…” Detailed Solution: Between a class and its parent class “Is a” relationship exist. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Which one of the following sentences most closely describes "multiple inheritance" in object- oriented development? a. Two classes inherit from each other b. A base class has two or more derived classes c. A child class has two or more parent classes d. A child class has both an "is a" and a "has a" relationship with its parent class e. A class is derived from its parent class, which in turn is derived from its parent class Correct Answer: c. A child class has two or more parent class Detailed Solution: Multiple inheritance is a feature of some object-oriented computer programming languages in which an object or class can inherit characteristics and features from more than one parent object or parent class. Please refer slide no. 63 of week 7 lecture material. QUESTION 8: Which one of the following is true of a design solution that involves several deep inheritance hierarchies? a. It is a sign of a good design as it increases reuse b. It is a sign of a good design as it leads to sophisticated and versatile classes at the leaf level c. It is a sign of good design as it increases polymorphic bindings d. It is a sign of bad design as it breaks encapsulation e. It is a sign of bad design as it causes repeated inheritance Correct Answer: d. It is a sign of bad design as it breaks encapsulation Detailed Solution: Indiscriminate use of inheritance can result in poor quality programs. It increases coupling and lead to encapsulation weakness. So, option d. is correct. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Which of the following are NOT the characteristics of a good textual description accompanying a use case diagram? a. Every use case description starts with a request from the system to an actor. b. The textual description should be written using the development team’s terminologies c. Every use case description ends with the system producing all answers the actor asked for. d. Every use case description is written from the actor’s point of view. e. Every use case description should identify the sequence of message exchanges required among the concerned classes. Correct Answer: b. The textual description should be written using the development team’s terminologies e. Every use case description should identify the sequence of message exchanges required among the concerned classes. Detailed Solution: The textual description of a use case diagram need not to written using the development team’s terminologies. The textual description of use case not describe the message exchanges among the classes. So, option b. and e. are the correct choices. QUESTION 10: Which of the following statements are false regarding UML models of a system? a. Construction UML models help handle complexity in the problem b. All UML models are design models of the system c. All UML designs are models of the system d. In general, from a system implementation, all UML models can be extracted e. Dynamic UML models represent behavioral aspects of the system f. Static UML models represent structural aspects of the system Correct Answer: b. All UML models are design models of the system d. In general, from a system implementation, all UML models can be extracted Detailed Solution: UML is a modelling language. Not a system design. All UML models can not be extracted. “UML is a large and growing beast, but you don’t need all of it in every problem you solve…” Please refer slide no. 7 to 17 of week 7 lecture material. ************END*********** NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment-8 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Consider the following sentence: “A square is a polygon”. From an analysis of the sentence, identify the relations between the two classes Square and Polygon that can be inferred from the sentence. a. Inheritance b. Association c. Aggregation d. Composition e. Dependency Correct Answer: a. Inheritance Detailed Solution: “A square is a polygon” – represents “Is a” relationship. So, inheritance can be inferred from the sentence. So, option a. is correct. QUESTION 2: Consider the sentence: A college has many Students. Which one of the following best characterizes the relationship that exists between the College class and the Student class? a. Inheritance b. Specialization c. Association d. Composition e. Dependency Correct Answer: c. Association Detailed Solution: A college has many students. Here college class and student class are associated with each other. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Consider the following sentence: “100 paisa is one rupee”. From an analysis of the sentence, identify the relation between the two classes Paisa and Rupee that can be inferred from the sentence. a. Inheritance b. Association c. Aggregation d. Composition e. Dependency Correct Answer: d. Composition Detailed Solution: “100 paisa is one rupee” – one rupee composed with 100 paisa. So, it represents composition, it is not “Is a” relationship. QUESTION 4: Consider the following sentence: “Students live in hostels”. From an analysis of the sentence, identify the relation between the two classes Student and Hostel that can be inferred from the sentence. a. Inheritance b. Association c. Aggregation d. Composition e. Dependency Correct Answer: b. Association Detailed Solution: “Students live in hostels” --- here Student and Hostel are associated with each other. Student and Hostel are two entities here so it is a binary association. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: A collaboration diagram is used by the designers for its capability to effectively depict which one of the following types of information? a. The decision structure among the classes b. The looping structure c. The attribute values of the objects d. Structural information such as class association e. Times at which collaboration occurs among classes Correct Answer: d. Structural information such as class association Detailed Solution: A collaboration diagram, also known as a communication diagram, is an illustration of the relationships and interactions among software objects in the Unified Modeling Language (UML). It also represents class associations. So, option d. is the correct option. QUESTION 6: How is an external system represented in a use case diagram? a. By using a specific icon available for this purpose b. By using text description c. By using object constraint language (OCL) d. By stereotyping the actor icon e. By inheriting a special icon from the actor icon Correct Answer: d. By stereotyping the actor icon Detailed Solution: External system used in a use case diagram by adding a stereotype in the actor icon. So, option d. is the correct option. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: Consider the following state chart diagram modelling the behaviour of a turnstile gate. Based on the modelled behaviour, what would happen if a coin is inserted into the turnstile gate when the turnstile gate is in the unlocked state? a. The turnstile gate allows one person to pass and remains in the unlocked state b. The turnstile gate sounds an alarm and remains in the unlocked state c. The turnstile gate remains in the unlocked state d. The turnstile gate returns the coin and remains in the unlocked state e. The turnstile gate returns the coin and becomes locked f. The turnstile gate becomes locked Correct Answer: d. The turnstile gate returns the coin and remains in the unlocked state Detailed Solution: From the question figure we can observed that in Unlocked state if a coin inserted it will be return and the system will remain in the Unlocked state. QUESTION 8: Which of the following features of the state chart model are primarily responsible towards reduced number of states in the finite state modelling of a given problem? a. Nested states b. Concurrent states c. History state d. Broadcast messages e. Actions on state entry and exit Correct Answer: a. Nested states, b. Concurrent states Detailed Solution: Nested states and concurrent states reduces the state explosion problem in state chart diagram. Therefore, it reduces the number of states in the finite state modelling. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: Consider the following statement: “India shares borders with Pakistan, Bangladesh, and China.” Which one of the following is the best way to implement this in an object-oriented program? a. Define a unary association on Country class b. Let Country class implement the Border interface c. Define Country class as an aggregate of Border classes d. Define a dependency of Country class on Border class e. Define a quaternary association relation between the Countries India, Pakistan, Bangladesh, and China Correct Answer: a. Define a unary association on Country class Detailed Solution: Here countries are divided by border. So, we can define a self-association in country class with association name ‘Border.’ QUESTION 10: In an informal (natural language) description of a programming problem, which parts of the description are likely represent objects? a. All of the nouns and all of the verbs. b. All of the verbs and some of the nouns. c. Some of the nouns. d. Some of the verbs e. Some of the nouns and some of the verbs Correct Answer: c. Some of the nouns. Detailed Solution: A proper noun implies an object (instance of a class): CSE Dept, OOSD, etc. So, option c. Some of the nouns is the correct option. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment-9 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Consider the following use case diagram for an automation software. Based on the use case diagram, how many boundary classes should be designed in the domain model? a. 3 b. 5 c. 6 d. 8 e. 9 Correct Answer: e. 9 Detailed Solution: The number of boundary classes is equal to number of interactions among users and use cases. QUESTION 2: Consider the following use case diagram for an automation software. Based on the use case diagram, how many controller classes should be designed in the domain model. a. 3 b. 4 c. 5 d. 6 e. 7 Correct Answer: c. 5 Detailed Solution: For use case there is one controller class. So, based on the diagram no. of controller classes = 5. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Which of the followings are do not serve as guidelines for identifying entity classes from a problem description? a. Entity classes usually appear as data stores in a DFD model b. Entity classes usually occur as group of objects that are aggregated c. The number of classes is equal to the number of use cases in the use case model of the system d. The aggregator of the objects of an entity class corresponds to a register in the physical world e. All actors present in the use case diagram are to be considered as entity classes Correct Answer: c. The number of classes is equal to the number of use cases in the use case model of the system e. All actors present in the use case diagram are to be considered as entity classes Detailed Solution: The number of classes may not be equal to the number of use cases in the use case model. The actors are not considered as entity rather the data stores are used as entity classes. QUESTION 4: What is the number of boundary classes that must be included in the domain model for a software development project whose use case diagram is shown below? a. 4 b. 5 c. 6 d. 7 e. 8 Correct Answer: b. 5 Detailed Solution: The number of boundary classes should be equal to the number of interactions among users and use cases. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: What is the number of controller classes required in the domain model for a software development project whose use case diagram is shown below? a. 3 b. 4 c. 5 d. 6 e. 7 Correct Answer: c. 5 Detailed Solution: The number of use cases represents the number of controller classes. QUESTION 6: Which of the following statements describe a failure of a program during testing? a. The programmer misunderstood a part of the design given to him b. The programmer typed an arithmetic operator as ‘-’, though he intended to type ‘+’ c. The program crashes when a tester enters a valid input d. A code reviewer reports that he/she has found a defect in the code. e. The program produces a garbled output to a certain user query Correct Answer: c. The program crashes when a tester enters a valid input e. The program produces a garbled output to a certain user query Detailed Solution: Program crash for valid input or garbled output to a certain user query is considered as a failure during testing. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 7: About half the effort of development of a typical software is spent on testing. But, testing typically requires only 10% of the development time. Which of the followings are explain this apparent anomaly? a. A team has too many coders as compared to testers b. Testing permits many parallel activities to be conducted at any time c. A team has too many designers as compared to coders d. Testers are more proficient as compared to other developers e. Many test tools to automate some of the testing activities are available Correct Answer: b. Testing permits many parallel activities to be conducted at any time e. Many test tools to automate some of the testing activities are available Detailed Solution: Even though testing requires half of the development time, the parallel activities and test automation help in requiring only 10% of the development time. QUESTION 8: In a waterfall-based software development, which of the following are true concerning various verification activities carried out? a. All verification activities are carried out by a separate testing team b. All verification activities are carried out by the development team c. Verification involves both static and dynamic activities d. Verification involves only static activities e. Verification involves only dynamic activities Correct Answer: b. All verification activities are carried out by the development team c. Verification involves both static and dynamic activities Detailed Solution: In a waterfall-based software development, all verification activities are both static and dynamic and carried out by development team. N line Certification Courses Indian Institute P of Technology Kharagpur T E L O n QUESTION 9: Which one of the following statements is true concerning unit testing? a. Carried out by the development team b. Involves testing the system as a whole c. Often carried out by a separate testing team d. Carried out by the customers e. Concerns validation of system functions Correct Answer: a. Carried out by the development team Detailed Solution: Unit testing is carried out by development team. QUESTION 10: Which of the following are not implied by the pesticide paradox? a. A software can be tested by repeated application of a testing methodology b. A software should be tested by successive application of a wide range of testing methodologies c. A software should be tested by deploying the most promising among all the testing methodologies d. A testing methodology is effective for certain types of errors Correct Answer: a. A software can be tested by repeated application of a testing methodology c. A software should be tested by deploying the most promising among all the testing methodologies Detailed Solution: Pesticide paradox neither ensures repeated application of a testing methodology nor by deploying the most promising among all the testing methodology. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur Software Engineering Assignment-10 TYPE OF QUESTION: MCQ/MSQ Number of questions: 10 Total mark: 10 X 1 = 10 For each of the following questions one or more of the given options are correct. Choose the correct options. QUESTION 1: Why is it necessary to test a large program at three different levels: unit, integration, as well as system levels, rather than testing only at the system level? a. It reduces the number of test cases that need to be designed b. It reduces the test execution effort c. It reduces the debugging effort d. It reduces test case design effort. e. It increases thoroughness of testing Correct Answer: c. It reduces the debugging effort Detailed Solution: If we thoroughly test in the system level only, it may possible some faults of unit or integration level remain undetected. So, debugging those undetected bugs become hurdle. But, if we test in different level, debugging effort reduces. QUESTION 2: Consider a function that takes an integer a (which can assume integral values between 0 to 100) as its argument and carries out actions involving setting the value of a variable b, and the value of the variable is displayed, as specified in the following table. Condition Action (a80) b=b+10 (a== 30) b=b+20; (a==40) b=b+30; During black box testing of the function, at least how many valid equivalence case test cases are required? a. 3 b. 4 c. 5 d. 6 e. 7 Correct Answer: b. 4 Detailed Solution: valid equivalence test cases: a80 any value, a=30, and a=40. So 4 valid test cases. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Consider the following function that takes an integer a (that can assume values between 0 to 100) as argument and carries out the following actions involving setting the value of a variable b. Condition Action (a80) b=b+10 During black box testing of the function, at least how many boundary value test cases are required assuming that robust testing is not targeted? a. 5 b. 12 c. 13 d. 17 e. 18 Correct Answer: a. 5 Detailed Solution: Boundary value test cases = 4z+1=5. QUESTION 4: Consider a function named solver that solves a quadratic equation of the form ax2+bx+c=0, where a, b, and c are floating point numbers. At least how many test cases are needed for strong equivalence class testing of the function solver considering only valid equivalence classes? a. 3 b. 4 c. 5 d. 6 e. 7 Correct Answer: a. 3 Detailed Solution: NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: Consider a function named compute-grade that computes the grade of a student based on his attendance and the total marks obtained out of 100. If the attendance is below 80%, the student is assigned “F” grade irrespective of the marks scored. If the attendance of a student is 80% or more, the student with mark M is assigned a grade from EX, A, B, C, D, P, F depending upon whether M>89%, 90%>M>79%, 80%>M>69%, 70%>M>59%, 60%>M>49%, 50%>M>29%, or M=0 and = 30 and =50 and =60 and =70 and =80 and =90 and 5) and (b50)) x=x+1; a. 1 b. 2 c. 3 d. 4 e. 8 Correct Answer: b. 2 Detailed Solution: The two test cases (a = 6, b = 99, c = 51) and (a = 4, b = 101, c = 49) are enough to achieve condition/decision coverage. QUESTION 2: At least how many test cases are required to achieve multiple condition coverage of the following code segment: If((a>5) and (b50)) x=x+1; a. 2 b. 4 c. 6 d. 8 e. 16 Correct Answer: d. 8 Detailed Solution: The number of test cases required can be easily found by the formula 2 ^ n. Here n = 3, so the number of test cases required is 8. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 3: Cause-effect test cases are, in effect, designed using which one of the following types of testing techniques? a. Decision-table based testing b. Coverage-based testing c. Fault-based testing d. Path-based testing e. Boundary value testing Correct Answer: a. Decision-table based testing Detailed Solution: Cause-effect test cases are designed from Decision-table based testing. Please refer slide no. 18 for better understanding. QUESTION 4: If a user interface has three checkboxes, at least how many test cases are required to achieve pair-wise coverage? a. 2 b. 3 c. 4 d. 5 e. 6 Correct Answer: c. 4 Detailed Solution: If we use the following test cases: (000), (010), (101), (111), all pairs of check boxes can be covered. NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 5: At least how many test cases are required to achieve basic condition coverage of the following code segment: If((a>5) and (b50)) x=x+1; a. 1 b. 2 c. 3 d. 4 Correct Answer: b. 2 Detailed Solution: In basic condition coverage, each atomic condition assume T and F values. So two test cases is enough to check that. For example, a=6, b=99, and c=51 will make all conditions true and a=4, b=101, and c=49 will make all conditions false. QUESTION 6: For the following program statement, which of the following test suites would achieve basic condition/decision coverage? if (a>10 && b100) { b=b+10;} if( a == 20 ){ b=b+20;} if( a == 30 ){ b=b+30;} else{ b=b+40; } } a. 2 b. 3 c. 6 d. 8 e. 10 Correct Answer: b. 3 Detailed Solution: In decision coverage, the whole decision is executed as True and False at least once. With 3 test cases, we can achieve 100% decision coverage: a=20, a=30, a=5. QUESTION 8: At least how many test cases are needed for the C code segment given question 7, for achieving basic condition coverage? a. 2 b. 3 c. 4 d. 6 e. Basic condition coverage is not achievable Correct Answer: c. 4 Detailed Solution: From the given program, it can be observed that there are three decision. For first decision, two condition required to check: one test case for a100. For, second decision, one condition a==20 required to check so one test case. Similarly, for third decision, one condition a==30 required to check so one test case. So, total four test cases required for achieving basic condition coverage. The test cases are:- TC1: a=20, TC2: a=30, TC3: a=5, TC4: a=105 NPTEL Online Certification Courses Indian Institute of Technology Kharagpur QUESTION 9: At least how many test cases are needed for the C code segment given question 7, for achieving multiple condition coverage? a. 4 b. 5 c. 6 d. 8 e. Multiple condition coverage is not achievable for the given code Correct Answer: e. Multiple condition coverage is not achievable for the given code Detailed Solution: For the first decision of the given code, we can see that it consist of two condition: one is a100. It is not possible to make both the condition true for a single test case. For example, if we take a=5 then a100 is not true. Similarly, if we take a=110 then a>100 become true but a5) or (b