Code in java (i use netbeans 8.2)
Complete the given UML with the missing methods and relations, based on the requirements of the exercise below and implement the code in Netbeans. |oals WOCOMPLETED Porton COMPTE COTT 1. Class MyDate Define all attributes and implement all the necessary getters and setters. Implement a full constructor MyDate(int day, int month, int year). Implement a method getFullDate ( that returns the date in the following format: d-Month-ww (for example 10-Dec-2020). 2. Class Book Define all attributes the necessary getters and setters. Implement one empty constructor and one constructor that initializes all attributes from the parameters, except translated Languages. Instead, initialize translatedLanguages to an empty array with size 7. Implement a method calcSales/) that will calculate and return the total sales from the sold books. Implement a method calcProfit() that will calculate and return the total profit made from the sold books. (Hint: the profit = sales - cost) Implement a method addLanguage(String lang) that will add a new language in the array of translatedLanguages, if the array is not full. If the addition of the language is successful, print a success message, otherwise notify the user that the array is full. Implement a method toString() that will return a String with all the information about the Book object. 3. Class Bookstore Define all attributes and all the necessary getters and setters. Implement an empty constructor. Implement a constructor that initializes name, address, paci, and manager. Initialize employee[] to an empty array of Employee with eight elements; initialize sections [] to an empty array of Strings with five elements. Implement a method toStrinel) that returns a String with all the information about the bookstore Implement a method addEmployee(Employee emp) that adds an employee in the array of employees if the array is not full. If the addition of the employee is successful, print a success message, otherwise notify the user that the array is full Implement a method caleSalaryExpenses() that will calculate and return as an integer the sum of salaries of all employees and of the manager of the Bookstore 4. Class Person Define all attributes and all the necessary getters and setters Implement an empty constructor and a full constructor Implement a method calcAge() that will calculate and return the age of a person Implement a method toString() that will return a String with all the information about a Person. 5. Class Author Define class author to inherit from class Person Define all attributes and all the necessary getters and setters Implement an empty constructor. Implement a constructor that initializes all the inherited attributes, and genre and death attributes. In this constructor, initialize the prizes array to an empty String array of 10 elements and books to an empty Books array of 15 elements. If the death date is (0, 0, 0), then the Author is still alive, therefore set the attribute is live to true; otherwise if the date is different, set the attribute isalive to false. Implement a method addPrize(String prize) that will add a prize for the author in the array of prizes and print a success message. Check that the prizes array is not full, otherwise you have to print a warning message. Implement a method addBook[Book book) that will add a book in the array of Books and print a success message. Check that the books array is not full otherwise you have to print a warning message. Update the method setDeath() to change the value of attribute is Alive to false, when the date of death changes. Implement a method calcAgel), that will calculate and return the age of a person. Hint: You need to check if the author is alive or has passed away 6. Class Employee Define class Employee to inherit from class Person. Define all attributes and the necessary getters and setters. Implement an empty constructor. Implement a constructor that initializes all inherited attributes and, baseMonthlysalary, totalMonthlysales and joiningDate. Initialize id attribute to a random number of four integers (for example 5421). Implement a method toString() that will return a String with all the information about the employee Implement a method addBonus(), that will calculate and return the updated base Monthly Salary of the employee based on the employee's totalSales. If the totalMonthlySales are higher than 1000KD, the employee will get 100kd bonus. If the totalMonthlySales are higher than 500kd but less than or equal to 1000KD, then the employee will get 55KD bonus. Otherwise the employee gets no bonus at all. Implement a method calcEmployementPeriod() that calculates and returns as integer for how many years the employee has been working. 7. Class Manager Define class manager to inherit from class Employee. Define all attributes and the necessary getters and setters. Implement an empty constructor and a full constructor. Implement a method calcYearlySalary() that will calculate and return the salary including the yearly bonus, that the manager receives in a year. Implement a method toString() that will calculate and return a String with all the information about the manager. 8. Class TestMain In the main method create one object for every class. Print all the information for every object that you have created. Complete the given UML with the missing methods and relations, based on the requirements of the exercise below and implement the code in Netbeans. MyDate nt day int month // 10 BE COMPLETED Person amet address emalt bday My Date phoneNumberint // TO HE COMPLETED Bookstore name:String Address String -Pachant employee: Employee manager Manager Sections String //TO BE COMPLETED Book titleString author Author Stine publishers ent -pricesant costar Copynt Orgie soldCopest translated W TO BE COMPLETED Author te: String bolon death Me DS bookst: Books //TO BE COMPLETED Employee Stri Join Date MyDute -baseMonthly totalMonthly sales int I/O DE COMPLETED Manager yearly bonus cumber //TO BE COMPLETED