Answer both parts a and b
a) Create a Trip class in OOP which has three attributes ID,Destination, and TripLength and one method called Summary to showthe values of Destination and TripLength (4 marks, 0.5 for eachblank)
b) Create a constructor for the Trip class which accepts threeparameters to initialize the three attributes: ID, Destination, andTripLength (4 marks)
Answer both parts a and b a) Create a Trip class in OOP which has three attributes ID, Destination, and TripLength and o
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am