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 t 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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
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 t has one collection to store the whole data (all workshops of all product lines)
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.
Transcribed Image Text: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 t has one collection to store the whole data (all workshops of all product lines) 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.
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 line1: workshopRefNo1, workshopRefNo2, ., lastWorkshopRefNo
product line2: workshopRefNo1, workshopRefNo2, ..., lastWorkshopRefNo
***.
...
where product lines and workshops are sorted in ascending order
Saving all the workshops into a text file
Transcribed Image Text: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 line1: workshopRefNo1, workshopRefNo2, ., lastWorkshopRefNo product line2: workshopRefNo1, workshopRefNo2, ..., lastWorkshopRefNo ***. ... where product lines and workshops are sorted in ascending order Saving all the workshops into a text file
Expert Solution
steps

Step by step

Solved in 2 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY