You are on page 1of 10

Final Assignment

Name: MD Ziaul Haque Shipon Student ID: 201980090184

The stimulus is given- You are a software manager in a company that develops critical
control software for aircraft. You are responsible for the development of a software
design support system that supports the translation of software requirements to a formal
software specification. Provide your answer to the following questions.

2.1 When would you recommend the use of an agile method for developing a
software system?

Answer:

Agile approaches are adopting by firms across all sectors and markets. The conviction
that Agile has the capacity to significantly change, modernize, and enhance businesses
by expediting system development, enhancing flexibility and efficiency, and simplifying
complex business systems and processes is the driving force behind this.

- When it's time to make some modifications. Agile provides us a lot of flexibility
when it comes to change. Because of the regularity with which new increments
are created, new alterations may be applied at a low cost.

- To roll back and install a new feature, developers only need to lose a few days'
worth of work, if not only hours, to roll back and implement it.

- Both system developers and stakeholders discover that they have more time and
alternatives than they would if the program was produced in a more rigorous
sequential manner. Having alternatives allows them to defer crucial decisions
until additional or better data, or even complete hosting programs, become
available, allowing the project to proceed without risk of coming to a halt.

- When it comes to urgency to deliver software, agile method is widely used to


develop software by focusing on important user cases.
2.2 Extreme programming expresses user requirements as stories. List three
user stories in the support system. Provide details with each stories.

Answer:

Extreme programming (XP) is perhaps the best known and most widely used of the
agile method. Extreme programming expresses requirements as scenarios, which are
then realized as a succession of activities. Through incremental planning, small
releases, simple design, test-first development, refactoring, pair programming, collective
responsibility, sustainable pace, and on-site client, this approach incorporates a variety
of principles.

Simple Design: Simple Design is an approach that follows the guideline of keeping
things simple, as the name implies. Early on in the history of Extreme Programming, an
abbreviation was coined to represent the Simple Design methodology: YAGNI. This
stands for 'You Aren't Gonna Need It,' implying that if something isn't needed, it should
be left out. Some programmers have the ability to offer ideas regardless of cost or
complexity. Each programmer should be able to prevent costly diversions and mistakes
by learning and applying Simple Design and remembering the acronym. YAGNI prefers
a strategy that focuses on what is required right now over decisions based on future
design.

Test-Driven Development: TDD is a software development methodology in which test


cases are created to define and validate what the code will accomplish. To put it another
way, test cases for each capability are generated and tested first, and if the test fails,
new code is produced to pass the test, resulting in code that is simple and bug-free.
Test-Driven Designing and building tests for each tiny function of an application is the
first step in development. Only write new code if an automated test fails, according to
the TDD methodology. This prevents code duplication.

Refactoring: Is a practice of software development that allows you to improve the code
without changing or breaking its functionality. It is aimed at simplification. The code
should be as simple as possible to find all the bugs and to make it easy to change
something in the process of project’s performance. Refactoring is especially necessary
in Extreme Programming and other Agile projects because they require strong customer
involvement into the working process. If the client wants to change something in the
final product, the team should make these changes as fast as it is possible. XP code
refactoring allows you to achieve this goal.

2
2.3 Design an agile approach for this project. Describe the activities in each
stages.

Answer:

In this project I choose Extreme Programming as an agile approach. Extreme


programming (XP) is perhaps the best known and most widely used of the agile
method. Extreme programming expresses requirements as scenarios, which are then
realized as a succession of activities.

Image Reference link

There are 6 phases given in Agile XP method, and those are explained in key points as
follows:--

Planning
- Stakeholder and sponsor identification
- Needs for Infrastructure
- Service Level Agreements and their terms and circumstances relating to security
- information and collection

Analysis
- Capturing of Stories in Terminal
- In the Terminal, prioritize the stories.
- Estimation of tales through scrubbing
- Iteration should be defined. SPAN(Time)
- Resource Planning for Development and Quality Assurance Teams

3
Design
- Tasks are broken down
- For each job, prepare a test scenario.
- Framework for Regression Automation

Execution
- Coding
- Unit Testing
- Manual test scenarios are carried out.
- Generation of a Defect Report
- Regression test cases converted from manual to automated
- Mid Iteration review
- Review at the end of each iteration

Wrapping
- Small Releases
- Regression Testing
- Demos and reviews
- Create new stories based on the requirements.
- Improvements to the process based on the feedback received at the end of each
iteration

Release
- System Launch
- Training
- Production Launch
- SLA (Service Level Agreement) Assurance
- Review SOA strategy
- Production Support
Two storyboards are available to monitor work on a daily basis, and they are given
below for your convenience.

Story Cardboard
To document daily XP activities, this is a typical approach of collecting all the stories on
a board in the form of sticky notes. Switching to an online form is preferable because
this manual process requires more work and time.

Online Storyboard
Web-based application The stories may be saved on a storyboard. It may be used by
several teams for various objectives.

4
3. 1 Suppose the system should be examined every Wednesday. Write a
JavaScript program to calculate days left until the next examine date.

Answer:
The code explained in few steps-
1. First create a date object.
2. Then use a getDay() function and pass the date inside the function by using getDate().
3. The function will return the current day in number format.
4. Then we have to check how many days are left till last Wednesday.
5. If Wednesday has not yet passed then we subtract todayDayNumber from 3.
6. If passed then subtract DayNumber from 7 and add 3. Will get results.
JS code are Given below-
<script>
//date object
const date = new Date();
let TodayDayNumber = date.getDay(date.getDate());
//print the remaining day for examine as value
if(TodayDayNumber > 3){
let value = (7 - TodayDayNumber) + 3;
console.log( value + "Days left for the next examine date");
}else{
let value = 3 - TodayDayNumber;
console.log(value + " Days left for the next examine date");
}
</script>
Output-
On 6 June, Monday On 7 June, Tuesday On 8 June, Wednesday

2 days left for the next examine date. 1 days left for the next examine date. 0 days left for the next examine date.

5
3. 2 The aircraft has 184 seats and they are categorized into four types. Write a
JavaScript program which iterates the integers from 1 to 184. For multiples of 5
print “type A” instead of the number and for the multiples of 7 print“type B”. For
numbers which are multiples of both 5 and 7 print “type C”.

Answer:

The code explained in few steps-


1. First run a ‘for’ loop to iterate from 1 to 184
2. In the ‘if’ statement var i is both multiplies of 5 and 7. Then print the ‘i’ no seat in
“type C”.
3. Else if var i is only multiplies of 5 then print the ‘i’ no seat in “type A”.
4. Else if var i is only multiplies of 7 then print the ‘i’ no seat in “type B”.

JS code are given below-


<script>
// iterates from 1 to 184
for(var i = 1; i<=184; i++){
// if seat number is multiplies of both 5 and 7 then print 'type C'
if(i%5 == 0 && i%7 == 0){
document.write("Seat no ", + i ," - ");
document.write("type C");
document.write("<br>");
}
// if seat number is multiplies of 5 then print 'type A'
else if(i%5 == 0){
document.write("Seat no ", + i ," - ");
document.write("type A");
document.write("<br>");
}
// if seat number is multiplies of 7 then print 'type B'
else if(i%7 == 0){
document.write("Seat no ", + i ," - ");
document.write("type B");
document.write("<br>");
}
}
</script>

6
Output-
Seat no 5 - type A
Seat no 7 - type B
Seat no 10 - type A
–-–---------
–-----------
Seat no 25 - type A
Seat no 28 - type B
Seat no 30 - type A
Seat no 35 - type C
--- - - - - - - - -
----- - - - - - - - -
--- - - - - - - - -
Seat no 170 - type A
Seat no 175 - type C
Seat no 180 - type A
Seat no 182 - type B

3. 3 The reported case is issued with a unique serial number. The serial
number should start with a letter in uppercase. The letter should be followed by 8
digits. Write a function to check whether a given value is a valid serial number or
not.

Answer:

The code explained in few steps-


1. Define a function uniqueSerialNumber() in javascript which checks if a serial number input by
the user is valid or not.
2. Get the value of the serial number from the id = "serial" and initialize the text as "Valid
Serial Number!"
3. Checking using an if statement If the serial number is precisely 9 characters long, then
the if block is executed; otherwise, the else block is executed, and the text is set to
"Invalid Serial Number!"
4. Check if the first character is an uppercase letter using another if statement; if so,
execute the appropriate if block; otherwise, proceed with the appropriate else block and
set the text to "Invalid Serial Number!"
5. Create a for loop to go over all of the characters in the number starting at the second
place in the string. Continue the loop if the characters are all digits; else, change the text
to "Invalid Serial Number!" and exit the loop.
6. In the HTML Document Using a text box, collect user input for the serial number. Create
a submit button that, when clicked, launches the uniqueSerialNumber() function.
7. Write the message in the web page using innerHTML tag and the text string variable

7
JS code are given below-

<script>

function uniqueSerialNumber()
{
let Characters = document.getElementById("serial").value;
let text = "Valid Serial Number!";
//For An uppercase First letter and followed by 8 integers are total 9 character
if( Characters.length == 9 )
{
if(Characters[0] >= 'A' && Characters[0] <= 'Z')
{
for(let i = 1 ; i < Characters.length ; i++)
{
if(Characters[i] >= 0 || Characters[i] <= 9)
continue;
else
{
text = "Invalid Serial Number!";
break;
}
}
}
//if the First character is not an uppercase letter set the text as "Invalid Serial
Number!"
else
{
text = "Invalid Serial Number!";
}
}
// else if the number of characters is not exactly 9 set the text as "Invalid Serial
Number!"
else
{
text = "Invalid Serial Number!";
}
document.getElementById("a").innerHTML = text;
}
</script>
<div>
<p> Enter a Serial Number : </p>
<input id="serial">
<button type="button" onclick="uniqueSerialNumber()">Check</button>
<p id="a"></p>
</div>

8
Outputs-

4. 1 Use a case in this project to show the difference between task-parallelism


and data-parallelism.

Answer:

This project is based on developing critical control software for aircraft. And I work in the
development of software design support systems that translate software requirements to
specification. Here I choose “Flight’s Scheduling” as a case to show the difference between
task-parallelism and data-parallelism. For that, firstly I have to mention all the factors that are
related to the flight schedule.

Airlines consider a number of factors when determining the block time and your very specific
departure and arrival times. The airport infrastructure is also significant, including how many
gates are available and when they are available, the busiest time of day for that specific location,
how many runways are open, and whether construction or other obstacles reduce the number of
flights or extend the block time. Airlines also consider connections, working backwards from the
departure time of crucial connecting flights to decide when flights should arrive. Flight schedules
are planned many months in advance by airline schedule planning teams, so circumstances like
bad weather, runway work, or other unforeseen occurrences will influence departure and arrival
timings.

As we know that Task parallelism is doing Multiple tasks in the same data or different data.
Flight scheduling is really unpredictable as we see in the above paragraph. We must monitor all
the information that is related to the flight schedule. So, here one processor can not do one task at
a time or one processor can’t do all tasks at once. In task parallelism we can design our project
by dividing scheduling tasks into multiple tasks to check separately at once if flight is on the
runway, weather is good, how about air traffic, if gates are available etc. After calculating all the
aspects de can determine specific departure and arrival time and can inform passengers in
advance.

9
On the other hand, data parallelism is a single instruction for multiple data. Sometimes, we need
to do one single task with lots of data. For example in flight’s scheduling if a passenger is not in
time as arrival time. We need to search which passenger is missing by sorting all flight numbers,
ticket numbers, passport numbers. After finding correct information, the system will announce
the missing passenger to come to the gate soon. That should be a use of data-parallelism.

4. 2 Discuss which part in this project would benefit from the use of parallel
computing.

Answer:

As given in stimulus, the project is to develop critical control software for aircraft. And my job is
development of a software design support system that supports the translation of software
requirements to a formal software specification. This project is not just about a single system.
Here lots of things are connected with each other like airports, aircraft , agencies , passengers.
It’s much bigger than we imagine. For this large amount of data around worldwide should be
managed errorlessly. To end this problem there are lots of benefits of using parallel computing.

The National Airspace System's countrywide air traffic flow control is a difficult large-scale
optimization problem that is critical to the future growth of Air Traffic Management. The
large-scale air traffic flow optimization is split into smaller independent optimization
subproblems and addressed utilizing parallel computing using a Link Transmission Model and
dual decomposition approach. Because the model is solved using Mixed Integer Linear
Programming, finding the best integral solution takes longer than Linear Programming. To
improve the model's applicability, a parallel computing framework is created, which investigates
the model's parallelism in order to improve computational performance. To do parallel
computing, heterogeneous computers are grouped in a Client/Server topology. The optimization
effort is dispersed to numerous processors in a parallel way by further investigating the
multithreading potential of multi-core computers. The parallel computing system reduces the
duration of countrywide air traffic optimization from hours to minutes, according to simulations.
Furthermore, in comparison to traditional single thread optimization methods, the framework
may accomplish predicted runtime reductions by deploying more computer resources without
worrying about increasing traffic network complexity, allowing for near real-time air traffic flow
optimization.

End

Note: All the above answers are written by me and my own understanding of the question. Thank you.

10

You might also like