Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

explain what is meant by redundancy

Answered: 1 week ago