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.
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?
ViewQ3. 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?
ViewQ4. 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?
ViewQ5. Consider the statement “In the Strategy pattern, the context should hold references to the strategies.”
ViewWhen the context is tasked with deciding which strategy to use
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.
ViewQ7. Once a class has been had an Adapter pattern solution applied, it cannot be adapted again.
ViewQ8. Factories are no longer useful when you apply the Strategy Pattern to a family of algorithms.
ViewQ9. Observer is an implementation of the Dependency Inversion principle.
ViewQ10. Strategy Pattern helps maintain the Open/Closed Principle.
ViewEngineering Practices for Building Quality Software Week 03 Quiz Answers
Quiz 1: Quality in Implementation
Q1. Using a debugger can find all defects in code.
ViewQ2. 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?
ViewQ3. Commits should happen only at the end of a daily coding session.
ViewQ4. Only one line of code should change per commit.
ViewQ5. Commit messages are only helpful to you at the time you make them.
ViewQ6. Branching aids developers seeking to work on the same code simultaneously.
ViewQ7. Project materials are stored in a remote repository through the WebHook functionality.
ViewQ8. Compilers perform static analysis.
ViewQ9. Static analysis can only be performed while code is being executed.
ViewEngineering 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.
ViewQ2. Random testing is the poorest form of testing.
ViewQ3. The developer of the code is the best person to test that code.
ViewQ4. Manually created tests can use randomly selected inputs to maximize defect finding.
ViewQ5. Code coverage includes statement coverage, ensuring all code statements are executed at least once by at least one test case and all tests pass.
ViewQ6. Requirements testing is difficult because the tests can’t be created until the code is written, which is quite far into the development process.
ViewQ7. Program testing helps find defects, but testing cannot prove there are no bugs.
ViewQ8. A test case is a set of inputs written to try and “break the code”, i.e. find a defect.
ViewQ9. Test obligations come from Structural Analysis, that is, from the code itself.
ViewQ10. Tests which meet the code coverage criteria can still be poor tests.
ViewQ11. New processes/reports are able to be added to the Jenkins Pipeline through plug-ins.
ViewQ12. Continuous Integration alerts to submitting developer of build or test failure, but cannot remove the code committed.
ViewQ13. Continuous Integration is a subset of the capabilities in a Continuous Delivery pipeline.
ViewQ14. Pushing code to production without the need for developer action is one of the primary benefits of Continuous Delivery.
ViewQ15. The difference between Continuous Delivery and Continuous Deployment is whether the deployment of code to production is manual or automated, respectively.
ViewQ16. 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.
ViewQ17. 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.
ViewQ18. The developer should first run the tests before adding anything new, to ensure that all tests passed before adding any new tests or code.
ViewQ19. Continuous Delivery is an update to the Blue-Green Deployment paradigm.
ViewQ20. Statement coverage is the strongest form of code coverage, which is why it is required for many FAA and FDA-regulated software projects.
ViewGet 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