Get All Weeks Engineering Practices for Building Quality Software Quiz Answers
Table of Contents
Engineering Practices for Building Quality Software Week 01 Quiz Answers
Quiz 1: Quality in Design
Q1. The logical (intended) dependency is that the observer depends on the subject.
- True
- False
Q2. Up until now, the great state of Foo has held a lottery to help fund education in the state. The corporation tasked with the drawing of these numbers (the non-televised ones) is XYZ Numerical Tasking. You are the technical lead for the system that handles the drawings for the state’s lotteries. One of your developers, with a mathematical tilt, comes to you with a proposal: change how the random numbers are generated.
He suggests that the generation of random numbers could be better. NASA has released a random number generator which has been proven to be better than the one used by the company. He suggests that you make the change.
One of your more senior developers notes that using the new generator will require a change. He suggests that the team connect the existing lotto system, as seen in Figure 1, to the new generator (Figure 2) using the Facade pattern.
Figure 1
Figure 2
Facade, which seeks to simplify complex processes for a client by providing an API that hides the complicated calls/work needed, doesn’t seem to fit.
What pattern does?
The pattern that fits in this scenario is the Adapter pattern.
Q3. Within the Custodial Management System, there are a variety of items that are being watched at any given time. Certain items can receive notifications that a response is needed immediately (rather than just tracking whether the regular upkeep has been done that week/month/etc..). These items may then need one of several possible actions: rapid cleaning, bodily fluid containment and/or removal, addressing traction/slip danger, urgent repair, etc. Each of these actions fit the same profile (action) but not necessarily the same steps.
Which pattern would fit well as a solution to this system’s needs?
Answer: The State pattern would fit well as a solution to this system’s needs.
Q4. Early in our proof-of-concept work on the new game we are building, we effectively hard-coded the game to ask the user what action to take next, for both players. In this case, both users are tied into a single account, so that we can play against ourselves while we build out the game.
Now, however, we want to add a new player type to the system, EasyDifficultyBot. While the “player” actions fit the same high-level format for both humans and our AI, the details of making it happen vary pretty widely.
In order to allow for this change, we want to make use of a pattern that will allow this kind of expansion while minimizing changes to the existing code.
What pattern would be best here?
Answer: The Command pattern would be best in this case.
Q5. Consider the statement “In the Strategy pattern, the context should hold references to the strategies.”
- Under what circumstances would this be true? Select all that apply.
- Under no circumstances should the Context hold references to the concrete strategies
- When the client is tasked with deciding which strategy to use
- When the context is tasked with deciding which strategy to use
- When the Strategy base class uses a static method to return the correct derived type
- When using a Factory object to create Strategies
Q6. In the Observer pattern, one difficulty is that the Subject cannot pass an instance of itself to the Observer being updated, due to circular dependencies.
- True
- False
Q7. Once a class has been had an Adapter pattern solution applied, it cannot be adapted again.
- True
- False
Q8. Factories are no longer useful when you apply the Strategy Pattern to a family of algorithms.
- True
- False
Q9. Observer is an implementation of the Dependency Inversion principle.
- True
- False
Q10. Strategy Pattern helps maintain the Open/Closed Principle.
- True
- False
Engineering Practices for Building Quality Software Week 03 Quiz Answers
Quiz 1: Quality in Implementation
Q1. Using a debugger can find all defects in code.
- True
- False
Q2. What is created to allow a compiler to temporarily stop processing code that is being executed to allow for the developer to see the current state?
- debugging break
- Debugging
- Breakpoint
- Pause
- Stoppoint
Q3. Commits should happen only at the end of a daily coding session.
- True
- False
Q4. Only one line of code should change per commit.
- True
- False
Q5. Commit messages are only helpful to you at the time you make them.
- True
- False
Q6. Branching aids developers seeking to work on the same code simultaneously.
- True
- False
Q7. Project materials are stored in a remote repository through the WebHook functionality.
- True
- False
Q8. Compilers perform static analysis.
- True
- False
Q9. Static analysis can only be performed while code is being executed.
- True
- False
Engineering Practices for Building Quality Software Week 04 Quiz Answers
Quiz 1: Quality in Testing and Deployment
Q1. The goal of test selection is to find the maximum number of tests that can be successfully run.
- True
- False
Q2. Random testing is the poorest form of testing.
- True
- False
Q3. The developer of the code is the best person to test that code.
- True
- False
Q4. Manually created tests can use randomly selected inputs to maximize defect finding.
- True
- False
Q5. Code coverage includes statement coverage, ensuring all code statements are executed at least once by at least one test case and all tests pass.
- True
- False
Q6. Requirements testing is difficult because the tests can’t be created until the code is written, which is quite far into the development process.
- True
- False
Q7. Program testing helps find defects, but testing cannot prove there are no bugs.
- True
- False
Q8. A test case is a set of inputs written to try and “break the code”, i.e. find a defect.
- True
- False
Q9. Test obligations come from Structural Analysis, that is, from the code itself.
- True
- False
Q10. Tests which meet the code coverage criteria can still be poor tests.
- True
- False
Q11. New processes/reports are able to be added to the Jenkins Pipeline through plug-ins.
- True
- False
Q12. Continuous Integration alerts to submitting developer of build or test failure, but cannot remove the code committed.
- True
- False
Q13. Continuous Integration is a subset of the capabilities in a Continuous Delivery pipeline.
- True
- False
Q14. Pushing code to production without the need for developer action is one of the primary benefits of Continuous Delivery.
- True
- False
Q15. The difference between Continuous Delivery and Continuous Deployment is whether the deployment of code to production is manual or automated, respectively.
- True
- False
Q16. Canary is a system of alerts to developers based on build, test, release and/or deployment. The alerts are similar to “tweets” as on Twitter, hence the similarity of the names.
- True
- False
Q17. Since the goal is for every test to pass, tests should only include inputs which will result in successful operation/behavior when executed on correct code.
- True
- False
Q18. The developer should first run the tests before adding anything new, to ensure that all tests passed before adding any new tests or code.
- True
- False
Q19. Continuous Delivery is an update to the Blue-Green Deployment paradigm.
- True
- False
Q20. Statement coverage is the strongest form of code coverage, which is why it is required for many FAA and FDA-regulated software projects.
- True
- False
Get All Course Quiz Answers of Software Development Lifecycle Specialization
Software Development Processes and Methodologies Quiz Answers
Agile Software Development Coursera Quiz Answers
Lean Software Development Coursera Quiz Answers
Engineering Practices for Building Quality Software Quiz Answers