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.
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.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 20RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 6 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT