Question: Write a class for vehicle, inherit classes named as car, bike, and any one of (rikshaw, boat, ship and plane) from it. Further inherit classes

Write a class for vehicle, inherit classes named as car, bike, and any one of (rikshaw, boat, ship and plane) from it. Further inherit classes named as door, wheel, engine, window, trunk, windshield wiper, petrol tank, wings, anchor, steering wheel and any other that you can think of. Create multiple objects from them and perform different functions including following.

Car:, , ,Window,Trunck,Windsheild,Wiper,SteeringWheel,PetrolTank

Bike: PetrolTank,EngineOn,EngineOff

  • Engine on/off()
  • Windows slider up/down()
  • Turn right/left/stop/reverse() à Wheel moveforward/reverse() [Think of the logic yourself]
  • Clean windscreen()
  • Tank full or not(), Open tank lid(), petrol quantity(), Reserve()
  • Drop anchor(), Lift anchor()
  • Rotate plane left/right()

Make your own logic as explained in lab, there are multiple solutions to this problem, and they are all acceptable. Do not copy from others. Every function should display it’s working as explained in lab.

Create the UML diagram of your class. Mention class, functions, and variable names in it.

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solution Vehiclecs using System using SystemCollectionsGeneric using SystemLinq using SystemText using SystemThreadingTasks namespace VPLAB1 internal class Vehicle public virtual void Functions Carscs ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!