Task 2-Group of workers objects-solution:

In addition to the main class, create a class that describes the worker under the name of e.g. "Worker". Specify the attributes as shown in the image:Classes and objects in JAVA:  Class Worker
Figure 1: Class Worker
In the main class, workers should be created as objects, data should be entered for them:Class in JAVA: Class named GroupsOfWorker
Figure 2: Class named GroupsOfWorker
Then calculate the weekly earnings and display on the screen:Class and objects in JAVA: Group of workers testing appliacation
Figure 3: Testing application

Return to additional example - classes and objects in JAVA