CMPT 276 MIDTERM

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/201

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

202 Terms

1
New cards

Why is replacing legacy systems not straightforward?

Because legacy systems often have outdated hardware and software constraints, embedded assumptions, and are critical to current operations, making change risky and complex.

2
New cards

What factors contribute to project risk in software engineering?

Staff competency, requirements volatility, tool limitations, target-platform availability, and third-party software reliability.

3
New cards

Why might developers underestimate the risk of replacing a legacy system?

Because they assume the system is stable and well-understood, without accounting for unfamiliarity or hidden complexity.

4
New cards

Why can legacy systems fail to reduce project risk?

If designers don’t understand them, legacy systems can't provide useful design insight.

5
New cards

What should be done before replacing a legacy system?

Train staff, analyze old code, use tools to document legacy design, and maintain clarity about why replacement is necessary.

6
New cards

What should new designers remember when replacing a legacy system?

The old system works—it generates revenue—and replacing it carries major risks unless fully understood.

7
New cards

Why is deploying a new software system challenging?

Deployment must avoid disrupting operations; for example, Air Canada switched check-in systems during a slow Easter weekend.

8
New cards

What happened in the 1970s that changed software development?

Software became a major portion of the effort and cost in systems like factories, avionics, and financial systems, surpassing hardware costs.

9
New cards

What are characteristics of custom software?

Expensive, usually buggy, late, over budget, and tailored for specific use cases.

10
New cards

What is the "software crisis"? What caused the software crisis? What are symptoms of the software crisis?

A term from a 1960s NATO conference describing chronic problems in software: unreliability, budget overruns, missed deadlines.

Hardware improved faster than software development capabilities; designs were brittle, documentation poor, and engineers under-resourced.

Late schedules, poor quality, low productivity, and complexity beyond human handling.

11
New cards

Define software engineering (memorize for test)

The application of sound engineering and project management practices to increase productivity, predictability, and quality over the software system's entire lifecycle.

12
New cards

Why is engineering discipline important in software development?

50% of effort is spent after delivery; good early planning reduces lifecycle cost and maintenance effort.

13
New cards

What do engineers focus on besides coding?

Configuration management, design reviews, usability, and project estimation and tracking.

14
New cards

What are the 6 phases of the SDLC? Why is more effort early in SDLC beneficial?

  • Requirements gathering, analysis, specification

  • Design

  • Implementation

  • Testing

  • Deployment

  • Maintenance

It prevents costly bugs, reduces debugging, and leads to better design and maintainability.

15
New cards

What is the waterfall model? What are the deliverables for the design stage in waterfall? Why are peer reviews important in waterfall?

A linear development process with phases feeding into one another and back for revisions:
Requirements → Design → Implementation → Testing → Deployment

  • External UI design: draft user manual

  • Architectural design: architecture doc

  • Interface design: function declarations

  • Detailed design: data structures and algorithms

Peer reviews catch errors early and reduce cost/time waste in later phases.

16
New cards

What is the rapid prototype model? When is rapid prototyping useful?

Quickly builds a basic working system to clarify customer needs. It’s later thrown away. Useful when requirements are unclear and user feedback is needed to shape functionality.

17
New cards

What are agile strategies? When are agile methods useful?

Iterative models like Scrum, Kanban, and Extreme Programming that build functionality incrementally with customer feedback.

Useful when requirements are vague, estimates are hard, or developers lack domain knowledge.

18
New cards

What does the radius of the spiral model represent?

The amount of code/functionality increases as the team works longer.

19
New cards

What is the KIS principle?

Keep It Simple – Avoid unnecessary complexity in design, functions, and communication.

20
New cards

What does "Require visibility" mean?

Ensure progress is measurable, design is documented, and info is accessible early.

21
New cards

Why plan for continuous change?

Requirements evolve; maintain version control and document everything for maintainability.

22
New cards

Why shouldn’t you underestimate in software projects?

Underestimation leads to project delays, poor quality, and overworked teams.

23
New cards

What are the 3 maintenance activities? (Exam question)

  • Fixing problems

  • Enhancing features

  • Porting/migrating to different platforms

24
New cards

How does programmer productivity vary?

300–1000 lines/month, costing $8–$25/line; productivity decreases 10× as projects scale.

25
New cards

What happens as software projects grow?

  • Productivity drops

  • Bugs increase

  • Projects go 50–100% over schedule

  • 50% risk of failure or cancellation

26
New cards

Why do large projects fail late?

By the time they are canceled, 75% of the budget is often spent but the project is not 75% complete.

27
New cards

Why invest heavily in early SDLC phases?

Spending 30–40% more effort on analysis/design cuts bugs by 60% and reduces total effort.

28
New cards

Where are most bugs introduced?

Requirements and design phases.

29
New cards

What is the Capability Maturity Model (CMM)? What are the 5 CMM levels? Why can’t companies skip levels in CMM?

A 5-level model for assessing a software company’s process maturity and ability to produce reliable software.

  • Chaos

  • Repeatable

  • Defined

  • Managed

  • Optimizing

Each level builds on the previous; you need foundational practices to mature further.

30
New cards

Name 3 bad practices to avoid in software engineering:

  • Using unproven tech on critical projects

  • Putting uncontrolled items on the critical path

  • Relying on formal reviews as sole progress indicators

31
New cards

What are Joch’s 9 reliability principles?

  1. Fight for a stable design

  2. Cleanly divide tasks

  3. Avoid shortcuts

  4. Use assertions

  5. Use tools wisely

  6. Rely on fewer programmers

  7. Avoid featuritis

  8. Use formal methods

  9. Start testing early (TDD)

32
New cards

What is the purpose of the requirements gathering and analysis process?

To learn the application domain, gather and structure user info into a technical form, and document it in a requirements specification that can serve as a legal contract.

33
New cards

What are the three major steps of the requirements gathering process?

  • Gather information from users

  • Reorganize it into technical form

  • Document it in a requirements spec reviewed by customers and designers

34
New cards

What percentage of software errors come from the requirements phase?

56% of errors in large software systems come from the requirements phase.

35
New cards

How much effort is required to fix problems caused by requirements issues?

82% of total fix effort is due to requirements errors.

36
New cards

Why is it dangerous to assume you understand a system before gathering requirements?

Because of unfamiliar terminology, local specializations, and hidden complexities that are not obvious without in-depth analysis.

37
New cards

What should you determine when re-engineering a legacy system?

  • Current system function

  • How the new system improves it

  • How existing data will be converted

38
New cards

What are common difficulties during requirements analysis?

  • Customers overlook important info

  • Customers don't know what they want

  • Terminology is unfamiliar

  • Vague, inconsistent, or short-sighted goals

39
New cards

What is an RFP, and who writes it?

RFP = Request for Proposal. It's written by an analyst working for the customer to issue detailed requirements to potential developers.

40
New cards

What is the role of an analyst? What are the 3 key activities of the analyst?

To be the single interface to customers, gather and model requirements, and provide clear documentation for designers and programmers.

  • Look at the present (research the current system)

  • Gather facts and measurements

  • Model and document system features

41
New cards

Why should all questions to the customer go through the analyst?

To avoid overwhelming the customer and ensure consistent, centralized documentation.

42
New cards

What kinds of anomalies in nomenclature should analysts watch for? (Test Question)

  • Synonyms (same thing, different names)

  • Homonyms (same name, different meanings)

  • Inconsistencies (conflicting terms or meanings)

43
New cards

What should be noted for each data attribute in analysis?

  • Name (and synonyms)

  • Description

  • Range

  • Units

  • Accuracy

  • Precision

44
New cards

What are use cases, and what are they used for?

Use cases are written scenarios of user-system interaction. They are used for system design, user manual, implementation, and testing.

45
New cards

What is the structure of a written use case? (Test Question)

  • Title

  • Actor (e.g., “As a user…”)

  • Preconditions

  • Interaction Steps

  • Results

  • Variants/Exceptions

46
New cards

Why are requirements meetings important?

To gather accurate information by letting users do most of the talking, drawing, and writing; ensures their domain knowledge is captured properly.

47
New cards

What sources can an analyst use to find requirements information?

  • Written materials (manuals, old specs)

  • Interviews

  • Existing forms

  • Existing screens

  • Site/system visits

  • Measurements of usage and data volumes

48
New cards

Why are existing forms useful in analysis? Why are measurements important in analysis?

Existing forms show data groupings, input order, formatting, approval chains, and which departments need access.

Measurements help determine data structures, algorithms needed, and whether system complexity needs advanced solutions like trees or indexing.

49
New cards

What’s the key difference between analysts and programmers?

Analysts focus on the “what” (requirements and needs); programmers focus on the “how” (implementation details).

50
New cards

What personality traits should an analyst have?

Curious, lateral thinker, good communicator, systems thinker, able to unify solutions and challenge current business structures.

51
New cards

Can an analyst act as a designer? Under what condition? Can a designer act as an analyst? Under what condition?

Analysts can act as a designer if they understand data normalization, UI mechanisms, and distributed systems design.

Designer can act as an analyst if they understand user needs, can gather difficult info, think laterally, and improve both business logic and data control.

52
New cards

What is an actor in UML use cases?

An actor is an external user or system that interacts with the application, initiating use cases.

53
New cards

Why are use cases important in development?

Use cases "infect" the development process—they influence requirements, design, UI, testing, and implementation. They provide a foundation for planning, building, and testing functionality.

54
New cards

What does a good use case narrative include?

Title, actor, preconditions, steps of interaction (with system and user prompts), expected results, and variants.

55
New cards

When are use case diagrams helpful?

When there are many user types and each only uses a subset of functions. Best used alongside a textual list of use cases.

56
New cards

What are <<include>> relationships in use case diagrams?

A <<include>> is a dotted arrow showing that one use case always invokes another.

57
New cards

What are UML state diagrams used for?

To model software behavior that depends on current state—useful for showing how system reacts differently to the same events in different states.

58
New cards

What are the four UML event types in FSMs?

1. Incoming function call, 2. Change event, 3. <<signal>>, 4. Time event.

59
New cards

What is a guard in a state diagram?

A condition (in brackets) determining the transition outcome for the same event depending on another variable (e.g., [sunny] vs [raining]).

60
New cards

What’s the difference between Mealy and Moore state machines in software?

Moore: actions depend only on current state. Mealy: actions depend on both current state and input. Software FSMs may combine both.

61
New cards

What is an internal transition in UML FSM?

An event causes an action without changing the state—can be modeled with or without transition arrows.

62
New cards

What icons represent start and stop in state diagrams?

Start: solid dot; Stop: bullseye circle.

63
New cards

What are substates in state diagrams?

Hierarchical decomposition where a complex state contains an entire submachine. May use 'H' (history) to reenter last visited substate.

64
New cards

What are activity diagrams?

Flowchart-like state diagrams with no triggering events—activities transition automatically after completion. Good for modeling workflows.

65
New cards

How are concurrent activities shown in activity diagrams?

With horizontal/vertical bars that split or join concurrent flows—execution waits for all branches to complete before proceeding.

66
New cards

What are swim lanes and object flows in activity diagrams?

Swim lanes divide diagram responsibilities (by class, module, person), showing which part does each activity. Object flows track how objects are created and consumed.

67
New cards

What are Demarco's three independent views of a software system?

  • Retained Data Model – What the system remembers (entities, objects, records).

  • Functional Model – What the system does to data (processing, flow).

  • State Transition Model – When and under what conditions things happen (event/state behavior).

68
New cards

What does Demarcos retained data model show?

It defines objects/records, their attributes, and relationships — in ER diagrams (databases) or ORD/class diagrams (UML).

69
New cards

What does Demarcos functional model describe?

How data moves and is modified — like data flow in accounts payable systems. Often represented by data flow diagrams (DFDs).

70
New cards

What does Demarcos state transition model define?

The behavior of the system depending on the current state and incoming event — a dynamic model for control logic.

71
New cards

What are the 3 levels of specification rigor?

  • Natural language

  • Diagrams or structured language (pseudo-code, tables, DFDs)

  • Formal techniques (BNF, FSMs, relational algebra, VDM/Z, axiomatic specs)

72
New cards

What is noun-verb analysis used for?

To extract potential objects (nouns), functions (verbs), and attributes/relations (adjectives/possessives) from a system description.

73
New cards

Why is behavioral modeling important before coding?

It helps specify how the system behaves over time — the sequence of events, what should happen, and in what order.

74
New cards

What are the purposes of documenting the behavioral model?

  • Helps customers confirm the system behavior

  • Guides designers/programmers

  • Defines user manual content

  • Provides test case info for QA

75
New cards

What is a finite state machine (FSM)? What makes an object qualify as a state machine?

A formal model of system behavior based on states and transitions triggered by events. It must react differently to the same input depending on its current state (historical context matters).

76
New cards

What are the steps to programming an FSM in code?

  • Define the essential states

  • Export function prototypes (.h file)

  • Use a switch (or if-else) inside each function based on current state

77
New cards

What is the difference between remembering all past events vs. current state in FSMs?

FSMs do not store full history — they store only enough (the current state) to determine behavior.

78
New cards

What is BNF used for in requirements specification?

To define legal input sequences using formal grammar — supports completeness, closure, correctness, and unambiguity.

79
New cards

What are syntax diagrams and how are they used?

Visual representations of BNF — ovals = atoms, rectangles = composites — show valid input structures.

80
New cards

When should you specify a grammar in a system?

When parsing variable user input or specifying order-sensitive operations (e.g., commands, form fields).

81
New cards

What is the BNF symbol for alternation?

Vertical bar | inside round brackets, e.g., ("yes" | "no")

82
New cards

Which is better for a design review with a customer — BNF or syntax diagram? Why? (test question)

Syntax diagrams are better for customer design reviews because:

  • They are visual and more intuitive than textual BNF.

  • Easier for non-technical stakeholders to understand.

  • Clearly show allowed sequences and structures at a glance.

  • Customers can review and validate input rules more easily.

83
New cards

How do you translate from BNF to a syntax diagram? (test question)

  • Atoms in BNF (e.g., "yes") → Ovals in diagram.

  • Composites (e.g., <response>) → Rectangles in diagram.

  • Alternation (|) → branches from a decision point.

  • Sequence → straight connected flow left to right.

  • Repetition → loop arrow back to earlier element.

84
New cards

How do you translate from a syntax diagram to BNF?

  • Start at the leftmost entry point and trace the flow.

  • Ovals become quoted terminal symbols ("...").

  • Rectangles become non-terminal rules (<...>).

  • Branches become alternation using |.

  • Loops become repetition using recursion or brackets with *.

85
New cards

What is normalization in data modeling?

A process to organize data into structured tables with minimal redundancy and optimal storage access.

86
New cards

What are the benefits of object-oriented data modeling?

  • Matches how humans think

  • Aligns with modular design and OO languages

  • Offers long-term design stability

87
New cards

Why is data modeling important in requirements analysis?

It reveals what data exists, how it's related, and raises questions to clarify system functionality and storage needs.

88
New cards

What do Data Flow Diagrams (DFDs) show? What is a Level 0 DFD called?

How data flows between inputs, processing units, files, and outputs. They are not about sequencing or timing.

Context diagram – level 0 DFD, shows all system inputs/outputs and one top-level process.

89
New cards

What are the 5 elements of a DFD?

  1. Input sources

  2. Processing functions

  3. Files (storage)

  4. Output sinks

  5. Arrows with data labels

90
New cards

What’s the difference between logical and physical DFDs?

  • Physical DFD: Documents flow of physical items

  • Logical DFD: Describes data flows in an automated system

91
New cards

What are the four DFD process types?

  • Change of nature

  • Change of composition

  • Change of organization

  • Change of viewpoint

92
New cards

What is the advice for writing DFDs?

  • Ignore UI control inputs

  • Start from outputs

  • Don't treat bubbles as modules

  • Use one file per object entity

  • Add bubbles for each top-level menu item in Level 1

  • Add sub-bubbles for leaf menu items in Level 2

93
New cards

What do FSM arrows and boxes represent in diagrams?

  • Arrows: Event triggers (often function names)

  • Boxes: Actions taken when transitioning between states

  • Ovals: States (memory of past events)

94
New cards

What happens if states/events are string types instead of ints/chars?

You must use a train of if-else statements instead of a switch.

95
New cards

What’s the best way to manage complex FSMs?

Model each common use case as a sequence separately. The complete FSM is the union of all use case sequences.

96
New cards

What does CRUD stand for in software modeling?

Create, Read (Provide), Update, Delete — these are the four basic operations you can perform on persistent data in a system. CRUD defines user interactions with data. Understanding CRUD helps specify required features in terms of data manipulation.

97
New cards

What are the 3 perspectives of object orientation (OO)?

  • Business Analyst: OO is about identifying and organizing business entities and records.

  • Software Designer: OO is about designing object interactions in response to external commands/events.

  • Programmer: OO means using language features like inheritance, encapsulation, and polymorphism to structure and reuse code.

98
New cards

What are key features of an object in OO? how are objects organized (2 ways)

  • Identity – Each object is distinguishable.

  • State – Stored data (attributes).

  • Behavior – Ability to respond to messages/requests (methods).

  • By class (shared properties; e.g., all Toyota RAV4s)

  • By composition (whole-part; e.g., a truck is made of parts)

99
New cards

What is a model in software analysis? Why use them?

A representation of a real-world concept, system, or process used to document, communicate, or simulate its essential nature without unnecessary complexity.

  • To abstract complexity

  • To communicate understanding

  • To allow simulation or verification

  • To document systems clearly

100
New cards

What is encapsulation?

  • Putting together related data and behavior

  • Groups: data members, operations, internal state

  • Makes maintenance easier

  • Avoids breaking apart objects over time

Combining data and its associated operations into a single unit (object). Prevents external access to internal object state except via well-defined interfaces.