Download PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWER and more Exams Software Engineering in PDF only on Docsity! PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) What is software? - correct answer-Computer programs, procedures, and associated documentation pertaining to the *operation* of a *computer system*. What are some traits of software? - correct answer-*intangible*, hard to understand the development effort required. *reproducible*, cost is in development. What are some types of software? - correct answer-Applications (CAD, video games) System (OS, drivers) Embedded (microcode) Real Time (safety critical) How can we classify software that is being developed? - correct answer-Custom (for a specific customer) Generic (sold on open market) Embedded (tied closely to hardware) What is the goal of software engineering? - correct answer-To solve problems! Within: *cost* *time* *customer* *others* How does systematic development and evolution relate to software? - correct answer-An engineering *process* involves *well-understood techniques* in an *organized* and *disciplined* way. Most development is evolutionary. What are some of the important details about engineering? - correct answer-Engineering is a licensed profession, with a goal of protecting the public. Thus, ethical practices is also a key tenet of the profession. How is software engineering different from other forms of engineering? - correct answer- Focused on *CS*, rather than natural sciences. [discrete rather than continuous] Concentrates on *abstract/logical* ideas rather than *concrete/physical* ones. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Maintenance is evolution, not wear and tear. What are some commonalities between the forms of engineering? - correct answer-Series of decision, need to perform a trade off analysis, work as part of a team. Use *tools* that apply to *processes* systematically. What are ethics? - correct answer-A theory of system of moral values, that help govern an individual or group. What codes of ethics govern software engineering? - correct answer-Code of ethics described by ACM/IEEE Join Task Force What are the eight principals of the ethics code? - correct answer-Public Client/Employer Product Judgement Management Profession Colleagues Self Why do software engineers have so much responsibility? - correct answer-Have significant opportunities to do good or cause harm, as well as *enable* or *influence* others to do the same Who are the different stakeholders? - correct answer-Users, Customers, Software Developers, Development Managers Who are the users? - correct answer-Those who *use* the software Who are the customers? - correct answer-Those who *pay* for the software (e.g. Gmail, we are not the customers, advertisers are [we're users]) Who are the software developers? - correct answer-Those who *create* and *maintain* the software Who are the development managers? - correct answer-Project coordinators, those who *supervise* the development process What are the three main software quality attributes? - correct answer-Operation PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Risk analysis requires expertise Is there a perfect process model? - correct answer-No. What is scrum? - correct answer-A development model that involves a product owner, a scrum master, and a development team. What are the traits of a project owner (scrum)? - correct answer-Defines the features of the product, decides on release date. Prioritizes features, accepts or rejects results. What are the traits of the scrum master? - correct answer-Represents the management to the project, protects scrum policies, removes impediments, *shields team from external interference* What are the traits of the development team (scrum)? - correct answer-Assumes members are cross functional, only title *developer*, "optimal team": 3-9 What is a sprint? - correct answer-"Heart of the scrum", usually a month or less, consistent development throughout. What is a sprint planning meeting? - correct answer-Work to be performed in the upcoming sprint is planned. Suggested 8 hours for a one month sprint. Parts: What will be delivered? How will work get done? What are deliverables? - correct answer-Product owners presents a list of items to complete, teams develop a goal considering: backlog, capacity, performance. What is in the sprint backlog? - correct answer-Tasks with estimated time to complete each item, assigned to a team member. What is the goal of a daily scrum meeting? - correct answer-15 minutes to synchronize and plan for next 24 hours. Same time, same place. Questions: What was accomplished, what will be done, what obstacles are in the way? What is the goal of the sprint review meeting? - correct answer-Present accomplishments, demo features What is the retrospective? - correct answer-Opportunity to reflect and plan for improvements during the next sprint. What are some scrum criticisms? - correct answer-Assumes you can estimate task duration, many meetings, difficult to collaborate with outside groups PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) What is revision control (or version control)? - correct answer-Mechanism for managing changes made to files, supports collaborations. What is centralized model revision control? - correct answer-Single authoritative repository, all code checked into/out from this location (e.g. VCS) What is distributed model revision control? - correct answer-No authoritative copy, only working ones. Each repo contains all branches, pull/push changes (git) What is the git working directory? - correct answer-Refers to the currently checkout out version of the project Should you rebase commits that exist outside of your repo? - correct answer-No, somebody else may have made something based on those commits. What does the term greenfield mean? - correct answer-Building a project from scratch. What does brownfield mean? - correct answer-Must work with existing systems. What is design? - correct answer-Deciding how the requirements should be implemented using available technology. What is domain analysis? - correct answer-Process by which software engineer learns about the domain to better understand the problem. Benefits: Faster Development Better System Easy to anticipate future modifications What is a domain? - correct answer-The general field of business or technology in which the software will be used. What are the different types of requirements? - correct answer-Real [functional/performance] Constraints [nonfunctional] (all software must be in C) Possible [non-measureable] (look good, designed in Sen X state) How do you gather requirements? - correct answer-Observation (read documents and discuss with users), Interviewing, and Prototype (draw pictures, develop mock-up) How do you explore the requirements? - correct answer-Need to determine what the system is compared to the world. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Can change --> System Can influence --> Boundary Cannot change --> World What are user stories? - correct answer-Short, simple descriptions of a feature told from a certain perspective. As a <type>, I want <goal> Why are user stories helpful? - correct answer-Help define the scope of a system, help plan, form basis for tests. What is a use case? - correct answer-A typical sequence of actions that a user performs to complete a task. [as independent as possible from UI] What are use case extensions? - correct answer-Make optional interactions explicit, handle exceptional cases. (e.g. File not found error) What are use case inclusions? - correct answer-Allow one to express commonality between several use cases. Represents the performing of a lower *level task* with a lower level goal. (e.g. Browse for file) What is the purpose of exploring requirements? - correct answer-Reduce uncertainty about what is needed and not requested, and what is asked for and not needed. Should software developers avoid re-developing software? - correct answer-Yes! Reuse and design for reusability should be part of the culture of software development organizations. What is the vicious cycle in terms of reusability? - correct answer-Developers take short cuts to save time, which sacrifices quality. The cycle costs money, and it is important to pay attention to quality. What is a framework? - correct answer-Reusable software that implements a generic solution to a generalized problem. What is a framework slot? - correct answer-Certain classes or methods are missing, required. What is a framework hook? - correct answer-optional functionality, allowance made for the dev to provide it PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Force: Objects may have common properties. S: Create Node class, SuperiorNode, and NonSuperiorNode. What are aggregations? How are they represented in UML? - correct answer-Special associations representing "part-whole". Whole is referred to as aggregate. Denoted by a diamond (e.g. Vehicle <>-- VehiclePart) What is player-role pattern? - correct answer-Context: An object has a particular set of properties (*role*). P: Ability to change role. Force: Improve encapsulation, avoid multiple inheritance. S: Create a Player class, create an association to AbstractRole (which has varying sub classes). What is the singleton pattern? - correct answer-Context: Classes for which only one instance should exist. P: Ensure it is impossible to make more. Force: Public construction cannot guarantee this. S; Private class variable that stores the only instance. Public method getInstance() What is the delegation pattern? - correct answer-Context: Two classes, one provides service and other desires it. P: Make use of method in another class. F: Inheritance not appropriate. S: Create Delegator class with method that calls another method in Delegate. (e.g. Delegator: Stack, Delegate: LinkedList... push() --> list.addFirst()) What is the immutable pattern? - correct answer-Context: Object that contains a state which never changes after creation. P: Creating immutable instance. F: No loophole. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) S: No setters, all modifications done in constructor. What is a fork? - correct answer-In an activity diagram, when there is one incoming transition and multiple outgoing ones. What is a join? - correct answer-Multiple incoming transitions, one outgoing. What is a rendezvous? - correct answer-Multiple incoming and multiple outgoing transition. What are swim lanes? - correct answer-Partition activities among classes. What is an architectural pattern? - correct answer-Like software, there are architectural patterns with context, problem, solution. What is the multilayer pattern? - correct answer-"Stack of boxes" Problem: System needs to be built and tested independently. Solution: Define layers and allow relation among them. Separate Layer for UI, general services at bottom. What is the architectural problem and solution for Client Server? - correct answer-Problem: Large number of clients need access to resources. Solution: Client components initiate interactions and wait on results. Bad design: Increase re-usability Obsolescence What is the Transaction-processing pattern? - correct answer-P: System must read and handle series of inputs that change data. S: Dispatcher component that decides how to handle each transaction, calling another component Bad design: Increase re-usability Obsolescence PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Portability Testability Abstraction What is pipe-and-filter pattern? - correct answer-Stream of data is sent through pipes, with modifications in some way. All components could be removed & replaced. Bad design: Obsolescence Portability What is Model-View-Controller? - correct answer-P: UI needs frequent modifications without impacting system. S: Break system into 3 parts. Bad design: Obsolescence Portability Abstraction Reusability What is service-oriented? - correct answer-P: Service consumers must be able to use a number of providers. Solution: Cooperation peers that request and provide across network. ("web communication") Bad design: Flexibility Abstraction What is a module? - correct answer-A contiguous sequence of program statements, having some identifier. Trade off between modules and cost, need to find sweet spot. What is cohesion? - correct answer-A measure of the relative functional strength of a module. Highly cohesive systems have more readability and reuse. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) (> .3 is bad news) What are the inspection tests? - correct answer-Request, Entry, Planning, Individual Checking, Logging, Edit, Follow Up, Release What is logged/not logged during inspection? - correct answer-Issue are logged (critical, major, minor), improvement suggestions Not logged: Who found bug, how to fix, discussion as to how it was created. What are desk inspections? - correct answer-Done by a team member, 10-20 minutes where the inspector analyzes code, programmer has no involvement. What are the different phases of software testing? - correct answer-0: Finding bugs, novice approach 1: Show how the SW works, favored by sales 2: Show SW doesn't work, favored by legal 3: Reduce risk 4: Goal of quality software, mental state What is software testing? - correct answer-Collection of guidelines, methodologies, and tools for examining products. What are the two types of faults in terms of testing? - correct answer-Omission (what we forgot to include), Commission (failed to implement correctly). What is functional testing? - correct answer-Correctness, Performance, Stress "Black box" What is structural testing? - correct answer-Parts & statement coverage, decision and path coverage "White box", tends to find errors of commission. What is path and statement coverage? - correct answer-Make sure all parts and all statements are executed or used at least once. Is it practical to use all forms of coverage? - correct answer-No, statement coverage is weak, decision is better, but 100% path coverage can take forever. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) What is transaction flow testing? - correct answer-Traces objects from birth to their death, and possibly beyond. What is data flow testing? - correct answer-Trace data though system, look for anomalies. What is the equation for confidence? - correct answer-(1 - p)^n = e p is failure rate (requires very large n) What is mutation testing? - correct answer-Test data sates are good if they can detect small random changes in code. Plant bugs and see if they are found. How are equivalence classes helpful for testing? - correct answer-Instead of trying every possibility, try to identify classes and pick 1 value per class (plus edge cases) What are some common code defects? - correct answer-Logical conditions, infinite loop, NULL, singleton conditions, etc. What is a test case? - correct answer-Explicit set of instructions designed to detect a particular class of defects in a software system. What is the big bang testing strategy? - correct answer-"All at once", each module should be individually tested first. Then, the entire system is assembled and tested. Disadvantages: Low probability of success, hard to isolate defects. What is top down testing? - correct answer-Only top module is tested in isolation, programs are merged from top to bottom. Disadvantage: Bottom levels arn't tested enough, slow. What are stubs? - correct answer-Needed to simulate missing lower level modules. What is bottom up testing? - correct answer-Modules are merged and tested from the bottom up. Advantage: Lower level is well tested. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Disadvantage: UI is tested last, top not tested enough. What are drivers (in terms of testing)? - correct answer-Required to simulate the missing calls from the higher level modules. What is sandwich testing? - correct answer-"Best" Test the top level module and the terminal modules in isolation. Work both ways (top & bot) Advantage: Good coverage, low cost, get involved early. What are integration tests? - correct answer-Series of parts are inserted and put into the system one by one and tested. What are unit tests? - correct answer-Independent, short code fragments that test an individual method. What is regression testing? - correct answer-Set or subset of all tests are rerun after a change. Make sure it didn't break existing functionality. What are the different product release phases? - correct answer-Alpha, Beta, Release candidate "Silver", Production release "Gold" What should product managers do periodically? - correct answer-Set aside time to re-engineer part or all of the system (more readable, increase maintainability) What is refactoring? What does it improve? - correct answer-Process of restructuring code without changing external behaviors. (Improve quality, readability, maintainability, etc) What is cost estimation? - correct answer-Estimating how much software engineering time will be required to so some work. What are some of the cost estimation principles? - correct answer-Divide and conquer, include all, leverage past experience, account for differences, anticipate worst case What is scrum poker? - correct answer-Consensus-based technique for estimating effort. Group members make estimates by playing cards face down, then reveal and talk. What is an egoless team? - correct answer-Everybody is equal, work towards a common goal. Decisions made by consensus (typical agile team organization) PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) 10. Strain ability What are the elements of Maslow's hierarchy of needs? - correct answer-*Physiological* (food, shelter, clothing) *Safety* (protection from danger, job loss) *Social* (identify, belong) *Egotistical* (desire for name recognition) *Self-fulfillment* (desire to reach full potential) What is assertiveness? - correct answer-Amount and type of control a person tries to exert over another person or situation. Low High <-------------------> Ask Tell What is responsiveness? - correct answer-Manner with which a person expresses emotion, willingness to develop relationship. Low High <-------------------> Controls Emotes How would you describe an analytic person? - correct answer-"Slow task" Low responsiveness, low assertiveness. Critical, serious, systematic. How would you describe a driver? - correct answer-"Fast Task" Low responsiveness, high assertiveness. Pushy, firm, decisive, efficient. How would you describe an amiable? - correct answer-"slow people" High responsiveness, low assertiveness. Supportive, reliable, willing, dependable. PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) How would you describe an expressive? - correct answer-"Fast people" High responsiveness, high assertiveness. Dramatic, optimistic, reacting, excitable Where is there mild conflict between personalities? - correct answer-(slow task) (fast task) Analytic <------------------------> Driver ^ ^ | | | | | | | | v v Amiable <------------------------> Expressive (slow people) (fast people) Where are there extreme conflict between people? - correct answer-(slow task) (fast task) Analytic Driver (on the diag) Amiable Expressive (slow people) (fast people) What happens when a driver's needs are not met? - correct answer-Tank (rip people apart) Sniper (use embarrassment) Know it All (uses domination) What happens when an analytic's needs are not met? - correct answer-Whiner (constant complaints) No person (it won't work) Nothing person (fine, do it your way) What happens when an amiable's needs are not met? - correct answer-Yes person (whatever you say is good) PURDUE CS 307 MIDTERM EXAM 2024-2025 ACTUAL EXAM 200 QUESTIONS AND CORRECT DETAILED ANSWERS WITH RATIONALES (VERIFIED ANSWERS) Maybe (afraid to make wrong decision) Nothing (shy, timid) What happens when an expressive's needs are not met? - correct answer-Grenade (adult temper tantrum) Know it all (uses exxageration) How do your form a good team environment? - correct answer-Cult of quality, allow heterogeneity, preserve good teams, provide strategic direction (not tactical) How do you form a bad (teamicide) environment? - correct answer-Physical separation, fragment time, reduce quality, phony deadlines, overtime What are some lizard logic rules? - correct answer-Get it now! (Impulsive) Fight, run, freeze (in face of threat) Be dominant! Defend the territory! Get the mate! Complain and place blame How to be a good manager? - correct answer-Active listening, communicate effectively, "out at five". What are the managers essential body parts? - correct answer-Lead with the *heart* Trust your *gut* Build *soul* Develop a *nose* for bullshit