Skip to document
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.

Lesson review 03

continuation of our lab practice work.
Course

Software Development Capstone (ITEC 4904)

3 Documents
Students shared 3 documents in this course
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Western Governors University

Comments

Please sign in or register to post comments.

Preview text

Lesson 3

Understanding General Software Development

Learning Objectives

Students will learn about:
  • Application Lifecycle Management
  • Testing
  • Data Structures
  • Sorting Algorithms

ODN Skills

  • Understand application lifecycle management. 3.
  • Understand algorithms and data structures. 3.

Lesson Summary

This lesson covers two separate topics:
1. Application lifecycle management.
2. Algorithms and data structures.
You should emphasize the fact that software development is only one activity in the
complete application lifecycle. A whole range of people perform various activities in
order to turn an idea into reality. This lesson discusses activities such as design,
development, testing, and release.
The next topic covers the software testing activity in detail. At the end of the discussion,
students should before familiar with approaches to testing. You should point out that
complex business applications have a large number of possible execution paths. Many of
these execution paths depend on the runtime data. It is almost impossible to guarantee
that the application will have zero defects. As part of testing, you verify that the software
works as expected for the known execution paths.
The next section of the lesson discusses data structures. The objective here is to use data
structures as a tool for understanding storage patterns and for problem solving. The
section discusses the following data structures: array, queues, stacks, and linked lists.
You should talk about the common operations for each of these data structures. For each
operation, help students visualize how the operation affects the internal storage of the
data structure. Also discuss the algorithm that the data structure may use for each of these
operations.
You may also point out that an implementation for each of these data structures is also
available as part of the .NET Framework class libraries.
The final topic in this lesson covers sorting algorithms. This section talks about two
sorting algorithms, BubbleSort and QuickSort. The BubbleSort algorithm uses a series of
comparison and swap operations to arrange the elements of a list in the correct order. The
QuickSort algorithm uses partitioning and comparison operations to arrange the elements
of a list in the correct order.
You may highlight that there are different approaches to solving the same problem and
the solution that you choose may depend on your specific requirements. You should take
some time to compare the BubbleSort algorithm with QuickSort but at this level there is
no need to get into the discussion of the BigO notation and complexity analysis.

Key Terms

arrays —A collection of items stored in a contiguous memory location and addressed
using one or more indices.
black-box testing —Mostly used to make sure a software application covers all its
requirements.
BubbleSort —A sorting algorithm that uses a series of comparison and swap operations
to arrange the elements of a list in the correct order.
linked lists —A collection of nodes arranged so that each node contains a link to the next
node in the sequence.
QuickSort —A sorting algorithm that uses the partitioning and comparison operations to
arrange the elements of a list in the correct order.
queues —A collection of items in which the first item added to the collection is the first
one to be removed.
regression testing —A type of testing that ensures the functionality that was already
known to work correctly is still working with every new build.
stacks —A collection of items in which the last item added to the collection is the first
one to be removed.
unit testing —Verifies the functionality of a unit of code.
white-box testing —Used to make sure that each method or function works as expected.

b. Dequeue c. Peek

d. Contains

  1. You are developing a program that requires you to track the method calls. You can only invoke one method at a time. However, a method call may in turn invoke other methods. When a method ends, it returns control back to the calling method. Which data structure should you use to keep track of these method calls?

a. Queue b. Array

c. Linked list d. Stack

  1. You are developing a program that simulates a job queue. Often, the jobs come faster than you can process them, and in such case, the jobs wait for their turn to be processed. You need to make sure that the job that arrived first is the first to be processed as well. Which of the following data structures is best suited for this requirement? a. Array

b. Queue c. Linked list

d. Stack

  1. You write the following code in a program:

int[] numbers = {2, 3, 1, 4};

numbers[2] = 4;

What will be the contents of the array after the second statement is executed?

a. {2, 4, 1, 4} b. {2, 3, 4, 4}

c. {2, 4, 1, 2} d. {4, 3, 1, 4}

  1. You are developing a program that performs frequent insert and delete operations on the data. Your requirement also dictates the capability to access previous and next records when the user presses the previous or next button. Which of the following data structures will best suit your requirements?

a. Array

b. Circular linked list

c. Linked list d. Doubly linked list

  1. You are developing a program that performs frequent insert and delete operations on the data. The data items need to be accessed like a stack with

last-in , first-out functionality. Your solution must require as little memory as possible. Which of the following data structures will best suit these requirements? a. Array

b. Circular linked list c. Linked list

d. Doubly linked list

Fill in the Blank

Complete the following sentences by writing the correct word or words in the blanks provided.

  1. In white-box testing, testers use their knowledge of system internals to assess the system.

  2. Usually, with every new fix, software testers run a battery of regression tests to make sure that all functionality that was known to be working is still working.

  3. The BubbleSort algorithm uses a series of comparison and swap operations to arrange the elements of a list in the correct order.

  4. A(n) stack is a collection of items in which the last item added to the collection is the first one to be removed.

  5. Requirements analysis is the process of determining the detailed business requirements for a new software system.

  6. A linked list is a collection of nodes such that each node contains a(n) reference (or link) to the next node in the sequence.

  7. The enqueue operation adds an item to a queue, whereas the dequeue operation removes an item from a queue.

  8. The QuickSort algorithm uses partitioning and comparison operations to arrange the elements of a list in the correct order.

  9. A(n) business analyst is responsible for analyzing business needs and converting them into requirements that can be executed by the development team.

  10. Alpha testing and beta testing both are part of the acceptance testing of a system.

Competency Assessment

Project 3-1: Using Arrays
You are writing a program that uses a two-dimensional array. The array has four rows
and five columns. You need to print the largest element in each row of the array. How
would you write such a program?
1. Create a new project based on the Console Application
template. Name the project Project03_01.
2. Replace the code for the Program file with the following:

using System; namespace Project03_ {

Maximum number in the row 3: 79

Project 3-2: Using Queues
You are writing a program that uses two queues. The data in each queue is already in
ascending order. You need to process the contents of both queues in such a way that the
output is printed on the screen in sorted order. How would you write such a program?
1. Create a new project based on the Console Application
template. Name the project Project03_02.
2. Replace the code for the Program file with the following:

using System; using System;

namespace Project03_ { class Program { static void Main(string[] args) { Queue first = new Queue(); first(7); first(11); first(45); first(50);

Queue second = new Queue(); second(12); second(32); second(65); second(67);

ProcessInOrder(first, second);

Console( "Press any key to continue..."); Console(); }

static void ProcessInOrder(Queue first, Queue second) { while (first > 0 || second > 0) { if (first == 0)

{

Console(second()); continue; }

if (second == 0) { Console(first()); continue; }

if ( (int) first() >= (int) second()) { Console( second()); } else { Console(first()); } } } } }

3. Select Debug > Start Debugging (or press F5) to run the
project. Notice that the numbers are displayed in ascending
order in the console window.

Proficiency Assessment

Project 3-3: Using Stacks
You are writing a program that uses two stacks. The data in each stack is already in
descending order. You need to process the contents of both stacks in such a way that the
output is printed on the screen in ascending order. How would you write such a program?
1. Create a new project based on the Console Application
template. Name the project Project03_03.
2. Replace the code for the Program file with the following:

using System; using System;

namespace Project03_ {

}

else { Console(first()); } } } } }

3. Select Debug > Start Debugging (or press F5) to run the
project. Notice that the numbers are displayed in ascending
order in the console window.
Project 3-4: Using Linked Lists
You are writing a program that stores a list of product names in a linked list. The user
will enter a product name and your program needs to check whether the linked list
contains the given product. How would you write such a program?
1. Create a new project based on the Console Application
template. Name the project Project03_04.
2. Replace the code for the Program file with the following:

using System; using System.Collections;

namespace Project03_ { class Program { static void Main(string[] args) { string[] words = { "Konbu", "Tofu", "Pavlova", "Chocolate", "Ikura" }; LinkedList<string> list = new LinkedList<string>(words);

Console("Enter product to find:"); Console( "Type <end> to end the program"); string searchText = Console(); while (searchText != "<end>") { if (list(searchText))

{

Console(

"The search text was found");

}

else

{

Console(

"The search text was NOT found");

}

Console(

"Enter product to find:");

Console(

"Type <end> to end the program\n");

searchText = Console();

}

}

}

}

3. Select Debug > Start Debugging (or press F5) to run the
project. Type a product name to find in the console window
and press the Enter key. The program will display a
message saying that the product was found or not found.
Notice that the search is case sensitive. Type <end> and
press Enter to end the program.
Was this document helpful?
This is a Premium Document. Some documents on Studocu are Premium. Upgrade to Premium to unlock it.

Lesson review 03

Course: Software Development Capstone (ITEC 4904)

3 Documents
Students shared 3 documents in this course
Was this document helpful?

This is a preview

Do you want full access? Go Premium and unlock all 11 pages
  • Access to all documents

  • Get Unlimited Downloads

  • Improve your grades

Upload

Share your documents to unlock

Already Premium?
Lesson 3
Lesson 3
Understanding General Software Development
Learning Objectives
Students will learn about:
Application Lifecycle Management
Testing
Data Structures
Sorting Algorithms
ODN Skills
Understand application lifecycle management. 3.1
Understand algorithms and data structures. 3.3
Lesson Summary
This lesson covers two separate topics:
1. Application lifecycle management.
2. Algorithms and data structures.
You should emphasize the fact that software development is only one activity in the
complete application lifecycle. A whole range of people perform various activities in
order to turn an idea into reality. This lesson discusses activities such as design,
development, testing, and release.
The next topic covers the software testing activity in detail. At the end of the discussion,
students should before familiar with approaches to testing. You should point out that
complex business applications have a large number of possible execution paths. Many of
these execution paths depend on the runtime data. It is almost impossible to guarantee
that the application will have zero defects. As part of testing, you verify that the software
works as expected for the known execution paths.
The next section of the lesson discusses data structures. The objective here is to use data
structures as a tool for understanding storage patterns and for problem solving. The
section discusses the following data structures: array, queues, stacks, and linked lists.
You should talk about the common operations for each of these data structures. For each
operation, help students visualize how the operation affects the internal storage of the
data structure. Also discuss the algorithm that the data structure may use for each of these
operations.
You may also point out that an implementation for each of these data structures is also
available as part of the .NET Framework class libraries.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.

Why is this page out of focus?

This is a Premium document. Become Premium to read the whole document.