Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a BigTruck class that extends the Truck class. The BigTruck class should have th

ID: 3670197 • Letter: A

Question

a BigTruck class that extends the Truck class. The BigTruck class should have the following members: A field for the load capacity in tons (an int). A constructor and appropriate accessors and mutators. A toString method that overrides the toString method in the base class. The BigTruck class’s toString method should display only the truck’s name and the truck’s load capacity. Demonstrate the classes in a program that has a Truck array. Assign 2 Truck objects and 3 BigTruck objects to the array elements. The program should then step through the array, calling each object’s toString method. The output should display 5 trucks and each truck has the name and its load capacity

Explanation / Answer

Please find the required program below :

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote