Question: Lab-4 (Abstract Factory) 100 points 1994 710 Problem Description: A robot company wants to build a robot by purchasing som hardware parts from other companies.

 Lab-4 (Abstract Factory) 100 points 1994 710 Problem Description: A robot

Lab-4 (Abstract Factory) 100 points 1994 710 Problem Description: A robot company wants to build a robot by purchasing som hardware parts from other companies. The current robot consists of one Hand, One Head, and one te For now, the robot will be built from two companies Company and Company. However, the robot can only work with certain part combinations as shown in the following table Hand Head Robot Configuration/Parts 1 Company Y Company X Company Company Y Company Company Each of the above parts contains move() method. The implementation of such method is to print something like "Move Head of Type Company X". if this part is head and manufactured by company Further Robot class should contain a movel) method. This method should call the movel method of each of the parts (hand, head, and leg) Deliverables: 1. Provide the UML class based on the Abstract Factory pattern (The design must match the implementation) 2. Provide the code of all required classes. 3. Write a main method test your code. You need to have a test case for each of the above configuration. Each test case should call the move method of the robot object

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!