Transcript
Page 1: Software Engineering I - Solved Assignments - Semester Spring 2010

SOF T W A R E ENG I NEER I NG I

SOVLE D A SS I G NM ENT S

SEM EST ER SPR I NG 2 0 1 0

Assignment 1

A company decides to develop a web site, which lets people buy and sell their software applications. This company

works as negotiator between buyers and sellers and takes commission for this service. The company aims to develop

this website user friendly.

You are required to study this idea deeply and prepare Functional requirement specification of placing online

order module.

Note: Before writing the Functional specification, try to understand the domain by carefully going through some

websites where online order placing is done.

Solution:

Functional Requirements:

Placing Order module provide following functional requirements

FR01: Provide user name and real name

FR01-01 System shall get Username from user

FR01-02 System should check the availability of use name

FR01-03 System shall enable the user to see if user name already exists or not

Page 2: Software Engineering I - Solved Assignments - Semester Spring 2010

FR01-04 System shall enable the user to see if user name is not an alphabet or empty

FR01-05 System shall get Real name from user

FR02: Provide password details

FR02-01 System shall get password from user

FR02-02 System shall confirm password from user.

FR02-03 System shall enable the user to see if password does not match

FR03: Supply e-mail address

FR03-01 System shall allow user to add Email address

FR03-02 System shall enable the user to see whether email address is valid or not

FR04: Secret Question selection

FR04-01 System shall allow user to select secret question by selecting from a menu list.

FR04-02 System shall allow user to add Secret Question

FR04-03 System shall enable the user to see whether he/she has added secret question and answer

FR05: Answer Secret Question

FR04-01 System shall allow user to type the answer of the Secret Question

FR04-02 System shall allow user to see the answer of the secret Question

FR06: Supply Quantity

FR05-01 System shall get quantity from the user

Page 3: Software Engineering I - Solved Assignments - Semester Spring 2010

FR07: Supply Address

FR07-01 System shall get the home address details from the user

FR07-01 System shall get the city name from the user

FR07-01 System shall get the country name from the user

FR07-01 System shall get the zip/postal code from the user

FR08: Payment Mode

FR08-01 System shall give the facility to choose the payment mode from drop down menu

FR08-02 System shall allow to enter payment to the user

FR09-01 Press Submit Button

FR09-01 System shall give the permission to click the submit button for the completed of order.

Page 4: Software Engineering I - Solved Assignments - Semester Spring 2010

Assignment 2

You are required to draw a complete State Transition Diagram (STD) of a university from enrollment of student to his/her pass-out. You will have to draw the diagram up to N level to cover all the activities of university starting from enrollment request by student to final pass-out process after completion of degree.

Solution:

Page 5: Software Engineering I - Solved Assignments - Semester Spring 2010

Result Compiled / Announced

Short listing for interview completed

Result Announced

Semester completed

Finalterm Exam

Conducting interview

Interview date arrived

Sending Interview Letters

Result compilation

Conducting Entry test

Sending Letters

Applications in process

Submit Admission Form

Short listing Completed

Entry test date arrived

Entry test conducted

Interviews conducted

Compiling result

Fee submission for next Semester

Classes in Conduct

Semester Commenced

Midterm

Assignments / Quizes

Result announced

Degree Awarded

Program Completed

Page 6: Software Engineering I - Solved Assignments - Semester Spring 2010

Assignment 3

Suppose you have been hired as a web developer in knsolutions. Project manager assigns you to develop a School Admission System, in which a student can register himself and apply for online admission in desired class.

Now you are required to develop Object Model of the System using Abbot’s Methodology taught to you during lectures. You will design the above system according to the instructions given below:

1. Identify all the objects / classes of the proposed system. 2. Show the inheritance between classes (if exist). 3. Show aggregation / composition relationship between objects of different classes (if exist). 4. Make sure to show all the attributes, behaviors (Methods) of the classes identified in the system. 5. There should be less coupling and high cohesion of the objects / classes of the system

What to deliver:

You have to submit a complete object model according to the above criteria in MS WORD or MS VISIO.

Solution:

Page 7: Software Engineering I - Solved Assignments - Semester Spring 2010

Details of Each class:

Class: Student

Attributes:

Char *pName;

Char *pFName;

Char *pAddress;

Methods:

Generate rollnoslip request

EntryTest

MeritList

Student Student Information

Eligibility

RollnoSlip

Submits Verify

Is issued

Takes

Submit Result

Page 8: Software Engineering I - Solved Assignments - Semester Spring 2010

getPersonalInfo()

getAcademicHistory()

verifyCertificates()

Page 9: Software Engineering I - Solved Assignments - Semester Spring 2010

Class: StudentInformation

Attributes:

Student *pNewStudent;

Methods:

verifyEligibility()

requestRollNoSlip()

Class: Eligibility

Attributes:

Bool IsEligible;

Methods:

getAcademicHistory()

getProgramRequested()

verifyEligibility()

IsEligible()

Page 10: Software Engineering I - Solved Assignments - Semester Spring 2010

Class: RollNoSlip

Attributes:

Student *pNewEligibleStudent();

Methods:

getStudentInfo();

generateRollNoSlip();

Page 11: Software Engineering I - Solved Assignments - Semester Spring 2010

Class: EntryTest

Attributes:

Int QuestionID

Char* pQuestionStem

Char[4] options

Int CorrectOption

Methods:

getNextquestion()

verifyAnswer();

StoreInDB();

Class: MeritList

Attributes:

Char *pStudentRollNo

Methods:

getResult()

EvaluateMerit()

PrepareList()

Page 12: Software Engineering I - Solved Assignments - Semester Spring 2010

PrintList();

Page 13: Software Engineering I - Solved Assignments - Semester Spring 2010

Assignment 4

You have studied one tier, two tier, three tier architectures in detail and a concept of N tier architectures. Dividing Software Architecture in Tiers is especially beneficial to manage large scale projects’ complexity. You are required to find out in software engineering domain the pros and cons with respect to software development , if we work in N-Tier, where N>3.

Solution:

In software engineering, multi-tier architecture (often referred to as n-tier architecture) is a client–

server architecture in which the presentation, the application processing, and the data

management are logically separate processes. For example, an application that uses middleware

to service data requests between a user and a database employs multi-tier architecture. The most

widespread use of multi-tier architecture is the three-tier architecture.

The concepts of layer and tier are often used interchangeably. However, one fairly common point

of view is that there is indeed a difference, and that a layer is a logical structuring mechanism for

the elements that make up the software solution, while a tier is a physical structuring mechanism

for the system infrastructure.

N-tier application architecture provides a model for developers to create a flexible and reusable

application. By breaking up an application into tiers, developers only have to modify or add a

specific layer, rather than have to rewrite the entire application over. There should be a

presentation tier, a business or data access tier, and a data tier.

Three-tier is a client–server architecture in which the user interface, functional process logic

("business rules"), computer data storage and data access are developed and maintained as

independent modules, most often on separate platforms. It was developed by John J. Donovan in

Open Environment Corporation (OEC), a tools company he founded in Cambridge, MA.

Page 14: Software Engineering I - Solved Assignments - Semester Spring 2010

N-TIER APPLICATION

ARCHITECTURE

N-tier application architecture provides a model

for developers to create a flexible and reusable

application. By breaking up an application into

tiers, developers only have to modify or add a

specific layer, rather than have to rewrite the

enitire application over, if they decide to change

technologies or scale up. In the term "N-tier,"

"N" implies any number -- like 2-tier, or 4-tier;

basically, any number of distinct tiers used in

your architecture. Application architectures are

part of Layer 7 of the OSI model.

THE THREE-TIER MODEL IS A SOFTWARE ARCHITECTURE AND A SOFTWARE DESIGN

PATTERN.

Apart from the usual advantages of modular software with well-defined interfaces, the three-tier

architecture is intended to allow any of the three tiers to be upgraded or replaced independently as

requirements or technology change. For example, a change of operating system in the

presentation tier would only affect the user interface code.

Typically, the user interface runs on a desktop PC or workstation and uses a standard graphical

user interface, functional process logic may consist of one or more separate modules running on a

workstation or application server, and an RDBMS on a database server or mainframe contains the

computer data storage logic. The middle tier may be multi-tiered itself (in which case the overall

architecture is called an "n-tier architecture").

WEB DEVELOPMENT USAGE

In the web development field, three-tier is often used to refer to websites, commonly electronic

commerce websites, which are built using three tiers:

1. A front-end web server serving static content, and potentially some are cached dynamic content. In

web based application, Front End is the content rendered by the browser. The content may be static

or generated dynamically.

Page 15: Software Engineering I - Solved Assignments - Semester Spring 2010

2. A middle dynamic content processing and generation level application server, for example Java EE,

ASP.NET, PHP platform.

3. A back-end database, comprising both data sets and the database management system or RDBMS

software that manages and provides access to the data.

THE PROS OF THE N-Tier MODEL ARE AS FOLLOWS:

Scalability: The key N-Tier benefit is improved scalability since the application servers can be deployed on

many machines. Also, the database no longer requires a connection from every client -- it only requires

connections from a smaller number of application servers. In addition, TP monitors or ORBs can be used to

balance loads and dynamically manage the number of application server(s) available.

Better Re-usability: The same logic can be initiated from many clients or applications. If an object standard

like COM/DCOM or CORBA is employed (as discussed in tool dependence), then the specific language

implementation of the middle tier can be made transparent.

Better Data Integrity: since all updates go through the middle tier, the middle tier can ensure that only valid

data is allowed to be updated in the database and the risk of a rogue client application corrupting data is

removed.

Improved Security: Security is improved since it can be implemented at multiple levels (not just the

database). Security can be granted on a service-by-service basis. Since the client does not have direct

access to the database, it is more difficult for a client to obtain unauthorized data. Business logic is generally

more secure since it is placed on a more secure central server.

Reduced Distribution: Changes to business logic only need to be updated on the application servers and

do not have to be distributed to all the clients.

Improved Availability: mission-critical applications can make use of redundant application servers and

redundant database servers. With redundant servers, it is possible to architect an application so that it can

recover from network or server failures.

Database Structure (Hidden): since the actual structure of the database is hidden from the caller, it is

possible that many database changes can be made transparently. Therefore, a service in the middle tier

Page 16: Software Engineering I - Solved Assignments - Semester Spring 2010

that exchanges information/data with other applications could retain its original interface while the underlying

database structure was enhanced during a new application release.

THE CONS OF THE N-Tier MODEL ARE AS FOLLOWS:

Increased Complexity/Effort: In general, it is more difficult to build a N-Tier application compared to a 2-

tier application. The points of communication are doubled (client to middle tier to server, instead of simply

client to server) and many handy productivity enhancements provided by client tools (e.g. Visual Basic,

PowerBuilder, Delphi) will be foregone or their benefit will be reduced with a N-Tier architecture.

Fewer Tools: There are many more tools available for a 2-tier model (e.g. most reporting tools). It is likely

that additional programming effort will be required to manage tasks that an automated tool might handle in a

2-tier environment.

Page 17: Software Engineering I - Solved Assignments - Semester Spring 2010

Assignment 5

Elaborate the role of verification and validation in software engineering with solid reasoning.

Solution:

Verification and validation are the processes used in Software testing in which we check a product against its specifications and the expectations of the users who will be using it. Software testing is a critical element in the software development life cycle and has the potential to save time and money by identifying problems early and to improve customer satisfaction by delivering a more defect-free product. A software application may fulfill its specifications but it may deviate from user’s expectations or their desired behavior.

Verification:

Verification concerns normally about two questions that are; Does the product meet system specifications? Have you built the product right? The verification process confirms that the software meets its technical specifications. A “specification” is a description of a function in terms of a measurable output value given a specific input value under specific preconditions. A simple specification may be along the line of “a SQL query retrieving data for a single account against the multi-month account-summary table must return these eight fields <list> ordered by month within 3 seconds of submission.”

Validation:

Verification concerns normally about two questions that are; Does the product meet user expectations? Have you built the right product? The validation process confirms that the software meets the business requirements. A simple example of a business requirement is “After choosing a branch office name, information about the branch’s customer account managers will appear in a new window. The window will present manager identification and summary information about each manager’s customer base: <list of data elements>.” Other requirements provide details on how the data will be summarized, formatted and displayed.

Here are some examples in which the processes of verification and validation were not done successfully and the problem was discovered at a later stage.

♦ In February 2003 the U.S. Treasury Department mailed 50,000 Social Security checks without a beneficiary name. A spokesperson said that the missing names were due to a software program maintenance error.

♦ In July 2001 a “serious flaw” was found in off-the-shelf software that had long been used in systems for tracking U.S. nuclear materials. The software had recently been donated to another country and scientists in that country discovered the problem and told U.S. officials about it.

♦ In October 1999 the $125 million NASA Mars Climate Orbiter—an interplanetary weather satellite—was lost in space due to a data conversion error. Investigators discovered that software on the spacecraft performed certain calculations in English units (yards) when it should have used metric units (meters).

♦ In June 1996 the first flight of the European Space Agency's Ariane 5 rocket failed shortly after launching, resulting in an uninsured loss of $500,000,000. The disaster was traced to the lack of exception handling for a floating-point error when a 64-bit integer was converted to a 16-bit signed integer.