Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview: A famous factory has bought new machines for each one of its product lines. The manager of the factory has decided to assign some

image text in transcribedimage text in transcribedimage text in transcribed

Overview: A famous factory has bought new machines for each one of its product lines. The manager of the factory has decided to assign some workers from each product line to attend training workshops in order to know how to use the new machines where workshops will be given by engineers from the company manufactured the machines. In this TMA, it is required to help the manager of the factory keep track of the workshops and workers assigned to them. Requirements: After a quick meeting with the manager of the factory, you got the following information: Each worker has a civil ID (which is unique), a name and cannot attend a workshop not given to his/her product line. Each engineer has a civil ID (which is unique), a name and other attributes (add at least 2 attributes from your choice). He/she could give more than one workshop. There is a unique reference number for each workshop. Each workshop will be given by an engineer and to a specific product line. Workers could be added or removed from a workshop within a given limit for the maximum number of workers who could attend the same workshop (where this limit is fixed and unified for all workshops). Furthermore, there are other attributes (add at least one attribute from your choice). The whole data (all workshops of all product lines) should be stored in one collection. Moreover, you have been informed that the following operations happen frequently: Creating a new workshop Adding a worker to a specified workshop Removing a worker from a specified workshop Retrieving the average number of workers per workshop of a certain product line Displaying all workshops in a format similar to the following: product linel: workshopRefNo1, workshop RefNo2, ..., lastWorkshopRefNo product line2: workshopRefNo1, workshopRefNo2, .., lastWorkshopRefNo where product lines and workshops are sorted in ascending order Saving all the workshops into a text file Implementation: After analysing the given requirements, implement the required application: with Object Oriented Programming style following the rules of good programming style (e.g. adding comments, etc.) using only the material covered in M251 (and its prerequisites) Hints: For each class, it is required to implement constructors, setters, getters, toString() method, and any other necessary method If the user tries to do an operation that could violate the state of objects, the operation should be ignored and the application should display an error message (e.g. adding a worker to the same workshop twice, etc.) Checking equality of any 2 objects should be done via the equals() method There is a class that will do the main job of keep tracking of the workshops as follows: o It has one collection to store the whole data (all workshops of all product lines) o It has static methods, one for each operation happens frequently For each adding or removing operation, a message should be displayed to the user to explain the status of the operation (i.e. if it was successful or not) Testing: After implementing the required classes, design and implement a testing class to test them as follows: Create at least 7 workshops for at least 3 product lines and add them to the collection that stores the whole data then add and remove some workers from them. . Try to violate the state of the objects and show that your code prevents all violations. Show that the other operations that happen frequently are working fine. At the end, the whole data should be saved into a text file and this file should be saved automatically inside the folder contains your Java project. Important notes on penalties: Penalty on late submission: 10% per day Penalty for not including the Java project: 50% of the achieved mark. Penalty for not including the Word file: 10% of the achieved mark (after deducting any mark related to the Word file). Penalty on similarity percentage: At least 20% should be deducted if 50% 90%

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

Computerized Accounting With Quickbooks 2018

Authors: James B. Rosa, Kathleen Villani

1st Edition

0763882674, 9780763882679

More Books

Students also viewed these Accounting questions

Question

Did the author acknowledge the limitations of the study?

Answered: 1 week ago