Question: Topic: Object Oriented Programming 1. [20 points] Square Class Write a class that implements a Square shape. init_method that takes the side The class should
![Topic: Object Oriented Programming 1. [20 points] Square Class Write a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66efdd4f376f6_79066efdd4ecbcd9.jpg)

Topic: Object Oriented Programming 1. [20 points] Square Class Write a class that implements a Square shape. init_method that takes the side The class should contain a side attribute. Provide an length as an argument. Also, provide the following methods. perimeter returns 4 x side. area returns side x side. diagonal returns the square root of the expression (2 x side2). The perimeter, area and diagonal should not have corresponding data attributes; rather, they should use side in calculations that return the desired values. Create a Square object and display its side, perimeter, area and diagonal values. 2. (30 points] Employee and Production Worker Class a. UML summary diagram Read the problem below and construct a UML diagram of the problem (you can use powerpoint to create the diagram) and embed an image of the diagram in your notebook file. b. Employee and Production Worker Classes Write an Employee class that keeps data attributes for the following pieces of information: . Employee name Employee number Next, write a class named Production Worker that is a subclass of the Employee class. The Production Worker class should keep data attributes for the following information: Shift number (an integer, such as 1, 2, or 3) Hourly pay rate The workday is divided into two shifts: day and night. The shift attribute will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2. Write the appropriate accessor and mutator methods for each class. Once you have written the classes, write a program that creates an object of the Production Worker class and prompts the user to enter data for each of the object's data attributes. Store the data in the object, then use the object's accessor methods to retrieve it and display it on the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
