Using the file layouts below write a class called PaySum (youshould already have this from assignment 7). Then write aclass called Earnings that extends the PaySum class. Instancefields are to be declared as private. Provide get and setmethods for each field and an overridden method for the displaydata method. Include a constructor method for the Earningsclass that initializes the check date to the assignment due dataand check number to 102375.