CS504 - Software Engineering I
Course Page
Q & A
Short Question & Answers
Q36: Keeping connie’s case study in mind, as discussed in lecture, list down whole parts structures which were identified.
Identify Whole-Part Structures: A store as a whole is made up of cashiers, registers, and items. A register contains a cash drawer. A sale is constituted of sale line items.
Q37: Define data flow diagram.
A data flow diagram (DFD) is a graphical representation of the "flow" of data through an information system, modeling its process aspects. Often they are a preliminary step used to create an overview of the system which can later be elaborated.
Q38: Comparison of software architecture and Building architecture.
When building a house, the architect, the general contractor, the electrician, the plumber, the interior designer, and the landscaper all have different views of the structure. Although these views are pictured differently, all are inherently related: together, they describe the building’s architecture. The same is true with software architecture. Architectural design basically establishes the overall structure of a software system.
Q39: Code example of High Coupling.
 public class CartEntry {
          public float Price;
          public int Quantity;
public class CartContents {
          public CartEntry[] items;
public class Order {
          private CartContents cart;
          private float salesTax;

          public Order(CartContents cart, float salesTax) {
                       this.cart = cart;
                       this.salesTax = salesTax;
          public float OrderTotal() {
                       float cartTotal = 0;
                       for (int i = 0; i < cart.items.Length; i++) {
                                  cartTotal += cart.items[i].Price * cart.items[i].Quantity;
                      cartTotal += cartTotal*salesTax;
                      return cartTotal;
Q40: Adding user interface detail in the SRS is controversial a creative process i.e. by adding GUI detail to the SRS document, focus e shift from what to how (analysis design) do you agree?
Yes I am agree because Client appreciates more the contents of the SRS document if our SRS document contains the GUI details than if we don’t have them there.
Q41: What is Software Testing?
To understand the concept of software testing correctly, we need to understand a few related concepts.
Q42: Write unit testing qualitative benefits.
Assessment-oriented: Writing the unit test forces us to deal with design issues - cohesion, coupling.

Confidence-building: We know what works at an early stage, also easier to change when it’s easy to retest.
Q43: Where Term Compute can be used in Methods?
The term compute can be used in methods where something is computed. valueSet.computeAverage(); matrix.computeInverse()
Q44: Write unit testing principles.
In unit testing, developers test their own code units (modules, classes, etc.) during implementation. Normal and boundary inputs against expected results are tested. Thus unit testing is a great way to test an API.
Q45: The use of do- while loops should be avoided. Explain why?
The use of do-While loops should be avoided. There are two reasons for this. First is that the construct is superfluous; Any statement that can be written as a do.... while loop can equally well be written as a while loop or a for loop. Complexity is reduced by minimizing the number of constructs being used. The other reason is of readability. A loop with the conditional part at the end is more difficult to read than one with the conditional at the top.
Q46: Give 3 Equivalence partitioning guidelines.
Organize your equivalence classes. Write them in some order, use some template, sequence, or group them based on their similarities or distinctions. These partitions can be hierarchical or organized in any other manner. Boundary conditions: determine boundary conditions. For example, adding in an empty linked list, adding after the last element, adding before the first element, etc. You should not forget invalid inputs that a user can give to a system. For example, widgets on a GUI, numeric instead of alphabets, etc.
Q47: Discus the symptoms and an example of memory overrun bug class.
Program crashes quite regularly after a given routine is called, that routine should be examined for a possible overrun condition.

If the routine in question does not appear to have any such problem the most likely cause is that another routine, called in the prior sequence, has already trashed variables or memory blocks.

Checking the trace log of the called routines leading up to one with the problem will often show up the error. Example The array only has 50 slots available in its allocation. What happens at that point is that the function goes past the end of the array and starts to walk on things beyond its control.

const kMaxEntries = 50;
int gArray[kMaxEntries];
char szDummyBuffer[256];
int nState = 10;

int ZeroArray (int *pArray) {
          for (inti=0;i<100;++i) pArray[i] = 0;
Course Instructor

Dr. Fakhar Lodhi
D.Sc. (CS) George
Washington University, USA

Software Engineering: A Practitioner’s Approach by Roger S. Pressman

The Unified Modeling Language User Guide by Grady Booch