Final answer:
The creating a base class with attributes for a truck rental company, and two sub classes that calculate the cost for weekday and weekend rentals by overriding an abstract pay Rental() method.
Step-by-step explanation:
The student is asking for assistance in creating a Rental class with specific attributes and methods, and then creating two subclasses, weekDayRental and weekEndRental, that inherit from the Rental class and override the payRental() method. This task requires understanding of object-oriented programming (OOP) concepts in a programming language that supports inheritance, like Java or C#.
The classes should have attributes for the truck rental company, such as name, number of days, and additional fees. Moreover, the student must use the inheritance feature by creating subclasses which derive from the Rental base class and override the abstract payRental() method according to the type of rental.
In the weekDayRental class, the payRental() method calculates the total cost by multiplying the number of days by a fixed rate and adding additional fees. In the weekEndRental class, the method uses a weekend rate instead of a fixed rate. Both subclasses should call the constructor of the parent class in their own constructors, and the weekEndRental class should also include getters and setters for the weekend rate attribute.