CS FundamentalsVery hardProduct-company placement
In GRASP, which pattern describes creating a class such as OrderPersistenceService that has no counterpart in the domain, so that domain classes stay cohesive and free of database code?
- A. Information Expert
- B. Pure Fabrication
- C. Creator
- D. Controller
Correct answer: B. Pure Fabrication
Pure Fabrication invents a convenience class for high cohesion and low coupling when assigning the job to a domain class (here Order) would mix responsibilities. Information Expert would wrongly push saving into Order because it has the data.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- In a Kubernetes service mesh, each pod runs an extra proxy container beside the application that handles mTLS, retries and metrics for all…
- Match each caching write policy with its behaviour. P. Write-through Q. Write-behind (write-back) R. Write-around 1. Writes go only to the…
- Pull requests A and B each pass CI against main and are merged one after the other, after which main fails to build: A renamed a function…
- On main you run git merge f1 f2 f3, where the three branches touch different files and none conflict. What results?
- A developer on Windows opens a repository created on Linux, edits one line of a file, and git diff shows every line changed. What is the…
- A product manager ranks 8 candidate requirements with the Analytic Hierarchy Process, comparing every pair once. How many pairwise…