Assignment 2 Solutions, Schemes and Mind Maps of Computer Science

It contains solutions to the assignemnts

Typology: Schemes and Mind Maps

2019/2020

Uploaded on 12/19/2021

naman-gill
naman-gill 🇮🇳

3 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Question 1 --50 marks
(1) (4 marks) List four (4) attributes of good software.
Software process models
Essential attributes of good software
MaintainabilitySoftware should be written in such a way so that it can evolve to meet the changing needs of
customers. This is a critical attribute because software change is an inevitable requirement of a changing business
environment.
Dependability and security Software dependability includes a range of characteristics including reliability, se-
curity and safety. Dependable software should not cause physical or economic damage in the event of system fail -
ure. Malicious users should not be able to access or damage the system.
EfficiencySoftware should not make wasteful use of system resources such as memory and processor cycles.
Efficiency therefore includes responsiveness, processing time, memory utilisation, etc.
AcceptabilitySoftware must be acceptable to the type of users for which it is designed. This means that it must
meet user needs, be understandable, usable and compatible with other systems that they use.
(2) (3 marks) What is a major disadvantage of the waterfall software development
process?
Waterfall model problems
Waterfall model problems
Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer require-
ments.
Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly
limited during the design process.
Few business systems have stable requirements.
The waterfall model is mostly used for large projects where a system is developed by distinct groups.
In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work.
(3) (3 marks) What is a major disadvantage of the agile software development
process?
Problems with agile methods
Waterfall model problems
Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer require-
ments.
Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly
limited during the design process.
Few business systems have stable requirements.
The waterfall model is mostly used for large projects where a system is developed by distinct groups.
In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work.
(4) (3 marks) What is a major positive benefit of developing a prototype?
Benefits of prototyping
Improved system usability.
A closer match to users’ real needs.
This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06:00
https://www.coursehero.com/file/39557021/2011examdocx/
pf3
pf4
pf5

Partial preview of the text

Download Assignment 2 Solutions and more Schemes and Mind Maps Computer Science in PDF only on Docsity!

Question 1 --50 marks

(1) (4 marks) List four (4) attributes of good software.

Software process models

Essential attributes of good software

Maintainability : Software should be written in such a way so that it can evolve to meet the changing needs of customers. This is a critical attribute because software change is an inevitable requirement of a changing business environment. Dependability and security : Software dependability includes a range of characteristics including reliability, se- curity and safety. Dependable software should not cause physical or economic damage in the event of system fail - ure. Malicious users should not be able to access or damage the system. Efficiency : Software should not make wasteful use of system resources such as memory and processor cycles. Efficiency therefore includes responsiveness, processing time, memory utilisation, etc. Acceptability :Software must be acceptable to the type of users for which it is designed. This means that it must meet user needs, be understandable, usable and compatible with other systems that they use.

(2) (3 marks) What is a major disadvantage of the waterfall software development

process?

Waterfall model problems

Waterfall model problems Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer require- ments. Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process. Few business systems have stable requirements. The waterfall model is mostly used for large projects where a system is developed by distinct groups. In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work.

(3) (3 marks) What is a major disadvantage of the agile software development

process?

Problems with agile methods

Waterfall model problems Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer require- ments. Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process. Few business systems have stable requirements. The waterfall model is mostly used for large projects where a system is developed by distinct groups. In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work.

(4) (3 marks) What is a major positive benefit of developing a prototype?

Benefits of prototyping

Improved system usability. A closer match to users’ real needs. This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06:

Improved design quality. Improved maintainability. Reduced development effort.

(5) (3 marks) Why is the testfirst principle so important in the Extreme

Programming process model?

Extreme programming practices+Test-first development

Extreme programming practices Incremental planning: Requirements are recorded on story cards and the stories to be included in a release are de- termined by the time available and their relative priority. The developers break these stories into development ‘Tasks’. Small releases: The minimal useful set of functionality that provides business value is developed first. Releases of the system are frequent and incrementally add functionality to the first release. Simple design : Enough design is carried out to meet the current requirements and no more. Test-first development: An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented. Refactoring: All developers are expected to refactor the code continuously as soon as possible code improvements are found. This keeps the code simple and maintainable. Pair programming: Developers work in pairs, checking each other’s work and providing the support to always do a good job. Collective ownership: The pairs of developers work on all areas of the system, so that no islands of expertise de - velop and all the developers take responsibility for all of the code. Anyone can change anything. Continuous integration: As soon as the work on a task is complete, it is integrated into the whole system. After any such integration, all the unit tests in the system must pass. Sustainable pace: Large amounts of overtime are not considered acceptable as the net effect is often to reduce code quality and medium term productivity On-site customer: A representative of the end-user of the system (the customer) should be available full time for the use of the XP team. In an extreme programming process, the customer is a member of the development team and is responsible for bringing system requirements to the team for implementation. Test-first development Writing tests before code clarifies the requirements to be implemented. Tests are written as programs rather than data so that they can be executed automatically. The test includes a check that it has executed correctly. Usually relies on a testing framework such as JUnit. All previous and new tests are run automatically when new functionality is added, thus checking that the new functionality has not introduced errors. Tools like make can be used to automate the build and test cycle Cons for Test-first development It necessitates a lot of time and effort up front, which can make development feel slow to begin with. Focusing on the simplest design now and not thinking ahead can mean major refactoring requirements. It’s difficult to write good tests that cover the essentials and avoid the superfluous. It takes time and effort to maintain the test suite – it must be reconfigured for maximum value. If the design is changing rapidly, you’ll need to keep changing your tests. You could end up wasting a lot of time writing tests for fea - tures that are quickly dropped. This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06:

problems further down the line. This problem is referred to as Retrieval-Induced For-

getting (RIF), and is highly prevalent during requirements elicitation.

(9) (3 marks) What are the key aspects of a repository architecture that differenti

ate it from a clientserver architecture?

Repository+client-server

Repository architecture ² Sub-systems must exchange data. This may be done in two ways:§ Shared data is held in a central database or repository and may be accessed by all sub-systems;§ Each sub-system maintains its own database and passes data explicitly to other sub-systems.² When large amounts of data are to be shared, the repository model of sharing is most commonly used a this is an efficient data sharing mechanis The Repository pattern Description: All data in a system is managed in a central repository that is accessible to all system components. Components do not interact directly, only through the repository. Example: Figure 6.9 is an example of an IDE where the components use a repository of system design information. Each software tool generates information which is then available for use by other tools. When used :You should use this pattern when you have a system in which large volumes of information are generated that has to be stored for a long time. You may also use it in data-driven systems where the inclusion of data in the repository triggers an action or tool. Advantages: Components can be independent—they do not need to know of the existence of other components. Changes made by one component can be propagated to all components. All data can be managed consistently (e.g., backups done at the same time) as it is all in one place. Disadvantages: The repository is a single point of failure so problems in the repository affect the whole system. May be inefficiencies in organizing all communication through the repository. Distributing the repository across several computers may be Difficult. Client-server architecture Distributed system model which shows how data and processing is distributed across a range of components. § Can be implemented on a single computer. (E.g. X window system under Unix.) ² Set of stand-alone servers which provide specific services such as printing, data management, etc. ² Set of clients which call on these services. ² Network which allows clients to access servers The Client–server pattern Description: In a client–server architecture, the functionality of the system is organized into services, with each service delivered from a separate server. Clients are users of these services and access servers to make use of them Example :Figure 6.11 is an example of a film and video/DVD library organized as a client–server system When used :Used when data in a shared database has to be accessed from a range of locations. Because servers can be replicated, may also be used when the load on a system is variable This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06:

Advantages :The principal advantage of this model is that servers can be distributed across a network. General functionality (e.g., a printing service) can be available to all clients and does not need to be implemented by all services Disadvantage :Each service is a single point of failure so susceptible to denial of service attacks or server failure. Performance may be unpredictablebecause it depends on the network as well as the system. May be - management problems if servers are owned by differentorganizatio

(10) (3 marks) Why should version management be used in a software develop

ment project?

Version management

Version management Version management (VM) is the process of keeping track of different versions of software components or configuration items and the systems in which these components are used. It also involves ensuring that changes made by different developers to these versions do not interfere with each other. Therefore version management can be thought of as the process of managing codelines and baselines. ² Typical software: RCS, CVS, SubVersion

(11) (3 marks) How does a reciprocal open source licence differ from a nonrecip

rocal open source licence?

License mode-( reciprocal none-reciprocal)

License mode-( reciprocal none-reciprocal) The GNU General Public License (GPL). This is a so-called ‘reciprocal’ license that means that if you use open source software that is licensed under the GPL license, then you must make that software open source. ² The GNU Lesser General Public License (LGPL) is a variant of the GPL license where you can write components that link to open source code without having to publish the source of these components. ² The Berkley Standard Distribution (BSD) License. This is a non-reciprocal license, which means you are not obliged to republish any changes or modifications made to open source code. You can include the code in proprietary systems that are sold.

(12) (3 marks) At what stages of a software project should regression test ing be

used?

Benefits of test-driven developme-what stage of regression testing

Benefits of test-driven developme-what stage of regression testing Code coverage § Every code segment that you write has at least one associated test so all code written has at least one test. ² Regression testing § A regression test suite is developed incrementally as a program is developed. ² Simplified debugging This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06:

Maintenance cost factors Team stability } Maintenance costs are reduced if the same staff are involved with them for some time. } Contractual responsibility } The developers of a system may have no contractual responsibility for maintenance so there is no incentive to design for future change. } Staff skills } Maintenance staff are often inexperienced and have limited domain knowledge. } Program age and structure } As programs age, their structure is degraded and they become harder to understand and change Maintenance prediction Determining maintenance budgets requires prediction of cost of implementing changes to the system. } Cost of system changes depends on } Size/complexity of changes } Number of change requests } Maintenance prediction is concerned with assessing the system to } Estimate frequency of change requests } Identify parts of system likely to require change } Estimate likely cost of change to different parts of the system

(15) (8 marks) A function accepts a string of characters that represent a fractional

number, and returns the floating point number that the string represents.

The number has the following format:

at least 1 and at most 16 digits, followed by an optional frac tional part

where the fractional part has the format:

a full stop (period) followed by zero or more digits, with at most 10 digits

For example, the following are valid strings: 1, 2, 5.

Describe test partitions that will test if valid strings are accepted (do not describe test

cases for invalid input like 5;3).

For each partition, list some typical test data.

This study source was downloaded by 100000831877815 from CourseHero.com on 12-19-2021 00:09:09 GMT -06: https://www.coursehero.com/file/39557021/2011examdocx/ Powered by TCPDF (www.tcpdf.org)