Question: Instructions: Using Eclipse, design and implement and test a Java application that models the following scenario. In the corporate world, companies may typically own other

Instructions: Using Eclipse, design and implement and test a Java application that models the following scenario. In the corporate world, companies may typically own other companies, called subsidiaries, which in turn own other smaller organisations, such as development studios. Companies may be aggregated into corporate groups, or conglomerates. A company may create new subsidiaries or close existing ones. It may also transfer ownership of a subsidiary, for example by selling it, to another company or it may make a subsidiary independent. Write code that models the scenario described above and a main program that creates at least 3 independent companies, at least two of which with subsidiaries, with at least one such subsidiary owning another organisation. Each company is solely responsible for creating its own subsidiaries, however new subsidiaries may be assigned to it by their parent companies. Your code must enforce the following constraints: (a) A company may not transfer ownership of itself or of a company it does not own, nor can it make itself independent; (b) it may not transfer ownership of a company to any of either company's own subsidiaries. Do so either by throwing exceptions of appropriate types, or by making your code such that the above may never happen. Then you must: (i) Identify and discuss the design patterns that could assist in modelling corporate structures and their responsibilities. (ii) Create a suite of unit tests for verifying that the constraints are correctly enforced by your code. (iii) Then create an implementation in Java of the functionality described above - using the appropriate design patterns.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!